From 28045430d125421df996b956469ebfa291741533 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Thu, 1 Sep 2022 13:34:04 +0000 Subject: [PATCH 01/10] Template update for nf-core/tools version 2.5.1 --- bin/check_samplesheet.py | 9 ++++++--- pyproject.toml | 10 ++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 pyproject.toml diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 9a8b896..11b1557 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -98,7 +98,9 @@ class RowChecker: """Assert that read pairs have the same file extension. Report pair status.""" if row[self._first_col] and row[self._second_col]: row[self._single_col] = False - if Path(row[self._first_col]).suffixes[-2:] != Path(row[self._second_col]).suffixes[-2:]: + first_col_suffix = Path(row[self._first_col]).suffixes[-2:] + second_col_suffix = Path(row[self._second_col]).suffixes[-2:] + if first_col_suffix != second_col_suffix: raise AssertionError("FASTQ pairs must have the same file extensions.") else: row[self._single_col] = True @@ -157,7 +159,7 @@ def sniff_format(handle): handle.seek(0) sniffer = csv.Sniffer() if not sniffer.has_header(peek): - logger.critical(f"The given sample sheet does not appear to contain a header.") + logger.critical("The given sample sheet does not appear to contain a header.") sys.exit(1) dialect = sniffer.sniff(peek) return dialect @@ -195,7 +197,8 @@ def check_samplesheet(file_in, file_out): reader = csv.DictReader(in_handle, dialect=sniff_format(in_handle)) # Validate the existence of the expected header columns. if not required_columns.issubset(reader.fieldnames): - logger.critical(f"The sample sheet **must** contain the column headers: {', '.join(required_columns)}.") + req_cols = ", ".join(required_columns) + logger.critical(f"The sample sheet **must** contain these column headers: {req_cols}.") sys.exit(1) # Validate each row. checker = RowChecker() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0d62beb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +# Config file for Python. Mostly used to configure linting of bin/check_samplesheet.py with Black. +# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation. +[tool.black] +line-length = 120 +target_version = ["py37", "py38", "py39", "py310"] + +[tool.isort] +profile = "black" +known_first_party = ["nf_core"] +multi_line_output = 3 From e64b3f85a4caabc47d34435b4a3cc814581bf45d Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 2 Sep 2022 06:07:33 +0000 Subject: [PATCH 02/10] Fix final linting problems for template merge --- bin/check_samplesheet.py | 20 ++-- modules.json | 232 ++++++++++++++++++++++----------------- 2 files changed, 142 insertions(+), 110 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 7db3934..ca54ed9 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -6,10 +6,9 @@ import sys import errno import argparse + def parse_args(args=None): - Description = ( - "Reformat nf-core/taxprofiler samplesheet file and check its contents." - ) + Description = "Reformat nf-core/taxprofiler samplesheet file and check its contents." Epilog = "Example usage: python check_samplesheet.py " @@ -18,6 +17,7 @@ def parse_args(args=None): parser.add_argument("FILE_OUT", help="Output file.") return parser.parse_args(args) + def make_dir(path): if len(path) > 0: try: @@ -26,6 +26,7 @@ def make_dir(path): if exception.errno != errno.EEXIST: raise exception + def print_error(error, context="Line", context_str=""): error_str = "ERROR: Please check samplesheet -> {}".format(error) if context != "" and context_str != "": @@ -35,6 +36,7 @@ def print_error(error, context="Line", context_str=""): print(error_str) sys.exit(1) + def check_samplesheet(file_in, file_out): """ This function checks that the samplesheet follows the following structure: @@ -118,9 +120,7 @@ def check_samplesheet(file_in, file_out): num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: print_error( - "Invalid number of populated columns (minimum = {})!".format( - MIN_COLS - ), + "Invalid number of populated columns (minimum = {})!".format(MIN_COLS), "Line", line, ) @@ -183,13 +183,9 @@ def check_samplesheet(file_in, file_out): ## Auto-detect paired-end/single-end if sample and fastq_1 and fastq_2: ## Paired-end short reads sample_info.extend(["0", fastq_1, fastq_2, fasta]) - elif ( - sample and fastq_1 and not fastq_2 - ): ## Single-end short/long fastq reads + elif sample and fastq_1 and not fastq_2: ## Single-end short/long fastq reads sample_info.extend(["1", fastq_1, fastq_2, fasta]) - elif ( - sample and fasta and not fastq_1 and not fastq_2 - ): ## Single-end long reads + elif sample and fasta and not fastq_1 and not fastq_2: ## Single-end long reads sample_info.extend(["1", fastq_1, fastq_2, fasta]) elif fasta and (fastq_1 or fastq_2): print_error( diff --git a/modules.json b/modules.json index 33c0c10..2d5bea6 100644 --- a/modules.json +++ b/modules.json @@ -3,104 +3,140 @@ "homePage": "https://github.com/nf-core/taxprofiler", "repos": { "nf-core/modules": { - "adapterremoval": { - "git_sha": "879d42c5e28661fe0a5e744c9e2c515868f9e08a" - }, - "bbmap/bbduk": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "bowtie2/align": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "bowtie2/build": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "cat/fastq": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "centrifuge/centrifuge": { - "git_sha": "d2726fcf75063960f06b36d2229a4c0966614108" - }, - "centrifuge/kreport": { - "git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838" - }, - "custom/dumpsoftwareversions": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "diamond/blastx": { - "git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa" - }, - "fastp": { - "git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789" - }, - "fastqc": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "filtlong": { - "git_sha": "957cb9b83668075f4af101fc99502908cca487e3" - }, - "gunzip": { - "git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9" - }, - "kaiju/kaiju": { - "git_sha": "8856f127c58f6af479128be8b8df4d42e442ddbe" - }, - "kaiju/kaiju2krona": { - "git_sha": "2f0b19240430de6807b1232e6d9d0e8084e8a28f" - }, - "kaiju/kaiju2table": { - "git_sha": "538dbac98ba9c8f799536cd5a617195501439457" - }, - "kraken2/kraken2": { - "git_sha": "abe025677cdd805cc93032341ab19885473c1a07" - }, - "krakentools/kreport2krona": { - "git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422" - }, - "krona/ktimporttaxonomy": { - "git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e" - }, - "krona/ktimporttext": { - "git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2" - }, - "malt/run": { - "git_sha": "be8d7b3293cac26cc63e4dbfb364deb8ed6ec7e5" - }, - "megan/rma2info": { - "git_sha": "2d38566eca4cc15142b2ffa7c11837569b39aece" - }, - "metaphlan3": { - "git_sha": "ed4dd1a928ebf4308efb720de878045f7773f8e2" - }, - "minimap2/align": { - "git_sha": "1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b" - }, - "minimap2/index": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "motus/merge": { - "git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49" - }, - "motus/profile": { - "git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18" - }, - "multiqc": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "porechop": { - "git_sha": "b78e19b9dae3671db2c7d4346fe04452c1debfab" - }, - "prinseqplusplus": { - "git_sha": "f1c5384c31e985591716afdd732cf8c2ae29d05b" - }, - "samtools/bam2fq": { - "git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159" - }, - "samtools/view": { - "git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce" - }, - "untar": { - "git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918" + "git_url": "https://github.com/nf-core/modules.git", + "modules": { + "adapterremoval": { + "branch": "master", + "git_sha": "879d42c5e28661fe0a5e744c9e2c515868f9e08a" + }, + "bbmap/bbduk": { + "branch": "master", + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "bowtie2/align": { + "branch": "master", + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "bowtie2/build": { + "branch": "master", + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "cat/fastq": { + "branch": "master", + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "centrifuge/centrifuge": { + "branch": "master", + "git_sha": "d2726fcf75063960f06b36d2229a4c0966614108" + }, + "centrifuge/kreport": { + "branch": "master", + "git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838" + }, + "custom/dumpsoftwareversions": { + "branch": "master", + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "diamond/blastx": { + "branch": "master", + "git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa" + }, + "fastp": { + "branch": "master", + "git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789" + }, + "fastqc": { + "branch": "master", + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "filtlong": { + "branch": "master", + "git_sha": "957cb9b83668075f4af101fc99502908cca487e3" + }, + "gunzip": { + "branch": "master", + "git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9" + }, + "kaiju/kaiju": { + "branch": "master", + "git_sha": "8856f127c58f6af479128be8b8df4d42e442ddbe" + }, + "kaiju/kaiju2krona": { + "branch": "master", + "git_sha": "2f0b19240430de6807b1232e6d9d0e8084e8a28f" + }, + "kaiju/kaiju2table": { + "branch": "master", + "git_sha": "538dbac98ba9c8f799536cd5a617195501439457" + }, + "kraken2/kraken2": { + "branch": "master", + "git_sha": "abe025677cdd805cc93032341ab19885473c1a07" + }, + "krakentools/kreport2krona": { + "branch": "master", + "git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422" + }, + "krona/ktimporttaxonomy": { + "branch": "master", + "git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e" + }, + "krona/ktimporttext": { + "branch": "master", + "git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2" + }, + "malt/run": { + "branch": "master", + "git_sha": "be8d7b3293cac26cc63e4dbfb364deb8ed6ec7e5" + }, + "megan/rma2info": { + "branch": "master", + "git_sha": "2d38566eca4cc15142b2ffa7c11837569b39aece" + }, + "metaphlan3": { + "branch": "master", + "git_sha": "ed4dd1a928ebf4308efb720de878045f7773f8e2" + }, + "minimap2/align": { + "branch": "master", + "git_sha": "1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b" + }, + "minimap2/index": { + "branch": "master", + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "motus/merge": { + "branch": "master", + "git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49" + }, + "motus/profile": { + "branch": "master", + "git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18" + }, + "multiqc": { + "branch": "master", + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "porechop": { + "branch": "master", + "git_sha": "b78e19b9dae3671db2c7d4346fe04452c1debfab" + }, + "prinseqplusplus": { + "branch": "master", + "git_sha": "f1c5384c31e985591716afdd732cf8c2ae29d05b" + }, + "samtools/bam2fq": { + "branch": "master", + "git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159" + }, + "samtools/view": { + "branch": "master", + "git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce" + }, + "untar": { + "branch": "master", + "git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918" + } } } } From 176a0a6280b03c63d90b9fdbf8b1843d28421aee Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 2 Sep 2022 10:06:20 +0200 Subject: [PATCH 03/10] Update ci.yml --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2641adb..8268d52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,14 +23,8 @@ jobs: - "21.10.3" - "latest-everything" parameters: - - "--perform_longread_qc false" - - "--perform_shortread_qc false" - - "--shortread_qc_tool fastp" - "--shortread_qc_tool fastp --shortread_qc_mergepairs --shortread_qc_excludeunmerged" - - "--shortread_qc_tool fastp --shortread_qc_mergepairs" - - "--shortread_qc_tool adapterremoval" - "--shortread_qc_tool adapterremoval --shortread_qc_mergepairs --shortread_qc_excludeunmerged" - - "--shortread_qc_tool adapterremoval --shortread_qc_mergepairs" - "--shortread_complexityfilter_tool bbduk" - "--shortread_complexityfilter_tool prinseqplusplus" - "--perform_runmerging" From 61560cf065fae116cb74df26a838445bdd5bd575 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 2 Sep 2022 10:12:27 +0200 Subject: [PATCH 04/10] Update ci.yml --- .github/workflows/ci.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8268d52..434b494 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,28 +64,18 @@ jobs: NXF_ANSI_LOG: false strategy: matrix: - # Nextflow versions - include: - # Test pipeline minimum Nextflow version - - NXF_VER: "21.10.3" - NXF_EDGE: "" - # Test latest edge release of Nextflow - - NXF_VER: "" - NXF_EDGE: "1" + NXF_VER: + - "21.10.3" + - "latest-everything" steps: - name: Check out pipeline code uses: actions/checkout@v2 - name: Install Nextflow - env: - NXF_VER: ${{ matrix.NXF_VER }} - # Uncomment only if the edge release is more recent than the latest stable release - # See https://github.com/nextflow-io/nextflow/issues/2467 - # NXF_EDGE: ${{ matrix.NXF_EDGE }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ + uses: nf-core/setup-nextflow@v1 + with: + version: "${{ matrix.NXF_VER }}" - name: Show current locale run: locale From 8fe7f8bf4b034c81667a6b645c0e2c9978cd05de Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 2 Sep 2022 11:47:33 +0200 Subject: [PATCH 05/10] Revert "Fix final linting problems for template merge" This reverts commit e64b3f85a4caabc47d34435b4a3cc814581bf45d. --- bin/check_samplesheet.py | 20 ++-- modules.json | 232 +++++++++++++++++---------------------- 2 files changed, 110 insertions(+), 142 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index ca54ed9..7db3934 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -6,9 +6,10 @@ import sys import errno import argparse - def parse_args(args=None): - Description = "Reformat nf-core/taxprofiler samplesheet file and check its contents." + Description = ( + "Reformat nf-core/taxprofiler samplesheet file and check its contents." + ) Epilog = "Example usage: python check_samplesheet.py " @@ -17,7 +18,6 @@ def parse_args(args=None): parser.add_argument("FILE_OUT", help="Output file.") return parser.parse_args(args) - def make_dir(path): if len(path) > 0: try: @@ -26,7 +26,6 @@ def make_dir(path): if exception.errno != errno.EEXIST: raise exception - def print_error(error, context="Line", context_str=""): error_str = "ERROR: Please check samplesheet -> {}".format(error) if context != "" and context_str != "": @@ -36,7 +35,6 @@ def print_error(error, context="Line", context_str=""): print(error_str) sys.exit(1) - def check_samplesheet(file_in, file_out): """ This function checks that the samplesheet follows the following structure: @@ -120,7 +118,9 @@ def check_samplesheet(file_in, file_out): num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: print_error( - "Invalid number of populated columns (minimum = {})!".format(MIN_COLS), + "Invalid number of populated columns (minimum = {})!".format( + MIN_COLS + ), "Line", line, ) @@ -183,9 +183,13 @@ def check_samplesheet(file_in, file_out): ## Auto-detect paired-end/single-end if sample and fastq_1 and fastq_2: ## Paired-end short reads sample_info.extend(["0", fastq_1, fastq_2, fasta]) - elif sample and fastq_1 and not fastq_2: ## Single-end short/long fastq reads + elif ( + sample and fastq_1 and not fastq_2 + ): ## Single-end short/long fastq reads sample_info.extend(["1", fastq_1, fastq_2, fasta]) - elif sample and fasta and not fastq_1 and not fastq_2: ## Single-end long reads + elif ( + sample and fasta and not fastq_1 and not fastq_2 + ): ## Single-end long reads sample_info.extend(["1", fastq_1, fastq_2, fasta]) elif fasta and (fastq_1 or fastq_2): print_error( diff --git a/modules.json b/modules.json index 2d5bea6..33c0c10 100644 --- a/modules.json +++ b/modules.json @@ -3,140 +3,104 @@ "homePage": "https://github.com/nf-core/taxprofiler", "repos": { "nf-core/modules": { - "git_url": "https://github.com/nf-core/modules.git", - "modules": { - "adapterremoval": { - "branch": "master", - "git_sha": "879d42c5e28661fe0a5e744c9e2c515868f9e08a" - }, - "bbmap/bbduk": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "bowtie2/align": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "bowtie2/build": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "cat/fastq": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "centrifuge/centrifuge": { - "branch": "master", - "git_sha": "d2726fcf75063960f06b36d2229a4c0966614108" - }, - "centrifuge/kreport": { - "branch": "master", - "git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838" - }, - "custom/dumpsoftwareversions": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "diamond/blastx": { - "branch": "master", - "git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa" - }, - "fastp": { - "branch": "master", - "git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789" - }, - "fastqc": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "filtlong": { - "branch": "master", - "git_sha": "957cb9b83668075f4af101fc99502908cca487e3" - }, - "gunzip": { - "branch": "master", - "git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9" - }, - "kaiju/kaiju": { - "branch": "master", - "git_sha": "8856f127c58f6af479128be8b8df4d42e442ddbe" - }, - "kaiju/kaiju2krona": { - "branch": "master", - "git_sha": "2f0b19240430de6807b1232e6d9d0e8084e8a28f" - }, - "kaiju/kaiju2table": { - "branch": "master", - "git_sha": "538dbac98ba9c8f799536cd5a617195501439457" - }, - "kraken2/kraken2": { - "branch": "master", - "git_sha": "abe025677cdd805cc93032341ab19885473c1a07" - }, - "krakentools/kreport2krona": { - "branch": "master", - "git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422" - }, - "krona/ktimporttaxonomy": { - "branch": "master", - "git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e" - }, - "krona/ktimporttext": { - "branch": "master", - "git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2" - }, - "malt/run": { - "branch": "master", - "git_sha": "be8d7b3293cac26cc63e4dbfb364deb8ed6ec7e5" - }, - "megan/rma2info": { - "branch": "master", - "git_sha": "2d38566eca4cc15142b2ffa7c11837569b39aece" - }, - "metaphlan3": { - "branch": "master", - "git_sha": "ed4dd1a928ebf4308efb720de878045f7773f8e2" - }, - "minimap2/align": { - "branch": "master", - "git_sha": "1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b" - }, - "minimap2/index": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "motus/merge": { - "branch": "master", - "git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49" - }, - "motus/profile": { - "branch": "master", - "git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18" - }, - "multiqc": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "porechop": { - "branch": "master", - "git_sha": "b78e19b9dae3671db2c7d4346fe04452c1debfab" - }, - "prinseqplusplus": { - "branch": "master", - "git_sha": "f1c5384c31e985591716afdd732cf8c2ae29d05b" - }, - "samtools/bam2fq": { - "branch": "master", - "git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159" - }, - "samtools/view": { - "branch": "master", - "git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce" - }, - "untar": { - "branch": "master", - "git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918" - } + "adapterremoval": { + "git_sha": "879d42c5e28661fe0a5e744c9e2c515868f9e08a" + }, + "bbmap/bbduk": { + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "bowtie2/align": { + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "bowtie2/build": { + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "cat/fastq": { + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "centrifuge/centrifuge": { + "git_sha": "d2726fcf75063960f06b36d2229a4c0966614108" + }, + "centrifuge/kreport": { + "git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838" + }, + "custom/dumpsoftwareversions": { + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "diamond/blastx": { + "git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa" + }, + "fastp": { + "git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789" + }, + "fastqc": { + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "filtlong": { + "git_sha": "957cb9b83668075f4af101fc99502908cca487e3" + }, + "gunzip": { + "git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9" + }, + "kaiju/kaiju": { + "git_sha": "8856f127c58f6af479128be8b8df4d42e442ddbe" + }, + "kaiju/kaiju2krona": { + "git_sha": "2f0b19240430de6807b1232e6d9d0e8084e8a28f" + }, + "kaiju/kaiju2table": { + "git_sha": "538dbac98ba9c8f799536cd5a617195501439457" + }, + "kraken2/kraken2": { + "git_sha": "abe025677cdd805cc93032341ab19885473c1a07" + }, + "krakentools/kreport2krona": { + "git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422" + }, + "krona/ktimporttaxonomy": { + "git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e" + }, + "krona/ktimporttext": { + "git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2" + }, + "malt/run": { + "git_sha": "be8d7b3293cac26cc63e4dbfb364deb8ed6ec7e5" + }, + "megan/rma2info": { + "git_sha": "2d38566eca4cc15142b2ffa7c11837569b39aece" + }, + "metaphlan3": { + "git_sha": "ed4dd1a928ebf4308efb720de878045f7773f8e2" + }, + "minimap2/align": { + "git_sha": "1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b" + }, + "minimap2/index": { + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "motus/merge": { + "git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49" + }, + "motus/profile": { + "git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18" + }, + "multiqc": { + "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + }, + "porechop": { + "git_sha": "b78e19b9dae3671db2c7d4346fe04452c1debfab" + }, + "prinseqplusplus": { + "git_sha": "f1c5384c31e985591716afdd732cf8c2ae29d05b" + }, + "samtools/bam2fq": { + "git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159" + }, + "samtools/view": { + "git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce" + }, + "untar": { + "git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918" } } } From c479714a5e99def23807a01f52f0f9490e82ece3 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 2 Sep 2022 11:48:49 +0200 Subject: [PATCH 06/10] Revert "Update ci.yml" This reverts commit 61560cf065fae116cb74df26a838445bdd5bd575. --- .github/workflows/ci.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 434b494..8268d52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,18 +64,28 @@ jobs: NXF_ANSI_LOG: false strategy: matrix: - NXF_VER: - - "21.10.3" - - "latest-everything" + # Nextflow versions + include: + # Test pipeline minimum Nextflow version + - NXF_VER: "21.10.3" + NXF_EDGE: "" + # Test latest edge release of Nextflow + - NXF_VER: "" + NXF_EDGE: "1" steps: - name: Check out pipeline code uses: actions/checkout@v2 - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 - with: - version: "${{ matrix.NXF_VER }}" + env: + NXF_VER: ${{ matrix.NXF_VER }} + # Uncomment only if the edge release is more recent than the latest stable release + # See https://github.com/nextflow-io/nextflow/issues/2467 + # NXF_EDGE: ${{ matrix.NXF_EDGE }} + run: | + wget -qO- get.nextflow.io | bash + sudo mv nextflow /usr/local/bin/ - name: Show current locale run: locale From 55d7919fa7befebebb673bdaf3352e842be44a73 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 2 Sep 2022 11:48:57 +0200 Subject: [PATCH 07/10] Revert "Update ci.yml" This reverts commit 176a0a6280b03c63d90b9fdbf8b1843d28421aee. --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8268d52..2641adb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,14 @@ jobs: - "21.10.3" - "latest-everything" parameters: + - "--perform_longread_qc false" + - "--perform_shortread_qc false" + - "--shortread_qc_tool fastp" - "--shortread_qc_tool fastp --shortread_qc_mergepairs --shortread_qc_excludeunmerged" + - "--shortread_qc_tool fastp --shortread_qc_mergepairs" + - "--shortread_qc_tool adapterremoval" - "--shortread_qc_tool adapterremoval --shortread_qc_mergepairs --shortread_qc_excludeunmerged" + - "--shortread_qc_tool adapterremoval --shortread_qc_mergepairs" - "--shortread_complexityfilter_tool bbduk" - "--shortread_complexityfilter_tool prinseqplusplus" - "--perform_runmerging" From 7917e1d656fc303a7aab59bd377b11d7acab7036 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 2 Sep 2022 11:51:18 +0200 Subject: [PATCH 08/10] Synronise mOTUs CI setup --- .github/workflows/ci.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2641adb..f270829 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,28 +70,18 @@ jobs: NXF_ANSI_LOG: false strategy: matrix: - # Nextflow versions - include: - # Test pipeline minimum Nextflow version - - NXF_VER: "21.10.3" - NXF_EDGE: "" - # Test latest edge release of Nextflow - - NXF_VER: "" - NXF_EDGE: "1" + NXF_VER: + - "21.10.3" + - "latest-everything" steps: - name: Check out pipeline code uses: actions/checkout@v2 - name: Install Nextflow - env: - NXF_VER: ${{ matrix.NXF_VER }} - # Uncomment only if the edge release is more recent than the latest stable release - # See https://github.com/nextflow-io/nextflow/issues/2467 - # NXF_EDGE: ${{ matrix.NXF_EDGE }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ + uses: nf-core/setup-nextflow@v1 + with: + version: "${{ matrix.NXF_VER }}" - name: Show current locale run: locale From 3a33d81e80d8769717357fd3b9526a41316c9265 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 2 Sep 2022 11:55:19 +0200 Subject: [PATCH 09/10] Black linting I hope --- bin/check_samplesheet.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 7db3934..ca54ed9 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -6,10 +6,9 @@ import sys import errno import argparse + def parse_args(args=None): - Description = ( - "Reformat nf-core/taxprofiler samplesheet file and check its contents." - ) + Description = "Reformat nf-core/taxprofiler samplesheet file and check its contents." Epilog = "Example usage: python check_samplesheet.py " @@ -18,6 +17,7 @@ def parse_args(args=None): parser.add_argument("FILE_OUT", help="Output file.") return parser.parse_args(args) + def make_dir(path): if len(path) > 0: try: @@ -26,6 +26,7 @@ def make_dir(path): if exception.errno != errno.EEXIST: raise exception + def print_error(error, context="Line", context_str=""): error_str = "ERROR: Please check samplesheet -> {}".format(error) if context != "" and context_str != "": @@ -35,6 +36,7 @@ def print_error(error, context="Line", context_str=""): print(error_str) sys.exit(1) + def check_samplesheet(file_in, file_out): """ This function checks that the samplesheet follows the following structure: @@ -118,9 +120,7 @@ def check_samplesheet(file_in, file_out): num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: print_error( - "Invalid number of populated columns (minimum = {})!".format( - MIN_COLS - ), + "Invalid number of populated columns (minimum = {})!".format(MIN_COLS), "Line", line, ) @@ -183,13 +183,9 @@ def check_samplesheet(file_in, file_out): ## Auto-detect paired-end/single-end if sample and fastq_1 and fastq_2: ## Paired-end short reads sample_info.extend(["0", fastq_1, fastq_2, fasta]) - elif ( - sample and fastq_1 and not fastq_2 - ): ## Single-end short/long fastq reads + elif sample and fastq_1 and not fastq_2: ## Single-end short/long fastq reads sample_info.extend(["1", fastq_1, fastq_2, fasta]) - elif ( - sample and fasta and not fastq_1 and not fastq_2 - ): ## Single-end long reads + elif sample and fasta and not fastq_1 and not fastq_2: ## Single-end long reads sample_info.extend(["1", fastq_1, fastq_2, fasta]) elif fasta and (fastq_1 or fastq_2): print_error( From c3427e44b3a9eb198e6ef31866ee5568fa51b749 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 2 Sep 2022 12:24:29 +0200 Subject: [PATCH 10/10] Try with retries from sarek approach --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f270829..3bc0dda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,11 +55,10 @@ jobs: sudo update-locale LANG=en_US.UTF-8 - name: Run pipeline with test data - # TODO nf-core: You can customise CI pipeline run tests as required - # For example: adding multiple test runs with different parameters - # Remember that you can parallelise this by using strategy.matrix - run: | - nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results ${{ matrix.parameters }} + uses: Wandalen/wretry.action@v1.0.11 + with: + command: nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results ${{ matrix.parameters }} + attempt_limit: 3 motus: name: Test mOTUs with workflow parameters