diff --git a/conf/test_full.config b/conf/test_full.config index 966ee53..dbcca1e 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -22,6 +22,6 @@ params { nmpfams_latest_link = params.pipelines_testdata_base_path + 'proteinannotator/testdata/nmpfams/nmpfamsdb_test.hmm.gz' metagroot_latest_link = params.pipelines_testdata_base_path + 'proteinannotator/testdata/metagroot/metagroot_test.hmm.gz' // Functional annotation - interproscan_db_url = params.pipelines_testdata_base_path + 'proteinannotator/testdata/interproscan_test.tar.gz' + interproscan_db_url = params.pipelines_testdata_base_path + 'proteinannotator/testdata/interproscan/interproscan_test.tar.gz' interproscan_applications = 'Hamap,TIGRFAM,sfld' } diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index a97d0b7..9be0942 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -182,4 +182,5 @@ If you update images or graphics, follow the nf-core [style guidelines](https:// ## Pipeline specific contribution guidelines - +- When adding or modifying annotation tools, ensure that the reference database paths are parameterised in `nextflow.config` and documented in `nextflow_schema.json` — hardcoded paths are a common source of portability issues. +- Protein annotation steps can be computationally expensive; always set sensible `withLabel:` resource defaults in `conf/base.config` and test locally with a small FASTA subset before opening a PR. diff --git a/docs/output.md b/docs/output.md index 85e3439..71db3de 100644 --- a/docs/output.md +++ b/docs/output.md @@ -102,7 +102,7 @@ If the `skip_*` flags (e.g., `skip_pfam`, `skip_funfam`, `skip_nmpfams`, `skip_m Each of the `domain_annotation/` subfolders (e.g., `pfam`, `funfam`, `nmpfams`, `metagroot`) contain a `.domtbl.gz` annotation file per input sample, depending on which domain annotation databases were used in the pipeline execution. -[hmmer](https://github.com/EddyRivasLab/hmmer) is a fast and flexible alignment trimming tool that keeps phylogenetically informative sites and removes others. +[hmmer](https://github.com/EddyRivasLab/hmmer) (HMMER) is a sequence search tool that uses profile hidden Markov models (profile HMMs) to identify homologous sequences against curated databases such as Pfam, FunFam, NMPFams and metagRoot. ### Functional annotation @@ -114,7 +114,7 @@ Each of the `domain_annotation/` subfolders (e.g., `pfam`, `funfam`, `nmpfams`, - `functional_annotation/` - `interproscan/` - `/` - - `.gff`: general feature format (GFF) file + - `.gff3`: general feature format (GFF) file - `.json`: javascript object notation (JSON) file - `.tsv`: tab-separated variable (TSV) file - `.xml`: eXtensible markup language (XML) file @@ -389,18 +389,6 @@ The `s4pred` module is used to predict secondary structures of amino acid sequen Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQC. The pipeline has special steps which also allow the software versions to be reported in the MultiQC output for future traceability. For more information about how to use MultiQC reports, see . -### SeqKit stats - -
-Output files - -- `seqkit/` - - `{prefix}.tsv`: output of `seqkit stats` command on `{prefix}.fasta` input file, in tab-delimited text format. - -
- -[SeqKit stats](https://bioinf.shenwei.me/seqkit/usage/#stats) generates simple statistics for protein FASTA files, such as number of residues, minimal sequence length, average sequence length, and maximal sequence length. - ### Pipeline information
diff --git a/docs/usage.md b/docs/usage.md index e4c26bf..15daf94 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -84,9 +84,8 @@ You can also generate such `YAML`/`JSON` files via [nf-core/launch](https://nf-c [InterProScan](https://github.com/ebi-pf-team/interproscan) is used to provide more information about the proteins annotated on the contigs. By default, turning on this subworkflow without `--skip_interproscan` will download and unzip the InterPro database. The database will then be saved in the output directory `/downloaded_dbs/interproscan_db/`. We recommend keeping a copy of this directory for future reuse in case the results folder is deleted. -:::note -The large database download (5.5GB) can take up to 4 hours depending on the bandwidth. -::: +> [!NOTE] +> The large database download (5.5GB) can take up to 4 hours depending on the bandwidth. A local version of the database can be supplied to the pipeline by passing the InterProScan database directory to `--interproscan_db `. The directory can be created by running (e.g. for database version 5.72-103.0): diff --git a/modules.json b/modules.json index e4e70c6..64dec58 100644 --- a/modules.json +++ b/modules.json @@ -12,7 +12,7 @@ }, "hmmer/hmmsearch": { "branch": "master", - "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "git_sha": "a971f6723149313787b278969dcbe0fb4411bb4a", "installed_by": ["modules"] }, "interproscan": { @@ -50,11 +50,6 @@ "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["faa_seqfu_seqkit"] }, - "seqkit/stats": { - "branch": "master", - "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", - "installed_by": ["modules"] - }, "untar": { "branch": "master", "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", @@ -71,7 +66,7 @@ }, "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "git_sha": "1a545fcbd762911c21a64ced3dbef99b2b51ac75", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { @@ -81,7 +76,7 @@ }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "git_sha": "ce3424257de288c0ca25f097a68d3a289da23f12", "installed_by": ["subworkflows"] } } diff --git a/modules/nf-core/hmmer/hmmsearch/main.nf b/modules/nf-core/hmmer/hmmsearch/main.nf index de5fd15..1ac7640 100644 --- a/modules/nf-core/hmmer/hmmsearch/main.nf +++ b/modules/nf-core/hmmer/hmmsearch/main.nf @@ -15,7 +15,7 @@ process HMMER_HMMSEARCH { tuple val(meta), path('*.sto.gz') , emit: alignments , optional: true tuple val(meta), path('*.tbl.gz') , emit: target_summary, optional: true tuple val(meta), path('*.domtbl.gz'), emit: domain_summary, optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('hmmer'), eval("hmmsearch -h | sed '2!d;s/^# HMMER *//;s/ .*//'"), emit: versions_hmmer, topic: versions when: task.ext.when == null || task.ext.when @@ -42,11 +42,6 @@ process HMMER_HMMSEARCH { ${write_align ? '*.sto' : ''} \\ ${write_target ? '*.tbl' : ''} \\ ${write_domain ? '*.domtbl' : ''} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - hmmer: \$(hmmsearch -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER *//') - END_VERSIONS """ stub: @@ -61,10 +56,5 @@ process HMMER_HMMSEARCH { ${write_align ? '*.sto' : ''} \\ ${write_target ? '*.tbl' : ''} \\ ${write_domain ? '*.domtbl' : ''} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - hmmer: \$(hmmsearch -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER *//') - END_VERSIONS """ } diff --git a/modules/nf-core/hmmer/hmmsearch/meta.yml b/modules/nf-core/hmmer/hmmsearch/meta.yml index 97daa54..0bfc5ca 100644 --- a/modules/nf-core/hmmer/hmmsearch/meta.yml +++ b/modules/nf-core/hmmer/hmmsearch/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: hmmer_hmmsearch description: search profile(s) against a sequence database keywords: @@ -12,7 +13,8 @@ tools: documentation: http://hmmer.org/documentation.html tool_dev_url: https://github.com/EddyRivasLab/hmmer doi: "10.1371/journal.pcbi.1002195" - licence: ["BSD"] + licence: + - "BSD" identifier: "" input: - - meta: @@ -32,16 +34,16 @@ input: ontologies: [] - write_align: type: boolean - description: Flag to save optional alignment output. Specify with 'true' to - save. + description: Flag to save optional alignment output. Specify with 'true' + to save. - write_target: type: boolean - description: Flag to save optional per target summary. Specify with 'true' to - save. + description: Flag to save optional per target summary. Specify with 'true' + to save. - write_domain: type: boolean - description: Flag to save optional per domain summary. Specify with 'true' to - save. + description: Flag to save optional per domain summary. Specify with 'true' + to save. output: output: - - meta: @@ -62,7 +64,8 @@ output: e.g. [ id:'test', single_end:false ] - "*.sto.gz": type: file - description: Optional multiple sequence alignment (MSA) in Stockholm format + description: Optional multiple sequence alignment (MSA) in Stockholm + format pattern: "*.{sto.gz}" ontologies: [] target_summary: @@ -73,7 +76,8 @@ output: e.g. [ id:'test', single_end:false ] - "*.tbl.gz": type: file - description: Optional tabular (space-delimited) summary of per-target output + description: Optional tabular (space-delimited) summary of per-target + output pattern: "*.{tbl.gz}" ontologies: [] domain_summary: @@ -84,16 +88,31 @@ output: e.g. [ id:'test', single_end:false ] - "*.domtbl.gz": type: file - description: Optional tabular (space-delimited) summary of per-domain output + description: Optional tabular (space-delimited) summary of per-domain + output pattern: "*.{domtbl.gz}" ontologies: [] + versions_hmmer: + - - ${task.process}: + type: string + description: The name of the process + - hmmer: + type: string + description: The name of the tool + - hmmsearch -h | sed '2!d;s/^# HMMER *//;s/ .*//': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - hmmer: + type: string + description: The name of the tool + - hmmsearch -h | sed '2!d;s/^# HMMER *//;s/ .*//': + type: eval + description: The expression to obtain the version of the tool authors: - "@Midnighter" maintainers: diff --git a/modules/nf-core/hmmer/hmmsearch/tests/main.nf.test b/modules/nf-core/hmmer/hmmsearch/tests/main.nf.test index f1b59e9..14d0a7e 100644 --- a/modules/nf-core/hmmer/hmmsearch/tests/main.nf.test +++ b/modules/nf-core/hmmer/hmmsearch/tests/main.nf.test @@ -30,7 +30,7 @@ nextflow_process { assertAll( { assert process.success }, { assert path(process.out.output[0][1]).linesGzip.toString().contains('[ok]') }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() } ) } @@ -60,7 +60,7 @@ nextflow_process { { assert path(process.out.target_summary.get(0).get(1)).linesGzip.toString().contains('[ok]') }, { assert snapshot( process.out.alignments + - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } diff --git a/modules/nf-core/hmmer/hmmsearch/tests/main.nf.test.snap b/modules/nf-core/hmmer/hmmsearch/tests/main.nf.test.snap index e6b2277..a789c38 100644 --- a/modules/nf-core/hmmer/hmmsearch/tests/main.nf.test.snap +++ b/modules/nf-core/hmmer/hmmsearch/tests/main.nf.test.snap @@ -1,15 +1,21 @@ { "hmmer/hmmsearch": { "content": [ - [ - "versions.yml:md5,37393b1da5a14113d3290ab8b3b4c40f" - ] + { + "versions_hmmer": [ + [ + "HMMER_HMMSEARCH", + "hmmer", + "3.4" + ] + ] + } ], + "timestamp": "2026-05-07T12:11:28.12628", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-28T12:18:47.293093635" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "hmmer/hmmsearch - stub": { "content": [ @@ -33,7 +39,11 @@ ], "4": [ - "versions.yml:md5,37393b1da5a14113d3290ab8b3b4c40f" + [ + "HMMER_HMMSEARCH", + "hmmer", + "3.4" + ] ], "alignments": [ @@ -53,16 +63,20 @@ "target_summary": [ ], - "versions": [ - "versions.yml:md5,37393b1da5a14113d3290ab8b3b4c40f" + "versions_hmmer": [ + [ + "HMMER_HMMSEARCH", + "hmmer", + "3.4" + ] ] } ], + "timestamp": "2026-05-07T12:11:36.304424", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-28T12:18:57.862047944" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "hmmer/hmmsearch - optional - stub": { "content": [ @@ -104,7 +118,11 @@ ] ], "4": [ - "versions.yml:md5,37393b1da5a14113d3290ab8b3b4c40f" + [ + "HMMER_HMMSEARCH", + "hmmer", + "3.4" + ] ], "alignments": [ [ @@ -142,16 +160,20 @@ "test.tbl.gz:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,37393b1da5a14113d3290ab8b3b4c40f" + "versions_hmmer": [ + [ + "HMMER_HMMSEARCH", + "hmmer", + "3.4" + ] ] } ], + "timestamp": "2026-05-07T12:11:40.288705", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-28T12:19:03.49192788" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "hmmer/hmmsearch - optional": { "content": [ @@ -163,13 +185,21 @@ }, "test.sto.gz:md5,5c44c289b9e36aa1f7f3afae2005fbb7" ], - "versions.yml:md5,37393b1da5a14113d3290ab8b3b4c40f" + { + "versions_hmmer": [ + [ + "HMMER_HMMSEARCH", + "hmmer", + "3.4" + ] + ] + } ] ], + "timestamp": "2026-05-07T12:11:32.272907", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-28T12:18:52.725638562" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/seqkit/stats/environment.yml b/modules/nf-core/seqkit/stats/environment.yml deleted file mode 100644 index b26fb1e..0000000 --- a/modules/nf-core/seqkit/stats/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - conda-forge - - bioconda -dependencies: - - bioconda::seqkit=2.9.0 diff --git a/modules/nf-core/seqkit/stats/main.nf b/modules/nf-core/seqkit/stats/main.nf deleted file mode 100644 index 0935874..0000000 --- a/modules/nf-core/seqkit/stats/main.nf +++ /dev/null @@ -1,36 +0,0 @@ -process SEQKIT_STATS { - tag "${meta.id}" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container - ? 'https://depot.galaxyproject.org/singularity/seqkit:2.9.0--h9ee0642_0' - : 'quay.io/biocontainers/seqkit:2.9.0--h9ee0642_0'}" - - input: - tuple val(meta), path(reads) - - output: - tuple val(meta), path("*.tsv"), emit: stats - tuple val("${task.process}"), val('seqkit'), eval("seqkit version | sed 's/^.*v//'"), emit: versions_seqkit, topic: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '--all' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - seqkit stats \\ - --tabular \\ - --threads ${task.cpus} \\ - ${args} \\ - ${reads} > '${prefix}.tsv' - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.tsv - """ -} diff --git a/modules/nf-core/seqkit/stats/meta.yml b/modules/nf-core/seqkit/stats/meta.yml deleted file mode 100644 index 3143449..0000000 --- a/modules/nf-core/seqkit/stats/meta.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: "seqkit_stats" -description: simple statistics of FASTA/Q files -keywords: - - seqkit - - fasta - - stats -tools: - - "seqkit": - description: Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, - written by Wei Shen. - homepage: https://bioinf.shenwei.me/seqkit/usage/ - documentation: https://bioinf.shenwei.me/seqkit/usage/ - tool_dev_url: https://github.com/shenwei356/seqkit/ - doi: "10.1371/journal.pone.0163962" - licence: ["MIT"] - identifier: biotools:seqkit -input: - - - meta: - type: map - description: > - Groovy Map containing sample information e.g. [ id:'test', single_end:false - ] - - reads: - type: file - description: > - Either FASTA or FASTQ files. - pattern: "*.{fa,fna,faa,fasta,fq,fastq}[.gz]" - ontologies: - - edam: http://edamontology.org/format_1930 # FASTQ -output: - stats: - - - meta: - type: map - description: > - Groovy Map containing sample information e.g. [ id:'test', single_end:false - ] - - "*.tsv": - type: file - description: > - Tab-separated output file with basic sequence statistics. - pattern: "*.tsv" - ontologies: - - edam: http://edamontology.org/format_3475 # TSV - versions_seqkit: - - - ${task.process}: - type: string - description: The name of the process - - seqkit: - type: string - description: The name of the tool - - seqkit version | sed 's/^.*v//': - type: eval - description: The expression to obtain the version of seqkit - -topics: - versions: - - - ${task.process}: - type: string - description: The name of the process - - seqkit: - type: string - description: The name of the tool - - seqkit version | sed 's/^.*v//': - type: eval - description: The expression to obtain the version of seqkit - -authors: - - "@Midnighter" - - "@heuermh" -maintainers: - - "@Midnighter" - - "@heuermh" diff --git a/modules/nf-core/seqkit/stats/tests/main.nf.test b/modules/nf-core/seqkit/stats/tests/main.nf.test deleted file mode 100644 index 2cd4eb4..0000000 --- a/modules/nf-core/seqkit/stats/tests/main.nf.test +++ /dev/null @@ -1,141 +0,0 @@ -nextflow_process { - - name "Test Process SEQKIT_STATS" - script "../main.nf" - process "SEQKIT_STATS" - - tag "modules" - tag "modules_nfcore" - tag "seqkit" - tag "seqkit/stats" - - test("single_end") { - - when { - process { - """ - input[0] = [[ id:'test', single_end:true ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("paired_end") { - - when { - process { - """ - input[0] = [[ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("nanopore") { - - when { - process { - """ - input[0] = [[ id:'test', single_end:true ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("genome_fasta") { - - when { - process { - """ - input[0] = [[ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("transcriptome_fasta") { - - when { - process { - """ - input[0] = [[ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/transcriptome.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("single_end - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [[ id:'test', single_end:true ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/nf-core/seqkit/stats/tests/main.nf.test.snap b/modules/nf-core/seqkit/stats/tests/main.nf.test.snap deleted file mode 100644 index b83e6a6..0000000 --- a/modules/nf-core/seqkit/stats/tests/main.nf.test.snap +++ /dev/null @@ -1,260 +0,0 @@ -{ - "nanopore": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.tsv:md5,14f97a9e0414998854ead651e0e69449" - ] - ], - "1": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ], - "stats": [ - [ - { - "id": "test", - "single_end": true - }, - "test.tsv:md5,14f97a9e0414998854ead651e0e69449" - ] - ], - "versions_seqkit": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T13:29:39.937621054" - }, - "genome_fasta": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,82b33df8ec2515560b80c3d0bc64c898" - ] - ], - "1": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ], - "stats": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,82b33df8ec2515560b80c3d0bc64c898" - ] - ], - "versions_seqkit": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T13:29:45.268086738" - }, - "transcriptome_fasta": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,eef67c2e2f225391836d59d5b0d6c3b7" - ] - ], - "1": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ], - "stats": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,eef67c2e2f225391836d59d5b0d6c3b7" - ] - ], - "versions_seqkit": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T13:29:50.657274211" - }, - "single_end": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.tsv:md5,f172827a8608b646559cc39c6ca05085" - ] - ], - "1": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ], - "stats": [ - [ - { - "id": "test", - "single_end": true - }, - "test.tsv:md5,f172827a8608b646559cc39c6ca05085" - ] - ], - "versions_seqkit": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T13:29:29.264287187" - }, - "paired_end": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,f172827a8608b646559cc39c6ca05085" - ] - ], - "1": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ], - "stats": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,f172827a8608b646559cc39c6ca05085" - ] - ], - "versions_seqkit": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T13:29:34.665600897" - }, - "single_end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ], - "stats": [ - [ - { - "id": "test", - "single_end": true - }, - "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions_seqkit": [ - [ - "SEQKIT_STATS", - "seqkit", - "2.9.0" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T13:29:55.952952629" - } -} \ No newline at end of file diff --git a/nextflow_schema.json b/nextflow_schema.json index 85cd805..25cabc4 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -279,12 +279,12 @@ "type": "string", "format": "file-path", "description": "Path to an already installed NMPFams HMM database.", - "help_text": "If left null and skip_funfam is false, the pipeline will start downloading the latest FunFam HMM library." + "help_text": "If left null and skip_nmpfams is false, the pipeline will start downloading the latest NMPFams HMM library." }, "nmpfams_latest_link": { "type": "string", "default": "https://pavlopoulos-lab.org/envofams/databases/hmmer/nmpfamsdb.hmm.gz", - "description": "" + "description": "NMPFams hosted link to the latest NMPFams HMM database file." }, "skip_metagroot": { "type": "boolean", @@ -318,8 +318,7 @@ "properties": { "skip_interproscan": { "type": "boolean", - "description": "Run InterProScan", - "default": false + "description": "Skip the functional annotation with InterProScan." }, "interproscan_db_url": { "type": "string", @@ -344,7 +343,7 @@ }, "interproscan_enableprecalc": { "type": "boolean", - "help_text": "This increases the speed of functional annotation with InterProScan by pre-calculating matches found in the UniProtKB, thereby identifying unique matches in the query sequences for faster annotation. By default this is turned off.\n\nFor more information about this flag see the tool [documentation](https://interproscan-docs.readthedocs.io/en/latest/HowToRun.html).\n\n> Modifies tool parameter(s):\n> - InterProScan: `---diasable-precalc`", + "help_text": "This increases the speed of functional annotation with InterProScan by pre-calculating matches found in the UniProtKB, thereby identifying unique matches in the query sequences for faster annotation. By default this is turned off.\n\nFor more information about this flag see the tool [documentation](https://interproscan-docs.readthedocs.io/en/latest/HowToRun.html).\n\n> Modifies tool parameter(s):\n> - InterProScan: `--disable-precalc`", "description": "Pre-calculates residue mutual matches.", "fa_icon": "fas fa-clock" } diff --git a/subworkflows/local/domain_annotation/main.nf b/subworkflows/local/domain_annotation/main.nf index da683bf..130a237 100644 --- a/subworkflows/local/domain_annotation/main.nf +++ b/subworkflows/local/domain_annotation/main.nf @@ -46,7 +46,6 @@ workflow DOMAIN_ANNOTATION { .map{ meta, seqs, _meta2, models -> [meta, models, seqs, false, false, true] } HMMSEARCH_PFAM( ch_input_for_hmmsearch_pfam ) - ch_versions = ch_versions.mix( HMMSEARCH_PFAM.out.versions.first() ) ch_pfam_domains = HMMSEARCH_PFAM.out.domain_summary } @@ -65,7 +64,6 @@ workflow DOMAIN_ANNOTATION { .map{ meta, seqs, _meta2, models -> [meta, models, seqs, false, false, true] } HMMSEARCH_FUNFAM( ch_input_for_hmmsearch_funfam ) - ch_versions = ch_versions.mix( HMMSEARCH_FUNFAM.out.versions.first() ) ch_funfam_domains = HMMSEARCH_FUNFAM.out.domain_summary } @@ -84,7 +82,6 @@ workflow DOMAIN_ANNOTATION { .map{ meta, seqs, _meta2, models -> [meta, models, seqs, false, false, true] } HMMSEARCH_NMPFAMS( ch_input_for_hmmsearch_nmpfams ) - ch_versions = ch_versions.mix( HMMSEARCH_NMPFAMS.out.versions.first() ) ch_nmpfams_domains = HMMSEARCH_NMPFAMS.out.domain_summary } @@ -103,7 +100,6 @@ workflow DOMAIN_ANNOTATION { .map{ meta, seqs, _meta2, models -> [meta, models, seqs, false, false, true] } HMMSEARCH_METAGROOT( ch_input_for_hmmsearch_metagroot ) - ch_versions = ch_versions.mix( HMMSEARCH_METAGROOT.out.versions.first() ) ch_metagroot_domains = HMMSEARCH_METAGROOT.out.domain_summary } diff --git a/subworkflows/local/domain_annotation/tests/main.nf.test.snap b/subworkflows/local/domain_annotation/tests/main.nf.test.snap index 01a3c48..d5c4ad9 100644 --- a/subworkflows/local/domain_annotation/tests/main.nf.test.snap +++ b/subworkflows/local/domain_annotation/tests/main.nf.test.snap @@ -12,14 +12,10 @@ "T1024 - 408 F294204 - 387 3.8e-06 12.8 25.9 1 1 2.8e-06 5.6e-06 12.3 25.9 16 372 41 406 30 408 0.76 LmrP, , 408 residues|" ], [ - { - "DOMAIN_ANNOTATION:HMMSEARCH_METAGROOT": { - "hmmer": 3.4 - } - } + ] ], - "timestamp": "2026-05-05T12:04:06.829501961", + "timestamp": "2026-05-07T13:34:53.191301436", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -48,19 +44,10 @@ "#" ], [ - { - "DOMAIN_ANNOTATION:HMMSEARCH_FUNFAM": { - "hmmer": 3.4 - } - }, - { - "DOMAIN_ANNOTATION:HMMSEARCH_PFAM": { - "hmmer": 3.4 - } - } + ] ], - "timestamp": "2026-05-05T12:03:39.329831075", + "timestamp": "2026-05-07T13:34:20.834406599", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -79,14 +66,10 @@ "T1024 - 408 F093539 - 93 3.1e-05 11.0 0.1 1 4 1.6e-05 3.1e-05 11.0 0.1 57 75 50 68 6 75 0.82 LmrP, , 408 residues|" ], [ - { - "DOMAIN_ANNOTATION:HMMSEARCH_NMPFAMS": { - "hmmer": 3.4 - } - } + ] ], - "timestamp": "2026-05-05T12:03:56.511344799", + "timestamp": "2026-05-07T13:34:41.751903369", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -105,14 +88,10 @@ "#" ], [ - { - "DOMAIN_ANNOTATION:HMMSEARCH_PFAM": { - "hmmer": 3.4 - } - } + ] ], - "timestamp": "2026-05-05T12:03:46.249313972", + "timestamp": "2026-05-07T13:34:32.093410935", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -154,10 +133,7 @@ ] ], "4": [ - "versions.yml:md5,046e5161e3e1dff2ab111ddf4bb27331", - "versions.yml:md5,160d4c5a5001cfb4ff57b94fc52b67d9", - "versions.yml:md5,1b7d208e42364fb87160693faa4e83b9", - "versions.yml:md5,f1d8a406d3dcb97a7c15e9c810926de1" + ], "funfam_domains": [ [ @@ -192,14 +168,11 @@ ] ], "versions": [ - "versions.yml:md5,046e5161e3e1dff2ab111ddf4bb27331", - "versions.yml:md5,160d4c5a5001cfb4ff57b94fc52b67d9", - "versions.yml:md5,1b7d208e42364fb87160693faa4e83b9", - "versions.yml:md5,f1d8a406d3dcb97a7c15e9c810926de1" + ] } ], - "timestamp": "2026-05-05T12:04:18.642602538", + "timestamp": "2026-05-07T13:35:05.627943668", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/local/utils_nfcore_proteinannotator_pipeline/main.nf b/subworkflows/local/utils_nfcore_proteinannotator_pipeline/main.nf index 83a5c5c..542f1bb 100644 --- a/subworkflows/local/utils_nfcore_proteinannotator_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_proteinannotator_pipeline/main.nf @@ -87,7 +87,8 @@ workflow PIPELINE_INITIALISATION { show_hidden, before_text, after_text, - command + command, + null ) // diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index d6e593e..37939ac 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -73,11 +73,23 @@ def getWorkflowVersion() { def dumpParametersToJSON(outdir) { def timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') def filename = "params_${timestamp}.json" - def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") - def jsonStr = groovy.json.JsonOutput.toJson(params) + def temp_pf = workflow.launchDir.resolve(".${filename}") + def jsonGenerator = new groovy.json.JsonGenerator.Options() + .excludeNulls() + .addConverter(Path) { Path path -> path.toUriString() } + .addConverter(Duration) { Duration duration -> duration.toMillis() } + .addConverter(MemoryUnit) { MemoryUnit memory -> memory.toBytes() } + .addConverter(nextflow.script.types.VersionNumber) { nextflow.script.types.VersionNumber version -> version.toString() } + .build() + def jsonStr = jsonGenerator.toJson(params) temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) - - nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") + if (outdir instanceof Path) { + temp_pf.copyTo(outdir.resolve("pipeline_info/${filename}")) + } else if (outdir instanceof String) { + temp_pf.copyTo("${outdir}/pipeline_info/params_${timestamp}.json") + } else { + log.warn("Could not determine type of outdir, parameters JSON file will not be copied to output directory!") + } temp_pf.delete() } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf index 1df8b76..0d9d4e0 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/main.nf +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -22,6 +22,7 @@ workflow UTILS_NFSCHEMA_PLUGIN { before_text // string: text to show before the help message and parameters summary after_text // string: text to show after the help message and parameters summary command // string: an example command of the pipeline + cli_typecast // boolean: whether to perform typecasting of CLI parameters. Set this to `null` to use the default behaviour main: @@ -38,7 +39,7 @@ workflow UTILS_NFSCHEMA_PLUGIN { } log.info paramsHelp( help_options, - (params.help instanceof String && params.help != "true") ? params.help : "", + (help instanceof String && help != "true") ? help : "", ) exit 0 } @@ -65,6 +66,9 @@ workflow UTILS_NFSCHEMA_PLUGIN { if(parameters_schema) { validateOptions << [parametersSchema: parameters_schema] } + if(cli_typecast != null) { + validateOptions << [cliTypecast: cli_typecast] + } validateParameters(validateOptions) } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/meta.yml b/subworkflows/nf-core/utils_nfschema_plugin/meta.yml index f7d9f02..1d8c75a 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/meta.yml +++ b/subworkflows/nf-core/utils_nfschema_plugin/meta.yml @@ -25,6 +25,30 @@ input: option. When this input is empty it will automatically use the configured schema or "${projectDir}/nextflow_schema.json" as default. The schema should not be given in this way for meta pipelines. + - help: + type: boolean, string + description: | + Show the help message and exit. When a parameter name is given, show the help message for that parameter instead of the general help message. + - help_full: + type: boolean + description: Show the full help message and exit. + - show_hidden: + type: boolean + description: Show hidden parameters in the help message. + - before_text: + type: string + description: Text to show before the parameters summary and help message. + - after_text: + type: string + description: Text to show after the parameters summary and help message. + - command: + type: string + description: An example command to run the pipeline, to show in the help message and the summary. + - cli_typecast: + type: boolean + description: | + Whether to apply typecasting to the parameters given via the CLI before validation. + Set this to `null` to use the default behavior. output: - dummy_emit: type: boolean diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test index c977917..1fd1eac 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test @@ -31,6 +31,7 @@ nextflow_workflow { input[6] = "" input[7] = "" input[8] = "" + input[9] = null """ } } @@ -63,6 +64,7 @@ nextflow_workflow { input[6] = "" input[7] = "" input[8] = "" + input[9] = null """ } } @@ -95,6 +97,7 @@ nextflow_workflow { input[6] = "" input[7] = "" input[8] = "" + input[9] = null """ } } @@ -127,6 +130,7 @@ nextflow_workflow { input[6] = "" input[7] = "" input[8] = "" + input[9] = null """ } } @@ -160,6 +164,7 @@ nextflow_workflow { input[6] = "Before" input[7] = "After" input[8] = "nextflow run test/test" + input[9] = null """ } } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config index f6537cc..fd71cb8 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -1,5 +1,5 @@ plugins { - id "nf-schema@2.6.1" + id "nf-schema@2.7.2" } validation {