diff --git a/.nf-core.yml b/.nf-core.yml index c09bf94..c85db87 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,4 +1,5 @@ lint: + container_configs: false files_exist: - conf/igenomes.config - conf/igenomes_ignored.config diff --git a/conf/containers_docker_arm64.config b/conf/containers_docker_arm64.config index 7785cb1..a8db1e7 100644 --- a/conf/containers_docker_arm64.config +++ b/conf/containers_docker_arm64.config @@ -1 +1,2 @@ process { withName: 'MULTIQC' { container = 'community.wave.seqera.io/library/multiqc:1.34--d167b8012595a136' } } +process { withName: 'FALINT' { container = 'community.wave.seqera.io/library/fa-lint:1.2.0--f51af98c5c777a31'} } diff --git a/conf/containers_singularity_https_arm64.config b/conf/containers_singularity_https_arm64.config index 93071de..bf2ac33 100644 --- a/conf/containers_singularity_https_arm64.config +++ b/conf/containers_singularity_https_arm64.config @@ -1 +1,2 @@ process { withName: 'MULTIQC' { container = 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9a/9a1fec9662a152683e6fcae440d0ce20920b3b89dc62d1e3a52e73f92eba0969/data' } } +process { withName: 'FALINT' { container = 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9d/9d381ce77aaeeb2c5d7af44af33f1456498cff3a7e73625649bb633a2bb686fa/data' } } diff --git a/conf/containers_singularity_oras_arm64.config b/conf/containers_singularity_oras_arm64.config index 498ec50..27fc236 100644 --- a/conf/containers_singularity_oras_arm64.config +++ b/conf/containers_singularity_oras_arm64.config @@ -1 +1,2 @@ process { withName: 'MULTIQC' { container = 'oras://community.wave.seqera.io/library/multiqc:1.34--7fbd82d945c06726' } } +process { withName: 'FALINT' { container = 'oras://community.wave.seqera.io/library/fa-lint:1.2.0--dd5a4a2b8726afe7' } } diff --git a/conf/modules.config b/conf/modules.config index 931f57e..fd85da7 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -23,7 +23,7 @@ process { // VALIDATION OF INPUT FASTA FILES // - withName: 'FASTAVALIDATOR' { + withName: 'FALINT' { publishDir = [ enabled: false ] diff --git a/main.nf b/main.nf index 96a767b..2b25df6 100644 --- a/main.nf +++ b/main.nf @@ -58,7 +58,6 @@ workflow NFCORE_SEQSUBMIT { params.centre_name, params.upload_tpa, params.test_upload, - params.webin_cli_version, params.webincli_mode ) ch_multiqc_report = GENOMESUBMIT.out.multiqc_report @@ -73,7 +72,6 @@ workflow NFCORE_SEQSUBMIT { params.study_metadata, params.upload_tpa, params.test_upload, - params.webin_cli_version, params.webincli_mode ) ch_multiqc_report = ASSEMBLYSUBMIT.out.multiqc_report diff --git a/modules.json b/modules.json index 1f7c6fe..7dce13d 100644 --- a/modules.json +++ b/modules.json @@ -7,64 +7,63 @@ "nf-core": { "barrnap": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["modules"] }, "catpack/addnames": { "branch": "master", - "git_sha": "1100099613c12e944931426f46f10b14c4a74b3d", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["fasta_classify_catpack"] }, "catpack/bins": { "branch": "master", - "git_sha": "1100099613c12e944931426f46f10b14c4a74b3d", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["fasta_classify_catpack"] }, "catpack/contigs": { "branch": "master", - "git_sha": "1100099613c12e944931426f46f10b14c4a74b3d", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["fasta_classify_catpack"] }, "catpack/download": { "branch": "master", - "git_sha": "1100099613c12e944931426f46f10b14c4a74b3d", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["fasta_classify_catpack"] }, "catpack/prepare": { "branch": "master", - "git_sha": "1100099613c12e944931426f46f10b14c4a74b3d", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["fasta_classify_catpack"] }, "catpack/summarise": { "branch": "master", - "git_sha": "1100099613c12e944931426f46f10b14c4a74b3d", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["fasta_classify_catpack"] }, "checkm2/databasedownload": { "branch": "master", - "git_sha": "81470b59ebadb3d01dcfcd37d44f88eb890f4851", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["modules"] }, "checkm2/predict": { "branch": "master", - "git_sha": "81470b59ebadb3d01dcfcd37d44f88eb890f4851", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["modules"] }, "coverm/contig": { "branch": "master", - "git_sha": "27e31681fdbf1e511257355a236037a8cd9c2b2e", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["modules"] }, "coverm/genome": { "branch": "master", - "git_sha": "8583516e8bdf15b48539c085fea9db657e814a30", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["modules"] }, - "fastavalidator": { + "falint": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["modules"], - "patch": "modules/nf-core/fastavalidator/fastavalidator.diff" + "git_sha": "f4952081c36cd091ef1693e7f0b11d8569ae5107", + "installed_by": ["modules"] }, "find/concatenate": { "branch": "master", @@ -79,12 +78,12 @@ }, "trnascanse": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "0c739827833fdece07eb80618fd085a9a8992406", "installed_by": ["modules"] }, "untar": { "branch": "master", - "git_sha": "447f7bc0fa41dfc2400c8cad4c0291880dc060cf", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["fasta_classify_catpack"] } } @@ -99,7 +98,7 @@ }, "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "git_sha": "1a545fcbd762911c21a64ced3dbef99b2b51ac75", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { @@ -109,7 +108,7 @@ }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "git_sha": "ce3424257de288c0ca25f097a68d3a289da23f12", "installed_by": ["subworkflows"] } } diff --git a/modules/nf-core/barrnap/main.nf b/modules/nf-core/barrnap/main.nf index b99573d..a54d439 100644 --- a/modules/nf-core/barrnap/main.nf +++ b/modules/nf-core/barrnap/main.nf @@ -3,16 +3,16 @@ process BARRNAP { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/barrnap:0.9--hdfd78af_4': - 'biocontainers/barrnap:0.9--hdfd78af_4' }" + 'quay.io/biocontainers/barrnap:0.9--hdfd78af_4' }" input: tuple val(meta), path(fasta), val(dbname) output: tuple val(meta), path("*.gff"), emit: gff - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('barrnap'), eval('barrnap --version 2>&1 | sed "s/barrnap //g"'), emit: versions_barrnap, topic: versions when: task.ext.when == null || task.ext.when @@ -34,23 +34,12 @@ process BARRNAP { $input \\ > ${prefix}_${db}.gff - cat <<-END_VERSIONS > versions.yml - "${task.process}": - barrnap: \$(echo \$(barrnap --version 2>&1) | sed 's/barrnap//; s/Using.*\$//' ) - END_VERSIONS - """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" db = dbname ? "${dbname}" : 'bac' """ touch ${prefix}_${db}.gff - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - barrnap: \$(echo \$(barrnap --version 2>&1) | sed 's/barrnap//; s/Using.*\$//' ) - END_VERSIONS """ } diff --git a/modules/nf-core/barrnap/meta.yml b/modules/nf-core/barrnap/meta.yml index 94db1e7..e577728 100644 --- a/modules/nf-core/barrnap/meta.yml +++ b/modules/nf-core/barrnap/meta.yml @@ -1,6 +1,6 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "barrnap" -description: barrnap uses a hmmer profile to find rrnas in reads or contig fasta files +description: barrnap uses a hmmer profile to find rrnas in reads or contig fasta + files keywords: - rrna - sequences @@ -12,7 +12,8 @@ tools: homepage: "https://github.com/tseemann/barrnap" documentation: "https://github.com/tseemann/barrnap" tool_dev_url: "https://github.com/tseemann/barrnap" - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: biotools:barrnap input: - - meta: @@ -27,7 +28,8 @@ input: ontologies: [] - dbname: type: string - description: database to use(bacteria, archaea, eukaryota, metazoan mitochondria) + description: database to use(bacteria, archaea, eukaryota, metazoan + mitochondria) output: gff: - - meta: @@ -40,14 +42,29 @@ output: description: gff file containing coordinates of genes pattern: "*.gff" ontologies: [] + versions_barrnap: + - - ${task.process}: + type: string + description: The name of the process + - barrnap: + type: string + description: The name of the tool + - 'barrnap --version 2>&1 | sed "s/barrnap //g"': + 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 + - barrnap: + type: string + description: The name of the tool + - 'barrnap --version 2>&1 | sed "s/barrnap //g"': + type: eval + description: The expression to obtain the version of the tool authors: - "@danilodileo" + - "@srisarya" maintainers: - "@danilodileo" diff --git a/modules/nf-core/barrnap/tests/main.nf.test b/modules/nf-core/barrnap/tests/main.nf.test index b2d6216..5f13577 100644 --- a/modules/nf-core/barrnap/tests/main.nf.test +++ b/modules/nf-core/barrnap/tests/main.nf.test @@ -23,8 +23,8 @@ nextflow_process { then { assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.success }, + { assert snapshot(process.out).match() } ) } } @@ -47,11 +47,9 @@ nextflow_process { then { assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.success }, + { assert snapshot(process.out).match() } ) } } } - - diff --git a/modules/nf-core/barrnap/tests/main.nf.test.snap b/modules/nf-core/barrnap/tests/main.nf.test.snap index 0964a0d..f2273aa 100644 --- a/modules/nf-core/barrnap/tests/main.nf.test.snap +++ b/modules/nf-core/barrnap/tests/main.nf.test.snap @@ -12,7 +12,11 @@ ] ], "1": [ - "versions.yml:md5,447eafa60f76f6b84d1c41a2f5c2f76b" + [ + "BARRNAP", + "barrnap", + "0.9" + ] ], "gff": [ [ @@ -23,16 +27,20 @@ "test_bac.gff:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,447eafa60f76f6b84d1c41a2f5c2f76b" + "versions_barrnap": [ + [ + "BARRNAP", + "barrnap", + "0.9" + ] ] } ], + "timestamp": "2026-03-11T14:00:09.703068569", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.1" - }, - "timestamp": "2024-07-10T11:25:35.085998" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "barrnap": { "content": [ @@ -47,7 +55,11 @@ ] ], "1": [ - "versions.yml:md5,447eafa60f76f6b84d1c41a2f5c2f76b" + [ + "BARRNAP", + "barrnap", + "0.9" + ] ], "gff": [ [ @@ -58,15 +70,19 @@ "test_bac.gff:md5,df19e1b84ba6f691d20c72b397c88abf" ] ], - "versions": [ - "versions.yml:md5,447eafa60f76f6b84d1c41a2f5c2f76b" + "versions_barrnap": [ + [ + "BARRNAP", + "barrnap", + "0.9" + ] ] } ], + "timestamp": "2026-03-11T14:00:02.828750792", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.1" - }, - "timestamp": "2024-07-10T11:25:28.621027" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/catpack/addnames/main.nf b/modules/nf-core/catpack/addnames/main.nf index ed3cd1b..3ef95f6 100644 --- a/modules/nf-core/catpack/addnames/main.nf +++ b/modules/nf-core/catpack/addnames/main.nf @@ -3,9 +3,9 @@ process CATPACK_ADDNAMES { label 'process_single' conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cat:6.0.1--hdfd78af_1' - : 'biocontainers/cat:6.0.1--hdfd78af_1'}" + : 'quay.io/biocontainers/cat:6.0.1--hdfd78af_1'}" input: tuple val(meta), path(input) diff --git a/modules/nf-core/catpack/bins/main.nf b/modules/nf-core/catpack/bins/main.nf index d3d7239..a017e0d 100644 --- a/modules/nf-core/catpack/bins/main.nf +++ b/modules/nf-core/catpack/bins/main.nf @@ -3,9 +3,9 @@ process CATPACK_BINS { label 'process_medium' conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cat:6.0.1--hdfd78af_1' - : 'biocontainers/cat:6.0.1--hdfd78af_1'}" + : 'quay.io/biocontainers/cat:6.0.1--hdfd78af_1'}" input: tuple val(meta), path(bins, stageAs: 'bins/*') diff --git a/modules/nf-core/catpack/contigs/main.nf b/modules/nf-core/catpack/contigs/main.nf index 76c6763..a833f3b 100644 --- a/modules/nf-core/catpack/contigs/main.nf +++ b/modules/nf-core/catpack/contigs/main.nf @@ -3,9 +3,9 @@ process CATPACK_CONTIGS { label 'process_medium' conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cat:6.0.1--hdfd78af_1' - : 'biocontainers/cat:6.0.1--hdfd78af_1'}" + : 'quay.io/biocontainers/cat:6.0.1--hdfd78af_1'}" input: tuple val(meta), path(contigs) diff --git a/modules/nf-core/catpack/download/main.nf b/modules/nf-core/catpack/download/main.nf index 688ee80..ed0491b 100644 --- a/modules/nf-core/catpack/download/main.nf +++ b/modules/nf-core/catpack/download/main.nf @@ -4,9 +4,9 @@ process CATPACK_DOWNLOAD { label 'process_long' conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cat:6.0.1--hdfd78af_1' - : 'biocontainers/cat:6.0.1--hdfd78af_1'}" + : 'quay.io/biocontainers/cat:6.0.1--hdfd78af_1'}" input: tuple val(meta), val(db) diff --git a/modules/nf-core/catpack/prepare/main.nf b/modules/nf-core/catpack/prepare/main.nf index b058d96..ce0f9ba 100644 --- a/modules/nf-core/catpack/prepare/main.nf +++ b/modules/nf-core/catpack/prepare/main.nf @@ -5,9 +5,9 @@ process CATPACK_PREPARE { label 'process_high_memory' conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cat:6.0.1--hdfd78af_1' - : 'biocontainers/cat:6.0.1--hdfd78af_1'}" + : 'quay.io/biocontainers/cat:6.0.1--hdfd78af_1'}" input: tuple val(meta), path(db_fasta) diff --git a/modules/nf-core/catpack/summarise/main.nf b/modules/nf-core/catpack/summarise/main.nf index e1e977c..9ba5284 100644 --- a/modules/nf-core/catpack/summarise/main.nf +++ b/modules/nf-core/catpack/summarise/main.nf @@ -3,9 +3,9 @@ process CATPACK_SUMMARISE { label 'process_single' conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cat:6.0.1--hdfd78af_1' - : 'biocontainers/cat:6.0.1--hdfd78af_1'}" + : 'quay.io/biocontainers/cat:6.0.1--hdfd78af_1'}" input: tuple val(meta), path(classification) diff --git a/modules/nf-core/checkm2/databasedownload/main.nf b/modules/nf-core/checkm2/databasedownload/main.nf index cba54df..a91ebba 100644 --- a/modules/nf-core/checkm2/databasedownload/main.nf +++ b/modules/nf-core/checkm2/databasedownload/main.nf @@ -15,7 +15,7 @@ process CHECKM2_DATABASEDOWNLOAD { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/95/95c0d3d867f5bc805b926b08ee761a993b24062739743eb82cc56363e0f7817d/data': 'community.wave.seqera.io/library/aria2:1.37.0--3a9ec328469995dd' }" diff --git a/modules/nf-core/checkm2/predict/main.nf b/modules/nf-core/checkm2/predict/main.nf index 8645245..f5e96a9 100644 --- a/modules/nf-core/checkm2/predict/main.nf +++ b/modules/nf-core/checkm2/predict/main.nf @@ -3,7 +3,7 @@ process CHECKM2_PREDICT { label 'process_medium' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/0a/0af812c983aeffc99c0fca9ed2c910816b2ddb9a9d0dcad7b87dab0c9c08a16f/data': 'community.wave.seqera.io/library/checkm2:1.1.0--60f287bc25d7a10d' }" diff --git a/modules/nf-core/coverm/contig/main.nf b/modules/nf-core/coverm/contig/main.nf index 884a67a..fc580ed 100644 --- a/modules/nf-core/coverm/contig/main.nf +++ b/modules/nf-core/coverm/contig/main.nf @@ -3,29 +3,33 @@ process COVERM_CONTIG { label "process_medium" conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/coverm:0.7.0--hcb7b614_4' : - 'biocontainers/coverm:0.7.0--hcb7b614_4' }" + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/c4/c4402aed2ff8bd062a013369c9049e68bdd159e849b271a227a8ce2727e941e1/data' + : 'community.wave.seqera.io/library/coverm:0.7.0--c57cbb9db4d660fb'}" input: tuple val(meta), path(input) tuple val(meta2), path(reference) val bam_input val interleaved + val enable_bam_output output: - tuple val(meta), path("*.depth.txt"), emit: coverage - path "versions.yml" , emit: versions + tuple val(meta), path('*.depth.tsv'), emit: coverage + tuple val(meta), path('*.bam') , emit: bam, optional: true + tuple val("${task.process}"), val('coverm'), eval('coverm --version | sed "s/coverm //"'), emit: versions_coverm, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: "" - def prefix = task.ext.prefix ?: "${meta.id}" - def fastq_input = meta.single_end ? "--single" : interleaved ? "--interleaved" : "--coupled" - def input_type = bam_input ? "--bam-files" : "${fastq_input}" - def reference_str = bam_input ? "" : "--reference ${reference}" + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + def fastq_input = meta.single_end ? "--single" : interleaved ? "--interleaved" : "--coupled" + def input_type = bam_input ? "--bam-files" : "${fastq_input}" + + def reference_str = bam_input ? "" : "--reference ${reference}" + def bam_output_str = enable_bam_output ? "--bam-file-cache-directory _bam_cache/" : "" """ TMPDIR=. @@ -33,23 +37,17 @@ process COVERM_CONTIG { --threads ${task.cpus} \\ ${input_type} ${input} \\ ${reference_str} \\ + ${bam_output_str} \\ ${args} \\ - --output-file ${prefix}.depth.txt + --output-file ${prefix}.depth.tsv - cat <<-END_VERSIONS > versions.yml - "${task.process}": - coverm: \$(coverm --version | sed 's/coverm //') - END_VERSIONS + mv _bam_cache/*.bam . || true """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.depth.txt - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - coverm: \$(coverm --version | sed 's/coverm //') - END_VERSIONS + touch ${prefix}.depth.tsv + touch ${prefix}.bam """ } diff --git a/modules/nf-core/coverm/contig/meta.yml b/modules/nf-core/coverm/contig/meta.yml index d738299..52916bf 100644 --- a/modules/nf-core/coverm/contig/meta.yml +++ b/modules/nf-core/coverm/contig/meta.yml @@ -23,7 +23,6 @@ input: description: | Groovy Map containing sample information e.g. `[ id:'sample1', single_end:false ]` - - input: type: file description: | @@ -32,6 +31,8 @@ input: pattern: "*.{fa,fq,fa.gz,fq.gz,bam}" ontologies: - edam: http://edamontology.org/format_1930 # FASTQ + - edam: http://edamontology.org/format_2572 # BAM + - - meta2: type: map description: | @@ -40,11 +41,13 @@ input: - reference: type: file - description: Reference FASTA file to map reads to, or minimap2/strobealign index. + description: | + Reference FASTA file to map reads to, or minimap2/strobealign index. Not required if using BAM input. pattern: "*.{fasta,fasta.gz,mmi,sti}" + ontologies: + - edam: http://edamontology.org/format_1929 # FASTA - ontologies: [] - bam_input: type: boolean description: True if input is bam files @@ -53,27 +56,60 @@ input: type: boolean description: True if input is interleaved fastq file + - enable_bam_output: + type: boolean + description: True to enable BAM output of aligned reads + output: coverage: - - meta: type: map description: | Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - pattern: "*.depths.{txt}" - - "*.depth.txt": + e.g. `[ id:'sample1' ]` + - "*.depth.tsv": + type: file + description: Tab-delimited file containing coverage information for each contig and sample. + pattern: "*.depth.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + + bam: + - - meta: type: map description: | Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - pattern: "*.depths.{txt}" + e.g. `[ id:'sample1' ]` + - "*.bam": + type: file + description: BAM file containing aligned reads. + pattern: "*.bam" + ontologies: + - edam: http://edamontology.org/format_2572 # BAM + + versions_coverm: + - - ${task.process}: + type: string + description: The process the versions were collected from + - coverm: + type: string + description: The tool name + - 'coverm --version | sed "s/coverm //"': + type: string + description: Command used to collect the version + +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 process the versions were collected from + - coverm: + type: string + description: The tool name + - 'coverm --version | sed "s/coverm //"': + type: string + description: Command used to collect the version + authors: - "@prototaxites" maintainers: diff --git a/modules/nf-core/coverm/contig/tests/main.nf.test b/modules/nf-core/coverm/contig/tests/main.nf.test index 845068c..72956dc 100644 --- a/modules/nf-core/coverm/contig/tests/main.nf.test +++ b/modules/nf-core/coverm/contig/tests/main.nf.test @@ -15,7 +15,7 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map [ file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_2.fastq.gz', checkIfExists: true), @@ -29,6 +29,7 @@ nextflow_process { ] input[2] = false input[3] = false + input[4] = true """ } } @@ -36,7 +37,16 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.coverage, + process.out.bam.collect { meta, bam_files -> + [ + meta, + bam_files.collect { file -> bam(file).getReadsMD5() } + ] + }, + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } ) } @@ -48,9 +58,11 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/bam/test1.sorted.bam', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/bam/test2.sorted.bam', checkIfExists: true) + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/bam/test1.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/bam/test2.sorted.bam', checkIfExists: true) + ] ] input[1] = [ [], @@ -58,6 +70,7 @@ nextflow_process { ] input[2] = true input[3] = false + input[4] = false """ } } @@ -65,7 +78,16 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.coverage, + process.out.bam.collect { meta, bam_files -> + [ + meta, + bam_files.collect { file -> bam(file).getReadsMD5() } + ] + }, + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } ) } @@ -79,7 +101,7 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map [ file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_2.fastq.gz', checkIfExists: true), @@ -91,6 +113,7 @@ nextflow_process { ] input[2] = false input[3] = false + input[4] = false """ } } @@ -98,7 +121,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } diff --git a/modules/nf-core/coverm/contig/tests/main.nf.test.snap b/modules/nf-core/coverm/contig/tests/main.nf.test.snap index 0b7ef09..fdad64f 100644 --- a/modules/nf-core/coverm/contig/tests/main.nf.test.snap +++ b/modules/nf-core/coverm/contig/tests/main.nf.test.snap @@ -2,106 +2,101 @@ "coverm_contig - stub": { "content": [ { - "0": [ + "bam": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test.depth.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "1": [ - "versions.yml:md5,c430e2f31175deec3a7e349f635e881b" - ], "coverage": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test.depth.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.depth.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,c430e2f31175deec3a7e349f635e881b" + "versions_coverm": [ + [ + "COVERM_CONTIG", + "coverm", + "0.7.0" + ] ] } ], + "timestamp": "2026-04-02T10:53:47.190379429", "meta": { - "nf-test": "0.9.1", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-08T10:22:23.71903442" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "coverm_contig - fastq": { "content": [ - { - "0": [ + [ + [ + { + "id": "test" + }, + "test.depth.tsv:md5,2d68cbaf0dc3c88a024197386a68d71d" + ] + ], + [ + [ + { + "id": "test" + }, [ - { - "id": "test", - "single_end": false - }, - "test.depth.txt:md5,2d68cbaf0dc3c88a024197386a68d71d" + "edb6d55735486ce7c8821fcb0e65610d", + "910bd83216afed9a16f12fdfc074366b" ] - ], - "1": [ - "versions.yml:md5,c430e2f31175deec3a7e349f635e881b" - ], - "coverage": [ + ] + ], + { + "versions_coverm": [ [ - { - "id": "test", - "single_end": false - }, - "test.depth.txt:md5,2d68cbaf0dc3c88a024197386a68d71d" + "COVERM_CONTIG", + "coverm", + "0.7.0" ] - ], - "versions": [ - "versions.yml:md5,c430e2f31175deec3a7e349f635e881b" ] } ], + "timestamp": "2026-04-02T11:07:06.514853746", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-07-25T14:35:02.975504442" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "coverm_contig - bam": { "content": [ + [ + [ + { + "id": "test" + }, + "test.depth.tsv:md5,8e97198137f9ab7bdca3124f3e544438" + ] + ], + [ + + ], { - "0": [ + "versions_coverm": [ [ - { - "id": "test", - "single_end": false - }, - "test.depth.txt:md5,e62a5d74dbb62d1ef9f52c12d9a8dcb2" + "COVERM_CONTIG", + "coverm", + "0.7.0" ] - ], - "1": [ - "versions.yml:md5,c430e2f31175deec3a7e349f635e881b" - ], - "coverage": [ - [ - { - "id": "test", - "single_end": false - }, - "test.depth.txt:md5,e62a5d74dbb62d1ef9f52c12d9a8dcb2" - ] - ], - "versions": [ - "versions.yml:md5,c430e2f31175deec3a7e349f635e881b" ] } ], + "timestamp": "2026-04-02T10:27:15.239379143", "meta": { - "nf-test": "0.9.1", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-08T10:22:12.710853713" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/coverm/genome/main.nf b/modules/nf-core/coverm/genome/main.nf index 3d9a829..2ac785f 100644 --- a/modules/nf-core/coverm/genome/main.nf +++ b/modules/nf-core/coverm/genome/main.nf @@ -3,27 +3,29 @@ process COVERM_GENOME { label "process_medium" conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/coverm:0.7.0--hcb7b614_4' : - 'biocontainers/coverm:0.7.0--hcb7b614_4' }" + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/c4/c4402aed2ff8bd062a013369c9049e68bdd159e849b271a227a8ce2727e941e1/data' + : 'community.wave.seqera.io/library/coverm:0.7.0--c57cbb9db4d660fb'}" input: tuple val(meta), path(input) tuple val(meta2), path(reference) val bam_input val interleaved - val ref_mode // "dir" | "file" | "auto" + val ref_mode + val enable_bam_output output: - tuple val(meta), path("*.tsv"), emit: coverage - path "versions.yml" , emit: versions + tuple val(meta), path('*.depth.tsv'), emit: coverage + tuple val(meta), path('*.bam') , emit: bam, optional: true + tuple val("${task.process}"), val('coverm'), eval("coverm --version | sed 's/coverm //'"), emit: versions_coverm, topic: versions when: task.ext.when == null || task.ext.when script: - def _ref_mode = ref_mode ?: 'auto' - def _allowed = ['dir','file','auto'] + def _ref_mode = ref_mode ?: 'auto' + def _allowed = ['dir', 'file', 'auto'] assert _allowed.contains(_ref_mode) : "Invalid ref_mode='${_ref_mode}'. Allowed: ${_allowed.join(', ')}" def args = task.ext.args ?: "" @@ -31,11 +33,10 @@ process COVERM_GENOME { def fastq_input = meta.single_end ? "--single" : interleaved ? "--interleaved" : "--coupled" def input_type = bam_input ? "--bam-files" : "${fastq_input}" - def reference_str = ( - _ref_mode == 'dir' || (_ref_mode == 'auto' && reference.isDirectory()) - ) ? "--genome-fasta-directory ${reference}" - : "--genome-fasta-files ${reference}" - + def reference_str = _ref_mode == 'dir' || (_ref_mode == 'auto' && reference.isDirectory()) + ? "--genome-fasta-directory ${reference}" + : "--genome-fasta-files ${reference}" + def bam_output_str = enable_bam_output ? "--bam-file-cache-directory _bam_cache/" : "" """ TMPDIR=. @@ -43,23 +44,17 @@ process COVERM_GENOME { --threads ${task.cpus} \\ ${input_type} ${input} \\ ${reference_str} \\ + ${bam_output_str} \\ ${args} \\ - --output-file ${prefix}.tsv + --output-file ${prefix}.depth.tsv - cat <<-END_VERSIONS > versions.yml - "${task.process}": - coverm: \$(coverm --version | sed 's/coverm //') - END_VERSIONS + mv _bam_cache/*.bam . || true """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.tsv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - coverm: \$(coverm --version | sed 's/coverm //') - END_VERSIONS + touch ${prefix}.depth.tsv + touch ${prefix}.bam """ } diff --git a/modules/nf-core/coverm/genome/meta.yml b/modules/nf-core/coverm/genome/meta.yml index 2891fa5..a1861d4 100644 --- a/modules/nf-core/coverm/genome/meta.yml +++ b/modules/nf-core/coverm/genome/meta.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "coverm_genome" description: Calculate read coverage per-genome keywords: @@ -14,16 +13,15 @@ tools: documentation: "https://wwood.github.io/CoverM/coverm-contig.html" tool_dev_url: "https://github.com/wwood/CoverM" doi: "10.5281/zenodo.10531253" - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: biotools:coverm - input: - - meta: type: map description: | Groovy Map containing sample information e.g. `[ id:'sample1', single_end:false ]` - - input: type: file description: | @@ -33,15 +31,16 @@ input: ontologies: - edam: http://edamontology.org/format_1930 # FASTQ - edam: http://edamontology.org/format_2572 # BAM + - - meta2: type: map description: | Groovy Map containing reference information e.g. `[ id:'sample1', single_end:false ]` - - reference: type: file - description: Genome FASTA file(s) to map reads to, or a directory containing genome FASTA files. + description: Genome FASTA file(s) to map reads to, or a directory + containing genome FASTA files. pattern: "*.{fasta,fasta.gz,mmi,sti,fna,fna.gz,fa,fa.gz}" ontologies: - edam: http://edamontology.org/format_1929 # FASTA @@ -64,6 +63,10 @@ input: Defaults to `"auto"` if not provided. pattern: "^(dir|file|auto)$" + - enable_bam_output: + type: boolean + description: True to enable BAM output of aligned reads + output: coverage: - - meta: @@ -71,21 +74,49 @@ output: description: | Groovy Map containing sample information e.g. `[ id:'sample1', single_end:false ]` - - "*.tsv": + - "*.depth.tsv": + type: map + description: Tab-delimited file containing coverage information for each contig and sample. + pattern: "*.depth.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + + bam: + - - meta: type: map description: | Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - pattern: "*.{tsv}" + e.g. `[ id:'sample1' ]` + - "*.bam": + type: file + description: BAM file containing aligned reads. + pattern: "*.bam" ontologies: - - edam: http://edamontology.org/format_3475 # TSV + - edam: http://edamontology.org/format_2572 # BAM + + versions_coverm: + - - ${task.process}: + type: string + description: The name of the process + - coverm: + type: string + description: The name of the tool + - coverm --version | sed 's/coverm //': + 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 + - coverm: + type: string + description: The name of the tool + - coverm --version | sed 's/coverm //': + type: eval + description: The expression to obtain the version of the tool + authors: - "@vinisalazar" maintainers: diff --git a/modules/nf-core/coverm/genome/tests/main.nf.test b/modules/nf-core/coverm/genome/tests/main.nf.test index 21ebba2..d12f043 100644 --- a/modules/nf-core/coverm/genome/tests/main.nf.test +++ b/modules/nf-core/coverm/genome/tests/main.nf.test @@ -31,6 +31,7 @@ nextflow_process { input[2] = false input[3] = false input[4] = 'file' + input[5] = true """ } } @@ -38,7 +39,16 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.coverage, + process.out.bam.collect { meta, bam_files -> + [ + meta, + bam_files.collect { file -> bam(file).getReadsMD5() } + ] + }, + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } ) } @@ -63,6 +73,7 @@ nextflow_process { input[2] = true input[3] = false input[4] = '' + input[5] = false """ } } @@ -70,7 +81,16 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.coverage, + process.out.bam.collect { meta, bam_files -> + [ + meta, + bam_files.collect { file -> bam(file).getReadsMD5() } + ] + }, + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } ) } @@ -105,6 +125,7 @@ nextflow_process { input[2] = false input[3] = false input[4] = 'dir' + input[5] = false """ } } @@ -112,7 +133,16 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.coverage, + process.out.bam.collect { meta, bam_files -> + [ + meta, + bam_files.collect { file -> bam(file).getReadsMD5() } + ] + }, + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } ) } } @@ -136,6 +166,7 @@ nextflow_process { input[2] = false input[3] = false input[4] = 'not_a_valid_mode' + input[5] = false """ } } @@ -169,6 +200,7 @@ nextflow_process { input[2] = false input[3] = false input[4] = '' + input[5] = false """ } } @@ -176,7 +208,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } diff --git a/modules/nf-core/coverm/genome/tests/main.nf.test.snap b/modules/nf-core/coverm/genome/tests/main.nf.test.snap index 61ae6dd..2b9053a 100644 --- a/modules/nf-core/coverm/genome/tests/main.nf.test.snap +++ b/modules/nf-core/coverm/genome/tests/main.nf.test.snap @@ -1,142 +1,137 @@ { "coverm_genome - bam": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.depth.tsv:md5,60ac75e5dce5da12263fbeea80f9c7fa" + ] + ], + [ + + ], { - "0": [ + "versions_coverm": [ [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,60ac75e5dce5da12263fbeea80f9c7fa" + "COVERM_GENOME", + "coverm", + "0.7.0" ] - ], - "1": [ - "versions.yml:md5,dae5063ea283765643d819100103ae65" - ], - "coverage": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,60ac75e5dce5da12263fbeea80f9c7fa" - ] - ], - "versions": [ - "versions.yml:md5,dae5063ea283765643d819100103ae65" ] } ], + "timestamp": "2026-04-02T10:28:19.627971102", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-08-15T09:56:48.526382" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "coverm_genome - stub": { "content": [ { - "0": [ + "bam": [ [ { "id": "test", "single_end": false }, - "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "1": [ - "versions.yml:md5,dae5063ea283765643d819100103ae65" - ], "coverage": [ [ { "id": "test", "single_end": false }, - "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.depth.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,dae5063ea283765643d819100103ae65" + "versions_coverm": [ + [ + "COVERM_GENOME", + "coverm", + "0.7.0" + ] ] } ], + "timestamp": "2026-04-02T10:54:14.006866415", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-08-13T12:13:46.530094" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "coverm_genome - directory": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.depth.tsv:md5,70b9ad4a4d90d9c6eb0ef4b52adaf636" + ] + ], + [ + + ], { - "0": [ + "versions_coverm": [ [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,70b9ad4a4d90d9c6eb0ef4b52adaf636" + "COVERM_GENOME", + "coverm", + "0.7.0" ] - ], - "1": [ - "versions.yml:md5,dae5063ea283765643d819100103ae65" - ], - "coverage": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,70b9ad4a4d90d9c6eb0ef4b52adaf636" - ] - ], - "versions": [ - "versions.yml:md5,dae5063ea283765643d819100103ae65" ] } ], + "timestamp": "2026-04-02T10:28:30.762759915", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-08-15T09:57:01.240803" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "coverm_genome - fastq": { "content": [ - { - "0": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.depth.tsv:md5,c16918076fbb85545cd0f29a228cb54f" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,c16918076fbb85545cd0f29a228cb54f" + "edb6d55735486ce7c8821fcb0e65610d", + "910bd83216afed9a16f12fdfc074366b" ] - ], - "1": [ - "versions.yml:md5,dae5063ea283765643d819100103ae65" - ], - "coverage": [ + ] + ], + { + "versions_coverm": [ [ - { - "id": "test", - "single_end": false - }, - "test.tsv:md5,c16918076fbb85545cd0f29a228cb54f" + "COVERM_GENOME", + "coverm", + "0.7.0" ] - ], - "versions": [ - "versions.yml:md5,dae5063ea283765643d819100103ae65" ] } ], + "timestamp": "2026-04-02T11:07:20.557765951", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-08-15T09:56:44.561425" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/fastavalidator/environment.yml b/modules/nf-core/falint/environment.yml similarity index 82% rename from modules/nf-core/fastavalidator/environment.yml rename to modules/nf-core/falint/environment.yml index effc5be..a0c5a75 100644 --- a/modules/nf-core/fastavalidator/environment.yml +++ b/modules/nf-core/falint/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::py_fasta_validator=0.6 + - bioconda::fa-lint=1.2.0 diff --git a/modules/nf-core/falint/main.nf b/modules/nf-core/falint/main.nf new file mode 100644 index 0000000..ec41d05 --- /dev/null +++ b/modules/nf-core/falint/main.nf @@ -0,0 +1,50 @@ +process FALINT { + tag "$meta.id" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/fa-lint:1.2.0--he881be0_0': + 'quay.io/biocontainers/fa-lint:1.2.0--he881be0_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path('*.success.log') , emit: success_log , optional: true + tuple val(meta), path('*.error.log') , emit: error_log , optional: true + tuple val("${task.process}"), val('falint'), eval('fa-lint --version'), emit: versions_falint, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + """ + fa-lint \\ + -threads ${task.cpus} \\ + $args \\ + -fasta $fasta \\ + > >(tee ${prefix}.success.log >&1) \\ + 2> >(tee ${prefix}.error.log >&2) \\ + || echo "Errors from fa-lint printed to ${prefix}.error.log" + + if [ \$(cat ${prefix}.error.log | wc -l) -gt 0 ]; then + echo "Validation failed..." + + rm ${prefix}.success.log + else + echo "Validation successful..." + + rm ${prefix}.error.log + fi + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + echo "Fasta is valid: $fasta" \\ + > "${prefix}.success.log" + """ +} diff --git a/modules/nf-core/falint/meta.yml b/modules/nf-core/falint/meta.yml new file mode 100644 index 0000000..0ed1b64 --- /dev/null +++ b/modules/nf-core/falint/meta.yml @@ -0,0 +1,74 @@ +name: "falint" +description: A fasta linter/validator +keywords: + - fasta + - validation + - genome +tools: + - "falint": + description: "A Fasta linter/validator" + homepage: "https://github.com/GallVp/fa-lint" + documentation: "https://github.com/GallVp/fa-lint" + tool_dev_url: "https://github.com/GallVp/fa-lint" + licence: + - "MIT" + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing file information + e.g. [ id:'test' ] + - fasta: + type: file + description: Input fasta file + pattern: "*.fasta" + ontologies: [] +output: + success_log: + - - meta: + type: map + description: | + Groovy Map containing file information + e.g. [ id:'test' ] + - "*.success.log": + type: file + description: Log file for successful validation + pattern: "*.success.log" + ontologies: [] + error_log: + - - meta: + type: map + description: | + Groovy Map containing file information + e.g. [ id:'test' ] + - "*.error.log": + type: file + description: Log file for failed validation + pattern: "*.error.log" + ontologies: [] + versions_falint: + - - ${task.process}: + type: string + description: The name of the process + - falint: + type: string + description: The name of the tool + - fa-lint --version: + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - falint: + type: string + description: The name of the tool + - fa-lint --version: + type: eval + description: The expression to obtain the version of the tool +authors: + - "@gallvp" +maintainers: + - "@gallvp" diff --git a/modules/nf-core/fastavalidator/tests/main.nf.test b/modules/nf-core/falint/tests/main.nf.test similarity index 58% rename from modules/nf-core/fastavalidator/tests/main.nf.test rename to modules/nf-core/falint/tests/main.nf.test index d1c5a59..bab7079 100644 --- a/modules/nf-core/fastavalidator/tests/main.nf.test +++ b/modules/nf-core/falint/tests/main.nf.test @@ -1,12 +1,12 @@ nextflow_process { - name "Test Process FASTAVALIDATOR" + name "Test Process FALINT" script "../main.nf" - process "FASTAVALIDATOR" + process "FALINT" tag "modules" tag "modules_nfcore" - tag "fastavalidator" + tag "falint" test("sarscov2-fasta-valid") { @@ -17,7 +17,6 @@ nextflow_process { [ id:'test', single_end:false ], // meta map file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] - input[1] = false // is_metagenome flag """ } } @@ -25,25 +24,23 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.success_log != null }, - { assert process.out.error_log == [] }, - { assert path(process.out.success_log.get(0).get(1)).getText().contains("Validation successful...") } + { assert snapshot(process.out).match() } ) } } - test("sarscov2-gff3-invalid") { + test("sarscov2-fasta-valid-stub") { + + options '-stub' when { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] - input[1] = false // is_metagenome flag """ } } @@ -51,25 +48,21 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.success_log == [] }, - { assert process.out.error_log != null }, - { assert path(process.out.error_log.get(0).get(1)).getText().contains("genome.gff3 does not start with a >") } + { assert snapshot(process.out).match() } ) } } - test("number-contigs-invalid") { + test("sarscov2-gff3-invalid") { when { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) ] - input[1] = true // is_metagenome flag """ } } @@ -77,10 +70,9 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }).match() }, { assert process.out.success_log == [] }, - { assert process.out.error_log != null }, - { assert path(process.out.error_log.get(0).get(1)).getText().contains("[ERROR] More than one contig required.") } + { assert file(process.out.error_log[0][1]).text.contains('Fasta file must start with a header line') } ) } diff --git a/modules/nf-core/falint/tests/main.nf.test.snap b/modules/nf-core/falint/tests/main.nf.test.snap new file mode 100644 index 0000000..23fc49f --- /dev/null +++ b/modules/nf-core/falint/tests/main.nf.test.snap @@ -0,0 +1,118 @@ +{ + "sarscov2-fasta-valid": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.success.log:md5,7b9802635c4f44d1711e7132ccdb648e" + ] + ], + "1": [ + + ], + "2": [ + [ + "FALINT", + "falint", + "1.2.0" + ] + ], + "error_log": [ + + ], + "success_log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.success.log:md5,7b9802635c4f44d1711e7132ccdb648e" + ] + ], + "versions_falint": [ + [ + "FALINT", + "falint", + "1.2.0" + ] + ] + } + ], + "timestamp": "2026-04-28T11:40:23.744262", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.0" + } + }, + "sarscov2-gff3-invalid": { + "content": [ + { + "versions_falint": [ + [ + "FALINT", + "falint", + "1.2.0" + ] + ] + } + ], + "timestamp": "2026-04-28T11:40:32.277751", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.0" + } + }, + "sarscov2-fasta-valid-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.success.log:md5,7b9802635c4f44d1711e7132ccdb648e" + ] + ], + "1": [ + + ], + "2": [ + [ + "FALINT", + "falint", + "1.2.0" + ] + ], + "error_log": [ + + ], + "success_log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.success.log:md5,7b9802635c4f44d1711e7132ccdb648e" + ] + ], + "versions_falint": [ + [ + "FALINT", + "falint", + "1.2.0" + ] + ] + } + ], + "timestamp": "2026-04-28T11:40:28.13947", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.0" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/fastavalidator/fastavalidator.diff b/modules/nf-core/fastavalidator/fastavalidator.diff deleted file mode 100644 index 8575327..0000000 --- a/modules/nf-core/fastavalidator/fastavalidator.diff +++ /dev/null @@ -1,188 +0,0 @@ -Changes in component 'nf-core/fastavalidator' -'modules/nf-core/fastavalidator/environment.yml' is unchanged -Changes in 'fastavalidator/meta.yml': ---- modules/nf-core/fastavalidator/meta.yml -+++ modules/nf-core/fastavalidator/meta.yml -@@ -30,6 +30,9 @@ - description: Input fasta file - pattern: "*.fasta" - ontologies: [] -+ - - count_contigs: -+ type: boolean -+ description: Enables number of contigs check (ENA requires more than 1 contig for a contig-level assembly submission) - output: - success_log: - - - meta: - -Changes in 'fastavalidator/main.nf': ---- modules/nf-core/fastavalidator/main.nf -+++ modules/nf-core/fastavalidator/main.nf -@@ -9,11 +9,12 @@ - - input: - tuple val(meta), path(fasta) -+ val(count_contigs) - - output: -- tuple val(meta), path('*.success.log') , emit: success_log , optional: true -- tuple val(meta), path('*.error.log') , emit: error_log , optional: true -- path "versions.yml" , emit: versions -+ tuple val(meta), path('*.success.log'), emit: success_log , optional: true -+ tuple val(meta), path('*.error.log') , emit: error_log , optional: true -+ path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when -@@ -21,10 +22,32 @@ - script: - def prefix = task.ext.prefix ?: "${meta.id}" - """ -+ # Ensure *.error.log file exists to append to, even if py_fasta_validator doesn't produce any errors -+ touch "${prefix}.error.log" -+ - py_fasta_validator \\ - -f $fasta \\ -- 2> "${prefix}.error.log" \\ -+ 2>> "${prefix}.error.log" \\ - || echo "Errors from fasta_validate printed to ${prefix}.error.log" -+ -+ # One more check: count contigs. More than 1 contig required. -+ echo "[INFO] Checking contig count..." -+ -+ if [ "${count_contigs}" = true ]; then -+ if [[ "${fasta}" == *.gz ]]; then -+ CONTIGS=\$(zcat "${fasta}" | grep -c '^>') -+ else -+ CONTIGS=\$(grep -c '^>' "${fasta}") -+ fi -+ -+ echo "[INFO] Contigs detected: \${CONTIGS}" -+ -+ if [ "\${CONTIGS}" -lt 2 ]; then -+ echo "[ERROR] Assembly has \${CONTIGS} contig(s)." >> "${prefix}.error.log" -+ echo "[ERROR] More than one contig required." >> "${prefix}.error.log" -+ fi -+ -+ fi - - if [ \$(cat "${prefix}.error.log" | wc -l) -gt 0 ]; then - echo "Validation failed..." - -Changes in 'fastavalidator/tests/main.nf.test.snap': ---- modules/nf-core/fastavalidator/tests/main.nf.test.snap -+++ modules/nf-core/fastavalidator/tests/main.nf.test.snap -@@ -34,6 +34,10 @@ - ] - } - ], -+ "meta": { -+ "nf-test": "0.9.3", -+ "nextflow": "25.10.0" -+ }, - "timestamp": "2023-11-28T11:23:25.106872" - }, - "sarscov2-gff3-invalid": { -@@ -71,6 +75,51 @@ - ] - } - ], -+ "meta": { -+ "nf-test": "0.9.3", -+ "nextflow": "25.10.0" -+ }, - "timestamp": "2023-11-28T11:23:29.40324" -+ }, -+ "number-contigs-invalid": { -+ "content": [ -+ { -+ "0": [ -+ -+ ], -+ "1": [ -+ [ -+ { -+ "id": "test", -+ "single_end": false -+ }, -+ "test.error.log:md5,772091b11ff0a7378e9e7d2abd993f5a" -+ ] -+ ], -+ "2": [ -+ "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" -+ ], -+ "error_log": [ -+ [ -+ { -+ "id": "test", -+ "single_end": false -+ }, -+ "test.error.log:md5,772091b11ff0a7378e9e7d2abd993f5a" -+ ] -+ ], -+ "success_log": [ -+ -+ ], -+ "versions": [ -+ "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" -+ ] -+ } -+ ], -+ "meta": { -+ "nf-test": "0.9.0", -+ "nextflow": "25.04.1" -+ }, -+ "timestamp": "2025-10-29T12:03:33.964183" - } - } -Changes in 'fastavalidator/tests/main.nf.test': ---- modules/nf-core/fastavalidator/tests/main.nf.test -+++ modules/nf-core/fastavalidator/tests/main.nf.test -@@ -17,6 +17,7 @@ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] -+ input[1] = false // is_metagenome flag - """ - } - } -@@ -42,6 +43,7 @@ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] -+ input[1] = false // is_metagenome flag - """ - } - } -@@ -57,4 +59,30 @@ - } - - } -+ -+ test("number-contigs-invalid") { -+ -+ when { -+ process { -+ """ -+ input[0] = [ -+ [ id:'test', single_end:false ], // meta map -+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) -+ ] -+ input[1] = true // is_metagenome flag -+ """ -+ } -+ } -+ -+ then { -+ assertAll( -+ { assert process.success }, -+ { assert snapshot(process.out).match() }, -+ { assert process.out.success_log == [] }, -+ { assert process.out.error_log != null }, -+ { assert path(process.out.error_log.get(0).get(1)).getText().contains("[ERROR] More than one contig required.") } -+ ) -+ } -+ -+ } - } - -************************************************************ diff --git a/modules/nf-core/fastavalidator/main.nf b/modules/nf-core/fastavalidator/main.nf deleted file mode 100644 index c662fc9..0000000 --- a/modules/nf-core/fastavalidator/main.nf +++ /dev/null @@ -1,85 +0,0 @@ -process FASTAVALIDATOR { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/py_fasta_validator:0.6--py37h595c7a6_0': - 'biocontainers/py_fasta_validator:0.6--py37h595c7a6_0' }" - - input: - tuple val(meta), path(fasta) - val(count_contigs) - - output: - tuple val(meta), path('*.success.log'), emit: success_log , optional: true - tuple val(meta), path('*.error.log') , emit: error_log , optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - # Ensure *.error.log file exists to append to, even if py_fasta_validator doesn't produce any errors - touch "${prefix}.error.log" - - py_fasta_validator \\ - -f $fasta \\ - 2>> "${prefix}.error.log" \\ - || echo "Errors from fasta_validate printed to ${prefix}.error.log" - - # One more check: count contigs. More than 1 contig required. - echo "[INFO] Checking contig count..." - - if [ "${count_contigs}" = true ]; then - if [[ "${fasta}" == *.gz ]]; then - CONTIGS=\$(zcat "${fasta}" | grep -c '^>') - else - CONTIGS=\$(grep -c '^>' "${fasta}") - fi - - echo "[INFO] Contigs detected: \${CONTIGS}" - - if [ "\${CONTIGS}" -lt 2 ]; then - echo "[ERROR] Assembly has \${CONTIGS} contig(s)." >> "${prefix}.error.log" - echo "[ERROR] More than one contig required." >> "${prefix}.error.log" - fi - - fi - - if [ \$(cat "${prefix}.error.log" | wc -l) -gt 0 ]; then - echo "Validation failed..." - - cat \\ - "${prefix}.error.log" - else - echo "Validation successful..." - - mv \\ - "${prefix}.error.log" \\ - fasta_validate.stderr - - echo "Validation successful..." \\ - > "${prefix}.success.log" - fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - py_fasta_validator: \$(py_fasta_validator -v | sed 's/.* version //') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - echo "Validation successful..." \\ - > "${prefix}.success.log" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - py_fasta_validator: \$(py_fasta_validator -v | sed 's/.* version //') - END_VERSIONS - """ -} diff --git a/modules/nf-core/fastavalidator/meta.yml b/modules/nf-core/fastavalidator/meta.yml deleted file mode 100644 index 6d38dde..0000000 --- a/modules/nf-core/fastavalidator/meta.yml +++ /dev/null @@ -1,69 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "fastavalidator" -description: | - "Python C-extension for a simple validator for fasta files. The module emits the validated file or an - error log upon validation failure." -keywords: - - fasta - - validation - - genome -tools: - - fasta_validate: - description: | - "Python C-extension for a simple C code to validate a fasta file. It only checks a few things, - and by default only sets its response via the return code, - so you will need to check that!" - homepage: "https://github.com/linsalrob/py_fasta_validator" - documentation: "https://github.com/linsalrob/py_fasta_validator" - tool_dev_url: "https://github.com/linsalrob/py_fasta_validator" - doi: "10.5281/zenodo.5002710" - licence: ["MIT"] - identifier: "" -input: - - - meta: - type: map - description: | - Groovy Map containing file information - e.g. [ id:'test' ] - - fasta: - type: file - description: Input fasta file - pattern: "*.fasta" - ontologies: [] - - - count_contigs: - type: boolean - description: Enables number of contigs check (ENA requires more than 1 contig for a contig-level assembly submission) -output: - success_log: - - - meta: - type: map - description: | - Groovy Map containing file information - e.g. [ id:'test' ] - - "*.success.log": - type: file - description: Log file for successful validation - pattern: "*.success.log" - ontologies: [] - error_log: - - - meta: - type: map - description: | - Groovy Map containing file information - e.g. [ id:'test' ] - - "*.error.log": - type: file - description: Log file for failed validation - pattern: "*.error.log" - ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML -authors: - - "@gallvp" -maintainers: - - "@gallvp" diff --git a/modules/nf-core/fastavalidator/tests/main.nf.test.snap b/modules/nf-core/fastavalidator/tests/main.nf.test.snap deleted file mode 100644 index 602a6ff..0000000 --- a/modules/nf-core/fastavalidator/tests/main.nf.test.snap +++ /dev/null @@ -1,125 +0,0 @@ -{ - "sarscov2-fasta-valid": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.success.log:md5,b0b859eda1db5cd43915846e00ebc22c" - ] - ], - "1": [ - - ], - "2": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ], - "error_log": [ - - ], - "success_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.success.log:md5,b0b859eda1db5cd43915846e00ebc22c" - ] - ], - "versions": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" - }, - "timestamp": "2023-11-28T11:23:25.106872" - }, - "sarscov2-gff3-invalid": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.error.log:md5,531d520c0e7767176f743f197f1f87b3" - ] - ], - "2": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ], - "error_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.error.log:md5,531d520c0e7767176f743f197f1f87b3" - ] - ], - "success_log": [ - - ], - "versions": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" - }, - "timestamp": "2023-11-28T11:23:29.40324" - }, - "number-contigs-invalid": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.error.log:md5,772091b11ff0a7378e9e7d2abd993f5a" - ] - ], - "2": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ], - "error_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.error.log:md5,772091b11ff0a7378e9e7d2abd993f5a" - ] - ], - "success_log": [ - - ], - "versions": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "25.04.1" - }, - "timestamp": "2025-10-29T12:03:33.964183" - } -} \ No newline at end of file diff --git a/modules/nf-core/trnascanse/main.nf b/modules/nf-core/trnascanse/main.nf index 943afdd..6adb5c1 100644 --- a/modules/nf-core/trnascanse/main.nf +++ b/modules/nf-core/trnascanse/main.nf @@ -3,9 +3,9 @@ process TRNASCANSE { label "process_medium" conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/trnascan-se:2.0.12--pl5321h7b50bb2_2': - 'biocontainers/trnascan-se:2.0.12--pl5321h7b50bb2_2' }" + 'quay.io/biocontainers/trnascan-se:2.0.12--pl5321h7b50bb2_2' }" input: tuple val(meta), path(fasta) @@ -17,7 +17,7 @@ process TRNASCANSE { tuple val(meta), path("*.fasta") , emit: fasta , optional: true tuple val(meta), path("*.gff") , emit: gff , optional: true tuple val(meta), path("*.bed") , emit: bed , optional: true - path("versions.yml") , emit: versions + tuple val("${task.process}"), val('tRNAscan-SE'), eval("tRNAscan-SE |& sed '2!d;s/tRNAscan-SE //;s/ .*//'"), topic: versions, emit: versions_trnascanse when: task.ext.when == null || task.ext.when @@ -50,11 +50,6 @@ process TRNASCANSE { find . -name "*.fasta" -exec gzip {} \\; ${cleanup} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - tRNAscan-SE: \$(tRNAscan-SE 2>&1 >/dev/null | awk 'NR==2 {print \$2}') - END_VERSIONS """ stub: @@ -63,13 +58,8 @@ process TRNASCANSE { touch ${prefix}.tsv touch ${prefix}.log touch ${prefix}.stats - echo '' | gzip > ${prefix}.fasta.gz + echo "" | gzip > ${prefix}.fasta.gz touch ${prefix}.gff touch ${prefix}.bed - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - tRNAscan-SE: \$(tRNAscan-SE 2>&1 >/dev/null | awk 'NR==2 {print \$2}') - END_VERSIONS """ } diff --git a/modules/nf-core/trnascanse/meta.yml b/modules/nf-core/trnascanse/meta.yml index ec84bb1..d89e258 100644 --- a/modules/nf-core/trnascanse/meta.yml +++ b/modules/nf-core/trnascanse/meta.yml @@ -12,9 +12,10 @@ tools: documentation: "http://lowelab.ucsc.edu/tRNAscan-SE/help.html" tool_dev_url: "https://github.com/UCSC-LoweLab/tRNAscan-SE" doi: "10.1093/nar/gkab688" - licence: ["GPL v3", "GPL v3-or-later"] + licence: + - "GPL v3" + - "GPL v3-or-later" identifier: biotools:trnascan-se - input: - - meta: type: map @@ -26,8 +27,8 @@ input: description: | Fasta file for tRNA annotation. Can be gzipped. ontologies: - - edam: "http://edamontology.org/format_1929" - + - edam: http://edamontology.org/format_1929 # FASTA + - edam: http://edamontology.org/format_3989 # GZIP format output: tsv: - - meta: @@ -40,7 +41,7 @@ output: description: TSV summary output of tRNA annotations pattern: "*.tsv" ontologies: - - edam: "http://edamontology.org/format_3475" + - edam: http://edamontology.org/format_3475 # TSV log: - - meta: type: map @@ -52,7 +53,7 @@ output: description: tRNAScan-SE log file pattern: "*.log" ontologies: - - edam: "http://edamontology.org/data_3671" + - edam: http://edamontology.org/data_3671 # Text stats: - - meta: type: map @@ -64,7 +65,7 @@ output: description: Unstructured results file describing tRNA annotations pattern: "*.stats" ontologies: - - edam: "http://edamontology.org/data_3671" + - edam: http://edamontology.org/data_3671 # Text fasta: - - meta: type: map @@ -77,7 +78,7 @@ output: (optional) FASTA output of annotated tRNA sequences pattern: "*.fasta.gz" ontologies: - - edam: "http://edamontology.org/format_1929" + - edam: http://edamontology.org/format_1929 # FASTA - edam: http://edamontology.org/format_3989 # GZIP format gff: - - meta: @@ -90,7 +91,7 @@ output: description: | (optional) GFF annotation of tRNA sequences in input fasta ontologies: - - edam: "http://edamontology.org/format_1975" + - edam: "http://edamontology.org/format_1975" # GFF bed: - - meta: type: map @@ -102,14 +103,28 @@ output: description: | (optional) BED annotation of tRNA sequences in input fasta ontologies: - - edam: "http://edamontology.org/format_3003" + - edam: http://edamontology.org/format_3003 # BED + versions_trnascanse: + - - ${task.process}: + type: string + description: The name of the process + - tRNAscan-SE: + type: string + description: The name of the tool + - tRNAscan-SE |& sed '2!d;s/tRNAscan-SE //;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" + - - ${task.process}: + type: string + description: The name of the process + - tRNAscan-SE: + type: string + description: The name of the tool + - tRNAscan-SE |& sed '2!d;s/tRNAscan-SE //;s/ .*//': + type: eval + description: The expression to obtain the version of the tool authors: - "@prototaxites" maintainers: diff --git a/modules/nf-core/trnascanse/tests/main.nf.test b/modules/nf-core/trnascanse/tests/main.nf.test index ad3b5fc..7bf20ae 100644 --- a/modules/nf-core/trnascanse/tests/main.nf.test +++ b/modules/nf-core/trnascanse/tests/main.nf.test @@ -28,7 +28,7 @@ nextflow_process { { assert path(process.out.stats[0][1]).getText().contains("scan results") }, // timestamped log { assert snapshot( process.out.tsv, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } diff --git a/modules/nf-core/trnascanse/tests/main.nf.test.snap b/modules/nf-core/trnascanse/tests/main.nf.test.snap index 4ad2249..ab6fd77 100644 --- a/modules/nf-core/trnascanse/tests/main.nf.test.snap +++ b/modules/nf-core/trnascanse/tests/main.nf.test.snap @@ -51,7 +51,11 @@ ] ], "6": [ - "versions.yml:md5,a16c909b344a78a4197ae3a50d9dee7c" + [ + "TRNASCANSE", + "tRNAscan-SE", + "2.0.12" + ] ], "bed": [ [ @@ -101,16 +105,20 @@ "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,a16c909b344a78a4197ae3a50d9dee7c" + "versions_trnascanse": [ + [ + "TRNASCANSE", + "tRNAscan-SE", + "2.0.12" + ] ] } ], + "timestamp": "2026-04-27T13:49:57.391279", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-25T11:43:23.206937928" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } }, "bacteroides fragilis - write all": { "content": [ @@ -123,14 +131,20 @@ "test.tsv:md5,23c19ff33ce36f041803b5b3e7b7681b" ] ], - [ - "versions.yml:md5,a16c909b344a78a4197ae3a50d9dee7c" - ] + { + "versions_trnascanse": [ + [ + "TRNASCANSE", + "tRNAscan-SE", + "2.0.12" + ] + ] + } ], + "timestamp": "2026-04-27T13:49:53.0449", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-26T09:20:50.44529432" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf index b9c324d..bf2c056 100644 --- a/modules/nf-core/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -3,7 +3,7 @@ process UNTAR { label 'process_single' conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/52/52ccce28d2ab928ab862e25aae26314d69c8e38bd41ca9431c67ef05221348aa/data' : 'community.wave.seqera.io/library/coreutils_grep_gzip_lbzip2_pruned:838ba80435a629f8'}" diff --git a/nextflow.config b/nextflow.config index 4f9e21a..f55176d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -18,7 +18,6 @@ params { upload_tpa = false test_upload = true webincli_mode = "submit" - webin_cli_version = "9.0.3" // rna detection rrna_limit = 80 @@ -73,6 +72,9 @@ workflow.output.mode = params.publish_dir_mode // Load base.config by default for all pipelines includeConfig 'conf/base.config' +// Set container for docker amd64 by default +includeConfig 'conf/containers_docker_amd64.config' + profiles { debug { dumpHashes = true @@ -100,7 +102,15 @@ profiles { charliecloud.enabled = false apptainer.enabled = false } + mamba_arm { + conda.enabled = true + } + mamba_env { + conda.enabled = true // Use the environment.yml file in the module main.nf + conda.useMamba = true + } docker { + includeConfig 'conf/containers_docker_amd64.config' docker.enabled = true conda.enabled = false singularity.enabled = false @@ -110,6 +120,10 @@ profiles { apptainer.enabled = false docker.runOptions = '-u $(id -u):$(id -g)' } + docker_arm { + includeConfig 'conf/containers_docker_arm64.config' + docker.enabled = true + } arm64 { process.arch = 'arm64' // TODO https://github.com/nf-core/modules/issues/6694 @@ -125,6 +139,7 @@ profiles { docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { + includeConfig 'conf/containers_singularity_https_amd64.config' singularity.enabled = true singularity.autoMounts = true conda.enabled = false @@ -134,7 +149,20 @@ profiles { charliecloud.enabled = false apptainer.enabled = false } + singularity_arm { + includeConfig 'conf/containers_singularity_https_arm64.config' + singularity.enabled = true + } + singularity_oras { + includeConfig 'conf/containers_singularity_oras_amd64.config' + singularity.enabled = true + } + singularity_oras_arm { + includeConfig 'conf/containers_singularity_oras_arm64.config' + singularity.enabled = true + } podman { + includeConfig 'conf/containers_docker_amd64.config' podman.enabled = true conda.enabled = false docker.enabled = false @@ -143,7 +171,12 @@ profiles { charliecloud.enabled = false apptainer.enabled = false } + podman_arm { + includeConfig 'conf/containers_docker_arm64.config' + podman.enabled = true + } shifter { + includeConfig 'conf/containers_docker_amd64.config' shifter.enabled = true conda.enabled = false docker.enabled = false @@ -152,7 +185,12 @@ profiles { charliecloud.enabled = false apptainer.enabled = false } + shifter_arm { + includeConfig 'conf/containers_docker_arm64.config' + shifter.enabled = true + } charliecloud { + includeConfig 'conf/containers_docker_amd64.config' charliecloud.enabled = true conda.enabled = false docker.enabled = false @@ -161,7 +199,12 @@ profiles { shifter.enabled = false apptainer.enabled = false } + charliecloud_arm { + includeConfig 'conf/containers_docker_arm64.config' + charliecloud.enabled = true + } apptainer { + includeConfig 'conf/containers_singularity_https_amd64.config' apptainer.enabled = true apptainer.autoMounts = true conda.enabled = false @@ -171,6 +214,18 @@ profiles { shifter.enabled = false charliecloud.enabled = false } + apptainer_arm { + includeConfig 'conf/containers_singularity_oras_arm64.config' + singularity.enabled = true + } + apptainer_oras { + includeConfig 'conf/containers_singularity_oras_amd64.config' + apptainer.enabled = true + } + apptainer_oras_arm { + includeConfig 'conf/containers_singularity_oras_arm64.config' + singularity.enabled = true + } wave { apptainer.ociAutoPull = true singularity.ociAutoPull = true diff --git a/nextflow_schema.json b/nextflow_schema.json index 1b57a3c..5e3c8be 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -304,12 +304,6 @@ "default": "submit", "enum": ["submit", "validate"], "help": "Controls ENA Webin-CLI mode. Use `submit` to upload data or `validate` to run validation only. Default: submit." - }, - "webin_cli_version": { - "type": "string", - "description": "Version of webin-cli.jar to use for submission", - "default": "9.0.3", - "help": "Check version https://github.com/enasequence/webin-cli" } } } diff --git a/subworkflows/local/fasta_validation.nf b/subworkflows/local/fasta_validation.nf new file mode 100644 index 0000000..e722624 --- /dev/null +++ b/subworkflows/local/fasta_validation.nf @@ -0,0 +1,67 @@ +// +// Subworkflow that validates input FASTA and filters out files with less than 2 contigs +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +include { FALINT } from '../../modules/nf-core/falint/main' + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow FASTA_VALIDATION { + + take: + input_fasta // [meta, fasta_file] + + main: + + // --------- Filter fasta to have more than 1 contig + fasta_split = input_fasta.branch { meta, fasta -> + valid: fasta.countFasta() > 1 + shorter_than_one_contig: true + } + + // --------- Check fasta files are properly formatted + FALINT ( + fasta_split.valid + ) + + valid_fastas = input_fasta.join(FALINT.out.success_log) + .map { meta, fasta, _log -> + [meta, fasta] + } + + // Report failed + invalid_fastas = fasta_split.valid + .join(FALINT.out.error_log) + .map { meta, fasta, _log -> + [meta, fasta] + } + + shorter_than_one_contig_fastas_report = fasta_split.shorter_than_one_contig.map { meta, fasta -> + "${meta.id}\t${fasta}\tless_than_1_contig" + } + + falint_report = invalid_fastas.map { meta, fasta -> + "${meta.id}\t${fasta}\tfalint_failed" + } + + shorter_than_one_contig_fastas_report + .mix(falint_report) + .collectFile( + name: "${params.outdir}/${params.mode}/invalid_fastas.tsv", + newLine: true, + seed: "sample\tfasta\treason\n" + ) + + emit: + valid_fastas = valid_fastas +} diff --git a/subworkflows/local/rna_detection.nf b/subworkflows/local/rna_detection.nf index 09ef7dc..c41d332 100644 --- a/subworkflows/local/rna_detection.nf +++ b/subworkflows/local/rna_detection.nf @@ -30,12 +30,10 @@ workflow RNA_DETECTION { BARRNAP( fasta.map {id, fasta_file -> [id, fasta_file, "bac"]} ) - ch_versions = ch_versions.mix( BARRNAP.out.versions ) TRNASCANSE( fasta ) - ch_versions = ch_versions.mix( TRNASCANSE.out.versions ) COUNT_RNA( TRNASCANSE.out.stats.join(BARRNAP.out.gff), diff --git a/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf b/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf index 05d08e4..d046d3a 100644 --- a/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_seqsubmit_pipeline/main.nf @@ -89,7 +89,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 { diff --git a/tests/assembly_complete_metadata.nf.test.snap b/tests/assembly_complete_metadata.nf.test.snap index 96b4270..ebaa4aa 100644 --- a/tests/assembly_complete_metadata.nf.test.snap +++ b/tests/assembly_complete_metadata.nf.test.snap @@ -16,8 +16,8 @@ "CREATE_ASSEMBLY_METADATA_CSV": { "bash": "5.2.37(1)-release" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "GENERATE_ASSEMBLY_MANIFEST": { "assembly_uploader": "1.3.4" @@ -72,9 +72,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:11:57.799528" + "timestamp": "2026-05-13T13:17:16.523674" } } \ No newline at end of file diff --git a/tests/assembly_no_coverage_paired_reads.nf.test.snap b/tests/assembly_no_coverage_paired_reads.nf.test.snap index aa7ae21..5856832 100644 --- a/tests/assembly_no_coverage_paired_reads.nf.test.snap +++ b/tests/assembly_no_coverage_paired_reads.nf.test.snap @@ -19,8 +19,8 @@ "CREATE_ASSEMBLY_METADATA_CSV": { "bash": "5.2.37(1)-release" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "GENERATE_ASSEMBLY_MANIFEST": { "assembly_uploader": "1.3.4" @@ -38,7 +38,7 @@ "metagenomic_assemblies", "metagenomic_assemblies/no_coverage_paired_reads", "metagenomic_assemblies/no_coverage_paired_reads/coverage", - "metagenomic_assemblies/no_coverage_paired_reads/coverage/no_coverage_paired_reads.depth.txt", + "metagenomic_assemblies/no_coverage_paired_reads/coverage/no_coverage_paired_reads.depth.tsv", "metagenomic_assemblies/no_coverage_paired_reads/upload", "metagenomic_assemblies/no_coverage_paired_reads/upload/webin_cli", "metagenomic_assemblies/no_coverage_paired_reads/upload/webin_cli/no_coverage_paired_reads_accessions.tsv", @@ -71,16 +71,16 @@ "pipeline_info/nf_core_seqsubmit_software_mqc_versions.yml" ], [ - "no_coverage_paired_reads.depth.txt:md5,bb5f99e74d21df3c73e0ae0f388bcbcb", + "no_coverage_paired_reads.depth.tsv:md5,bb5f99e74d21df3c73e0ae0f388bcbcb", "assemblies_metadata.csv:md5,60706c21c030ba38af7a402f5e753fd5", "multiqc_assembly_metadata.txt:md5,9ae2665c6c7b648797758ee66d42ce62", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f" ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:13:38.138649" + "timestamp": "2026-05-13T13:18:47.77148" } } \ No newline at end of file diff --git a/tests/assembly_no_coverage_single_reads.nf.test.snap b/tests/assembly_no_coverage_single_reads.nf.test.snap index 360a1c7..402f205 100644 --- a/tests/assembly_no_coverage_single_reads.nf.test.snap +++ b/tests/assembly_no_coverage_single_reads.nf.test.snap @@ -19,8 +19,8 @@ "CREATE_ASSEMBLY_METADATA_CSV": { "bash": "5.2.37(1)-release" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "GENERATE_ASSEMBLY_MANIFEST": { "assembly_uploader": "1.3.4" @@ -38,7 +38,7 @@ "metagenomic_assemblies", "metagenomic_assemblies/no_coverage_single_reads", "metagenomic_assemblies/no_coverage_single_reads/coverage", - "metagenomic_assemblies/no_coverage_single_reads/coverage/no_coverage_single_reads.depth.txt", + "metagenomic_assemblies/no_coverage_single_reads/coverage/no_coverage_single_reads.depth.tsv", "metagenomic_assemblies/no_coverage_single_reads/upload", "metagenomic_assemblies/no_coverage_single_reads/upload/webin_cli", "metagenomic_assemblies/no_coverage_single_reads/upload/webin_cli/no_coverage_single_reads_accessions.tsv", @@ -71,16 +71,16 @@ "pipeline_info/nf_core_seqsubmit_software_mqc_versions.yml" ], [ - "no_coverage_single_reads.depth.txt:md5,bd88282b17e851377b1dd223839be150", + "no_coverage_single_reads.depth.tsv:md5,bd88282b17e851377b1dd223839be150", "assemblies_metadata.csv:md5,c9fe30ea46c95167627976470b8c9731", "multiqc_assembly_metadata.txt:md5,cafd4572737c5e84941afe260c3987c8", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f" ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:14:52.343361" + "timestamp": "2026-05-13T13:19:25.904346" } } \ No newline at end of file diff --git a/tests/assembly_no_study_complete_metadata.nf.test.snap b/tests/assembly_no_study_complete_metadata.nf.test.snap index 89fee5a..8def558 100644 --- a/tests/assembly_no_study_complete_metadata.nf.test.snap +++ b/tests/assembly_no_study_complete_metadata.nf.test.snap @@ -16,8 +16,8 @@ "CREATE_ASSEMBLY_METADATA_CSV": { "bash": "5.2.37(1)-release" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "GENERATE_ASSEMBLY_MANIFEST": { "assembly_uploader": "1.3.4" @@ -75,9 +75,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:18:52.449414" + "timestamp": "2026-05-13T11:53:13.664744" } } \ No newline at end of file diff --git a/tests/assembly_one_contig.nf.test.snap b/tests/assembly_one_contig.nf.test.snap index 16e70e9..eef8e40 100644 --- a/tests/assembly_one_contig.nf.test.snap +++ b/tests/assembly_one_contig.nf.test.snap @@ -1,16 +1,15 @@ { "-profile test_assembly_one_contig": { "content": [ - 2, + 1, { - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 - }, "Workflow": { "nf-core/seqsubmit": "v1.0.0dev" } }, [ + "metagenomic_assemblies", + "metagenomic_assemblies/invalid_fastas.tsv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/llms-full.txt", @@ -25,13 +24,14 @@ "pipeline_info/nf_core_seqsubmit_software_mqc_versions.yml" ], [ + "invalid_fastas.tsv:md5,8e3efcafacb0f0b78d537052ae1d18e9", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f" ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-05T20:41:24.293126" + "timestamp": "2026-05-14T10:39:20.087785" } } \ No newline at end of file diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 60c17ff..61d67fc 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -37,8 +37,8 @@ "CREATE_MANIFESTS": { "genome_uploader": "2.5.2" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "SUBMIT": { "ena-webin-cli": "9.0.3", @@ -56,7 +56,7 @@ "mags", "mags/no_coverage_paired_reads", "mags/no_coverage_paired_reads/coverage", - "mags/no_coverage_paired_reads/coverage/no_coverage_paired_reads.tsv", + "mags/no_coverage_paired_reads/coverage/no_coverage_paired_reads.depth.tsv", "mags/no_coverage_paired_reads/upload", "mags/no_coverage_paired_reads/upload/webin_cli", "mags/no_coverage_paired_reads/upload/webin_cli/no_coverage_paired_reads_accessions.tsv", @@ -119,7 +119,7 @@ "pipeline_info/nf_core_seqsubmit_software_mqc_versions.yml" ], [ - "no_coverage_paired_reads.tsv:md5,fb8374996c3bad9ddd296684d8c28628", + "no_coverage_paired_reads.depth.tsv:md5,fb8374996c3bad9ddd296684d8c28628", "no_rna_presence_bac.gff:md5,df19e1b84ba6f691d20c72b397c88abf", "no_rna_presence.tsv:md5,abd958e8addba39c9e4d7f6b97a1a7c6", "no_taxonomy.bin2classification.txt:md5,e24c109efe807c7044a866999fd736f1", @@ -131,9 +131,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:31:02.911782" + "timestamp": "2026-05-13T13:28:24.027742" } } \ No newline at end of file diff --git a/tests/mag_complete_metadata.nf.test.snap b/tests/mag_complete_metadata.nf.test.snap index 9bd83de..e9f76de 100644 --- a/tests/mag_complete_metadata.nf.test.snap +++ b/tests/mag_complete_metadata.nf.test.snap @@ -19,8 +19,8 @@ "CREATE_MANIFESTS": { "genome_uploader": "2.5.2" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "SUBMIT": { "ena-webin-cli": "9.0.3", @@ -85,9 +85,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:32:29.27504" + "timestamp": "2026-05-13T13:29:12.334812" } } \ No newline at end of file diff --git a/tests/mag_no_coverage_paired_reads.nf.test.snap b/tests/mag_no_coverage_paired_reads.nf.test.snap index 9f2c0e4..ef462fe 100644 --- a/tests/mag_no_coverage_paired_reads.nf.test.snap +++ b/tests/mag_no_coverage_paired_reads.nf.test.snap @@ -22,8 +22,8 @@ "CREATE_MANIFESTS": { "genome_uploader": "2.5.2" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "SUBMIT": { "ena-webin-cli": "9.0.3", @@ -38,7 +38,7 @@ "mags", "mags/no_coverage_paired_reads", "mags/no_coverage_paired_reads/coverage", - "mags/no_coverage_paired_reads/coverage/no_coverage_paired_reads.tsv", + "mags/no_coverage_paired_reads/coverage/no_coverage_paired_reads.depth.tsv", "mags/no_coverage_paired_reads/upload", "mags/no_coverage_paired_reads/upload/webin_cli", "mags/no_coverage_paired_reads/upload/webin_cli/no_coverage_paired_reads_accessions.tsv", @@ -83,7 +83,7 @@ "pipeline_info/nf_core_seqsubmit_software_mqc_versions.yml" ], [ - "no_coverage_paired_reads.tsv:md5,fb8374996c3bad9ddd296684d8c28628", + "no_coverage_paired_reads.depth.tsv:md5,fb8374996c3bad9ddd296684d8c28628", "genomes_metadata.tsv:md5,0538b1aec26168b35a416bd995b0a4a9", "submission.xml:md5,4b7d1d7e1b883a3eac57e1267943a8d6", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", @@ -91,9 +91,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:33:52.629445" + "timestamp": "2026-05-13T12:06:43.132792" } } \ No newline at end of file diff --git a/tests/mag_no_coverage_single_reads.nf.test.snap b/tests/mag_no_coverage_single_reads.nf.test.snap index aa72ecc..4e901e9 100644 --- a/tests/mag_no_coverage_single_reads.nf.test.snap +++ b/tests/mag_no_coverage_single_reads.nf.test.snap @@ -22,8 +22,8 @@ "CREATE_MANIFESTS": { "genome_uploader": "2.5.2" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "SUBMIT": { "ena-webin-cli": "9.0.3", @@ -38,7 +38,7 @@ "mags", "mags/no_coverage_single_reads", "mags/no_coverage_single_reads/coverage", - "mags/no_coverage_single_reads/coverage/no_coverage_single_reads.tsv", + "mags/no_coverage_single_reads/coverage/no_coverage_single_reads.depth.tsv", "mags/no_coverage_single_reads/upload", "mags/no_coverage_single_reads/upload/webin_cli", "mags/no_coverage_single_reads/upload/webin_cli/no_coverage_single_reads_accessions.tsv", @@ -83,7 +83,7 @@ "pipeline_info/nf_core_seqsubmit_software_mqc_versions.yml" ], [ - "no_coverage_single_reads.tsv:md5,3791d9be880cbfacbc527e47623e3c9a", + "no_coverage_single_reads.depth.tsv:md5,3791d9be880cbfacbc527e47623e3c9a", "genomes_metadata.tsv:md5,1f56050125362470f351ed99065af980", "submission.xml:md5,4b7d1d7e1b883a3eac57e1267943a8d6", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", @@ -91,9 +91,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:35:09.93204" + "timestamp": "2026-05-13T13:30:53.415714" } } \ No newline at end of file diff --git a/tests/mag_no_rna_presence.nf.test.snap b/tests/mag_no_rna_presence.nf.test.snap index 8df296a..e549fe2 100644 --- a/tests/mag_no_rna_presence.nf.test.snap +++ b/tests/mag_no_rna_presence.nf.test.snap @@ -25,8 +25,8 @@ "CREATE_MANIFESTS": { "genome_uploader": "2.5.2" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "SUBMIT": { "ena-webin-cli": "9.0.3", @@ -103,9 +103,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:41:56.905152" + "timestamp": "2026-05-13T13:35:27.954318" } } \ No newline at end of file diff --git a/tests/mag_no_study_complete_metadata.nf.test.snap b/tests/mag_no_study_complete_metadata.nf.test.snap index 70f219b..7b6f1e5 100644 --- a/tests/mag_no_study_complete_metadata.nf.test.snap +++ b/tests/mag_no_study_complete_metadata.nf.test.snap @@ -19,8 +19,8 @@ "CREATE_MANIFESTS": { "genome_uploader": "2.5.2" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "REGISTERSTUDY": { "mgnify-pipelines-toolkit": "1.4.21" @@ -88,9 +88,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:43:21.345279" + "timestamp": "2026-05-13T13:36:15.465306" } } \ No newline at end of file diff --git a/tests/mag_no_taxonomy.nf.test.snap b/tests/mag_no_taxonomy.nf.test.snap index db20da5..4af9a03 100644 --- a/tests/mag_no_taxonomy.nf.test.snap +++ b/tests/mag_no_taxonomy.nf.test.snap @@ -28,8 +28,8 @@ "CREATE_MANIFESTS": { "genome_uploader": "2.5.2" }, - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 + "FALINT": { + "falint": "1.2.0" }, "SUBMIT": { "ena-webin-cli": "9.0.3", @@ -99,9 +99,9 @@ ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-06T13:49:33.998544" + "timestamp": "2026-05-13T13:40:09.884554" } } \ No newline at end of file diff --git a/tests/mag_one_contig.nf.test.snap b/tests/mag_one_contig.nf.test.snap index 0f5b817..4297bf0 100644 --- a/tests/mag_one_contig.nf.test.snap +++ b/tests/mag_one_contig.nf.test.snap @@ -1,16 +1,15 @@ { "-profile test_mag_one_contig": { "content": [ - 2, + 1, { - "FASTAVALIDATOR": { - "py_fasta_validator": 0.6 - }, "Workflow": { "nf-core/seqsubmit": "v1.0.0dev" } }, [ + "mags", + "mags/invalid_fastas.tsv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/llms-full.txt", @@ -25,13 +24,14 @@ "pipeline_info/nf_core_seqsubmit_software_mqc_versions.yml" ], [ + "invalid_fastas.tsv:md5,8e3efcafacb0f0b78d537052ae1d18e9", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f" ] ], "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nf-test": "0.9.2", + "nextflow": "26.04.1" }, - "timestamp": "2026-05-05T23:59:44.749042" + "timestamp": "2026-05-14T10:59:16.375369" } } \ No newline at end of file diff --git a/workflows/assemblysubmit.nf b/workflows/assemblysubmit.nf index 1f4dc7b..d1dfddb 100644 --- a/workflows/assemblysubmit.nf +++ b/workflows/assemblysubmit.nf @@ -5,7 +5,6 @@ */ include { COVERM_CONTIG } from '../modules/nf-core/coverm/contig/main' -include { FASTAVALIDATOR } from '../modules/nf-core/fastavalidator/main' include { CREATE_ASSEMBLY_METADATA_CSV } from '../modules/local/create_assembly_metadata_csv/main' include { GENERATE_ASSEMBLY_MANIFEST } from '../modules/local/generate_assembly_manifest/main' include { REGISTERSTUDY } from '../modules/local/registerstudy/main' @@ -18,6 +17,8 @@ include { paramsSummaryMap } from 'plugin/nf-schema' include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' + +include { FASTA_VALIDATION } from '../subworkflows/local/fasta_validation' include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_seqsubmit_pipeline' /* @@ -38,7 +39,6 @@ workflow ASSEMBLYSUBMIT { study_metadata // val: path to study metadata file for study creation (used if no submission_study provided) upload_tpa // val: upload as TPA (Third Party Annotation) test_upload // val: true for test upload mode - webin_cli_version // val: WebinCLI tool version to download and use for submission webincli_mode // val: either 'validate' or 'submit' to specify WebinCLI mode of operation main: @@ -81,20 +81,14 @@ workflow ASSEMBLYSUBMIT { } } - // Check fasta files are properly formatted - FASTAVALIDATOR ( - assembly_fasta, - "true" // enables number of contigs check - ENA requires more than 1 contig for an assembly submission + // --------- Check fasta files are properly formatted and filter out files with less than 2 contigs + FASTA_VALIDATION ( + assembly_fasta ) - ch_versions = ch_versions.mix(FASTAVALIDATOR.out.versions) - - validated_fastas = assembly_fasta.join(FASTAVALIDATOR.out.success_log) - .map { meta, fasta, _log -> - [meta, fasta] - } // For assemblies without coverage, calculate coverage with CoverM - validated_fastas.filter { meta, _fasta -> meta.coverage == null } + FASTA_VALIDATION.out.valid_fastas + .filter { meta, _fasta -> meta.coverage == null } .join(reads_fastq) .multiMap { meta, fasta, fastq -> assembly: [ meta, fasta ] @@ -106,9 +100,9 @@ workflow ASSEMBLYSUBMIT { coverm_input.reads, coverm_input.assembly, false, // bam_input - false // interleaved + false, // interleaved + false // enable_bam_output ) - ch_versions = ch_versions.mix(COVERM_CONTIG.out.versions) // Calculate average coverage using splitCsv operator average_coverage_ch = COVERM_CONTIG.out.coverage @@ -123,7 +117,7 @@ workflow ASSEMBLYSUBMIT { } // Update metadata with calculated coverage - validated_fastas + FASTA_VALIDATION.out.valid_fastas .filter { meta, _fasta -> meta.coverage == null } .join( average_coverage_ch ) .map { meta, fasta, avg_coverage -> @@ -135,7 +129,7 @@ workflow ASSEMBLYSUBMIT { // Combine assemblies with updated metadata (for samples that had coverage calculated) // and assemblies that already had coverage - assemblies_with_coverage = validated_fastas + assemblies_with_coverage = FASTA_VALIDATION.out.valid_fastas .filter { meta, _fasta -> meta.coverage != null } .mix( assemblies_with_added_cov_ch ) diff --git a/workflows/genomesubmit.nf b/workflows/genomesubmit.nf index 0390475..4e4b828 100644 --- a/workflows/genomesubmit.nf +++ b/workflows/genomesubmit.nf @@ -9,13 +9,13 @@ include { REGISTERSTUDY } from '../modules/local/registe include { RENAME_FASTA_FOR_CATPACK } from '../modules/local/rename_fasta_for_catpack' include { CREATE_GENOME_METADATA_TSV } from '../modules/local/create_genome_metadata_tsv/main' -include { FASTAVALIDATOR } from '../modules/nf-core/fastavalidator/main' include { COVERM_GENOME } from '../modules/nf-core/coverm/genome' include { FIND_CONCATENATE as CONCAT_METADATA } from '../modules/nf-core/find/concatenate/main' include { FIND_CONCATENATE as CONCAT_ACCESSIONS } from '../modules/nf-core/find/concatenate/main' include { MULTIQC } from '../modules/nf-core/multiqc/main' include { paramsSummaryMap } from 'plugin/nf-schema' +include { FASTA_VALIDATION } from '../subworkflows/local/fasta_validation' include { GENOME_EVALUATION } from '../subworkflows/local/genome_evaluation' include { RNA_DETECTION } from '../subworkflows/local/rna_detection' include { FASTA_CLASSIFY_CATPACK } from '../subworkflows/nf-core/fasta_classify_catpack/main' @@ -50,7 +50,6 @@ workflow GENOMESUBMIT { centre_name // val: submission centre name upload_tpa // val: upload as TPA (Third Party Annotation) test_upload // val: true for test upload mode - webin_cli_version // val: WebinCLI tool version to download and use for submission webincli_mode // val: either 'validate' or 'submit' to specify WebinCLI mode of operation main: @@ -95,20 +94,13 @@ workflow GENOMESUBMIT { genome_fasta = genome_fasta_and_reads.map{meta, fasta, _fq1 -> [meta, fasta]} genome_reads = genome_fasta_and_reads.map{meta, _fasta, reads -> [meta, reads]} - // --------- Check fasta files are properly formatted - FASTAVALIDATOR ( - genome_fasta, - "true" // enables number of contigs check - ENA requires more than 1 contig for a bin/MAG submission + // --------- Check fasta files are properly formatted and filter out files with less than 2 contigs + FASTA_VALIDATION ( + genome_fasta ) - ch_versions = ch_versions.mix( FASTAVALIDATOR.out.versions ) - - validated_fastas = genome_fasta.join(FASTAVALIDATOR.out.success_log) - .map { meta, fasta, _log -> - [meta, fasta] - } // --------- Genome coverage calculation - validated_fastas + FASTA_VALIDATION.out.valid_fastas .branch { meta, _fasta -> genome_coverage_ref_input: meta.genome_coverage == null genome_coverage_present: true // Everything else goes here @@ -127,9 +119,9 @@ workflow GENOMESUBMIT { coverm_input.genome, false, false, - 'file' + 'file', + false ) - ch_versions = ch_versions.mix( COVERM_GENOME.out.versions ) // Update metadata for records missing coverage fasta_updated_with_coverage = COVERM_GENOME.out.coverage.join(branched_coverage_results.genome_coverage_ref_input)