From be468256490b3a2d8377ceee17146b0a97c11e76 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Tue, 2 Dec 2025 10:28:06 +0000 Subject: [PATCH] Module update --- modules.json | 16 +- .../custom/getchromsizes/environment.yml | 7 - modules/nf-core/custom/getchromsizes/main.nf | 47 -- modules/nf-core/custom/getchromsizes/meta.yml | 69 --- .../custom/getchromsizes/tests/main.nf.test | 99 ---- .../getchromsizes/tests/main.nf.test.snap | 242 -------- .../custom/getchromsizes/tests/tags.yml | 2 - modules/nf-core/fastawindows/environment.yml | 2 + modules/nf-core/fastawindows/meta.yml | 43 +- modules/nf-core/gunzip/environment.yml | 5 + modules/nf-core/gunzip/main.nf | 40 +- modules/nf-core/gunzip/meta.yml | 21 +- .../nf-core/gunzip/tests/main.nf.test.snap | 40 +- modules/nf-core/gunzip/tests/tags.yml | 2 - .../nf-core/samtools/faidx/environment.yml | 10 + modules/nf-core/samtools/faidx/main.nf | 61 ++ modules/nf-core/samtools/faidx/meta.yml | 102 ++++ .../nf-core/samtools/faidx/tests/main.nf.test | 219 +++++++ .../samtools/faidx/tests/main.nf.test.snap | 543 ++++++++++++++++++ .../samtools/faidx/tests/nextflow.config | 7 + .../samtools/faidx/tests/nextflow2.config | 6 + modules/nf-core/tabix/bgzip/environment.yml | 5 +- modules/nf-core/tabix/bgzip/main.nf | 13 +- modules/nf-core/tabix/bgzip/meta.yml | 25 +- .../nf-core/tabix/bgzip/tests/main.nf.test | 2 +- .../tabix/bgzip/tests/main.nf.test.snap | 40 +- modules/nf-core/tabix/bgzip/tests/tags.yml | 2 - modules/nf-core/tabix/tabix/environment.yml | 5 +- modules/nf-core/tabix/tabix/main.nf | 18 +- modules/nf-core/tabix/tabix/meta.yml | 34 +- .../nf-core/tabix/tabix/tests/main.nf.test | 48 +- .../tabix/tabix/tests/main.nf.test.snap | 119 ++-- .../{tabix_vcf_csi.config => nextflow.config} | 2 +- .../tabix/tabix/tests/tabix_bed.config | 5 - .../tabix/tabix/tests/tabix_gff.config | 5 - .../tabix/tabix/tests/tabix_vcf_tbi.config | 5 - modules/nf-core/tabix/tabix/tests/tags.yml | 2 - subworkflows/local/fasta_windows.nf | 4 +- subworkflows/local/params_check.nf | 8 +- tests/default.nf.test.snap | 16 +- 40 files changed, 1191 insertions(+), 750 deletions(-) delete mode 100644 modules/nf-core/custom/getchromsizes/environment.yml delete mode 100644 modules/nf-core/custom/getchromsizes/main.nf delete mode 100644 modules/nf-core/custom/getchromsizes/meta.yml delete mode 100644 modules/nf-core/custom/getchromsizes/tests/main.nf.test delete mode 100644 modules/nf-core/custom/getchromsizes/tests/main.nf.test.snap delete mode 100644 modules/nf-core/custom/getchromsizes/tests/tags.yml delete mode 100644 modules/nf-core/gunzip/tests/tags.yml create mode 100644 modules/nf-core/samtools/faidx/environment.yml create mode 100644 modules/nf-core/samtools/faidx/main.nf create mode 100644 modules/nf-core/samtools/faidx/meta.yml create mode 100644 modules/nf-core/samtools/faidx/tests/main.nf.test create mode 100644 modules/nf-core/samtools/faidx/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/faidx/tests/nextflow.config create mode 100644 modules/nf-core/samtools/faidx/tests/nextflow2.config delete mode 100644 modules/nf-core/tabix/bgzip/tests/tags.yml rename modules/nf-core/tabix/tabix/tests/{tabix_vcf_csi.config => nextflow.config} (54%) delete mode 100644 modules/nf-core/tabix/tabix/tests/tabix_bed.config delete mode 100644 modules/nf-core/tabix/tabix/tests/tabix_gff.config delete mode 100644 modules/nf-core/tabix/tabix/tests/tabix_vcf_tbi.config delete mode 100644 modules/nf-core/tabix/tabix/tests/tags.yml diff --git a/modules.json b/modules.json index 2021cb3..4d56bfe 100644 --- a/modules.json +++ b/modules.json @@ -5,29 +5,29 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { - "custom/getchromsizes": { + "fastawindows": { "branch": "master", - "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] }, - "fastawindows": { + "gunzip": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] }, - "gunzip": { + "samtools/faidx": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "f2cfcf9d3f6a2d123e6c44aefa788aa232204a7a", "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "61846a0d757ff9c0682ba3e28ab0441afd95ad7e", "installed_by": ["modules"] } } diff --git a/modules/nf-core/custom/getchromsizes/environment.yml b/modules/nf-core/custom/getchromsizes/environment.yml deleted file mode 100644 index 2bcd47e..0000000 --- a/modules/nf-core/custom/getchromsizes/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -channels: - - conda-forge - - bioconda - -dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 diff --git a/modules/nf-core/custom/getchromsizes/main.nf b/modules/nf-core/custom/getchromsizes/main.nf deleted file mode 100644 index d8c7405..0000000 --- a/modules/nf-core/custom/getchromsizes/main.nf +++ /dev/null @@ -1,47 +0,0 @@ -process CUSTOM_GETCHROMSIZES { - tag "$fasta" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path ("*.sizes"), emit: sizes - tuple val(meta), path ("*.fai") , emit: fai - tuple val(meta), path ("*.gzi") , emit: gzi, optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - samtools faidx $fasta - cut -f 1,2 ${fasta}.fai > ${fasta}.sizes - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ - - stub: - """ - touch ${fasta}.fai - touch ${fasta}.sizes - if [[ "${fasta.extension}" == "gz" ]]; then - touch ${fasta}.gzi - fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/custom/getchromsizes/meta.yml b/modules/nf-core/custom/getchromsizes/meta.yml deleted file mode 100644 index 2a0e8da..0000000 --- a/modules/nf-core/custom/getchromsizes/meta.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: custom_getchromsizes -description: Generates a FASTA file of chromosome sizes and a fasta index file -keywords: - - fasta - - chromosome - - indexing -tools: - - samtools: - description: Tools for dealing with SAM, BAM and CRAM files - homepage: http://www.htslib.org/ - documentation: http://www.htslib.org/doc/samtools.html - tool_dev_url: https://github.com/samtools/samtools - doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] - identifier: "" -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: FASTA file - pattern: "*.{fa,fasta,fna,fas}" -output: - - sizes: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - "*.sizes": - type: file - description: File containing chromosome lengths - pattern: "*.{sizes}" - - fai: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - "*.fai": - type: file - description: FASTA index file - pattern: "*.{fai}" - - gzi: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - "*.gzi": - type: file - description: Optional gzip index file for compressed inputs - pattern: "*.gzi" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@tamara-hodgetts" - - "@chris-cheshire" - - "@muffato" -maintainers: - - "@tamara-hodgetts" - - "@chris-cheshire" - - "@muffato" diff --git a/modules/nf-core/custom/getchromsizes/tests/main.nf.test b/modules/nf-core/custom/getchromsizes/tests/main.nf.test deleted file mode 100644 index 2f741a4..0000000 --- a/modules/nf-core/custom/getchromsizes/tests/main.nf.test +++ /dev/null @@ -1,99 +0,0 @@ -nextflow_process { - - name "Test Process CUSTOM_GETCHROMSIZES" - script "../main.nf" - process "CUSTOM_GETCHROMSIZES" - - tag "modules" - tag "modules_nfcore" - tag "custom" - tag "custom/getchromsizes" - - test("test_custom_getchromsizes") { - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_custom_getchromsizes_bgzip") { - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_custom_getchromsizes - stub") { - - options "-stub" - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_custom_getchromsizes_bgzip - stub") { - - options "-stub" - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } -} diff --git a/modules/nf-core/custom/getchromsizes/tests/main.nf.test.snap b/modules/nf-core/custom/getchromsizes/tests/main.nf.test.snap deleted file mode 100644 index d2072e2..0000000 --- a/modules/nf-core/custom/getchromsizes/tests/main.nf.test.snap +++ /dev/null @@ -1,242 +0,0 @@ -{ - "test_custom_getchromsizes_bgzip - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.sizes:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.fai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.gzi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,f68edc4d5999d8cb07147b9be115d60b" - ], - "fai": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.fai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "gzi": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.gzi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "sizes": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.sizes:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,f68edc4d5999d8cb07147b9be115d60b" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-18T10:11:37.459094476" - }, - "test_custom_getchromsizes": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "genome.fasta.sizes:md5,a57c401f27ae5133823fb09fb21c8a3c" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" - ] - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,f68edc4d5999d8cb07147b9be115d60b" - ], - "fai": [ - [ - { - "id": "test" - }, - "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" - ] - ], - "gzi": [ - - ], - "sizes": [ - [ - { - "id": "test" - }, - "genome.fasta.sizes:md5,a57c401f27ae5133823fb09fb21c8a3c" - ] - ], - "versions": [ - "versions.yml:md5,f68edc4d5999d8cb07147b9be115d60b" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-18T10:11:01.526301351" - }, - "test_custom_getchromsizes_bgzip": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.sizes:md5,a57c401f27ae5133823fb09fb21c8a3c" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474" - ] - ], - "3": [ - "versions.yml:md5,f68edc4d5999d8cb07147b9be115d60b" - ], - "fai": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" - ] - ], - "gzi": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474" - ] - ], - "sizes": [ - [ - { - "id": "test" - }, - "genome.fasta.gz.sizes:md5,a57c401f27ae5133823fb09fb21c8a3c" - ] - ], - "versions": [ - "versions.yml:md5,f68edc4d5999d8cb07147b9be115d60b" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-18T10:11:14.32456385" - }, - "test_custom_getchromsizes - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "genome.fasta.sizes:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "genome.fasta.fai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,f68edc4d5999d8cb07147b9be115d60b" - ], - "fai": [ - [ - { - "id": "test" - }, - "genome.fasta.fai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "gzi": [ - - ], - "sizes": [ - [ - { - "id": "test" - }, - "genome.fasta.sizes:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,f68edc4d5999d8cb07147b9be115d60b" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-18T10:11:26.505487624" - } -} \ No newline at end of file diff --git a/modules/nf-core/custom/getchromsizes/tests/tags.yml b/modules/nf-core/custom/getchromsizes/tests/tags.yml deleted file mode 100644 index d89a805..0000000 --- a/modules/nf-core/custom/getchromsizes/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -custom/getchromsizes: - - modules/nf-core/custom/getchromsizes/** diff --git a/modules/nf-core/fastawindows/environment.yml b/modules/nf-core/fastawindows/environment.yml index 6775fb2..787f1e6 100644 --- a/modules/nf-core/fastawindows/environment.yml +++ b/modules/nf-core/fastawindows/environment.yml @@ -1,3 +1,5 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda diff --git a/modules/nf-core/fastawindows/meta.yml b/modules/nf-core/fastawindows/meta.yml index f8ee004..a0437b9 100644 --- a/modules/nf-core/fastawindows/meta.yml +++ b/modules/nf-core/fastawindows/meta.yml @@ -23,9 +23,10 @@ input: type: file description: FASTA file pattern: "*.{fa,fasta,fna}" + ontologies: [] output: - - freq: - - meta: + freq: + - - meta: type: map description: | Groovy Map containing sample information @@ -34,8 +35,10 @@ output: type: file description: TSV file with frequencies and statistics pattern: "*.{tsv}" - - mononuc: - - meta: + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + mononuc: + - - meta: type: map description: | Groovy Map containing sample information @@ -44,8 +47,10 @@ output: type: file description: TSV file with mononucleotide counts pattern: "*.{tsv}" - - dinuc: - - meta: + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + dinuc: + - - meta: type: map description: | Groovy Map containing sample information @@ -54,8 +59,10 @@ output: type: file description: TSV file with dinucleotide counts pattern: "*.{tsv}" - - trinuc: - - meta: + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + trinuc: + - - meta: type: map description: | Groovy Map containing sample information @@ -64,8 +71,10 @@ output: type: file description: TSV file with trinucleotide counts pattern: "*.{tsv}" - - tetranuc: - - meta: + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + tetranuc: + - - meta: type: map description: | Groovy Map containing sample information @@ -74,11 +83,15 @@ output: type: file description: TSV file with tetranucleotide counts pattern: "*.{tsv}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@muffato" maintainers: diff --git a/modules/nf-core/gunzip/environment.yml b/modules/nf-core/gunzip/environment.yml index c779485..9b926b1 100644 --- a/modules/nf-core/gunzip/environment.yml +++ b/modules/nf-core/gunzip/environment.yml @@ -1,7 +1,12 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda dependencies: + - conda-forge::coreutils=9.5 - conda-forge::grep=3.11 + - conda-forge::gzip=1.13 + - conda-forge::lbzip2=2.5 - conda-forge::sed=4.8 - conda-forge::tar=1.34 diff --git a/modules/nf-core/gunzip/main.nf b/modules/nf-core/gunzip/main.nf index 5e67e3b..3ffc8e9 100644 --- a/modules/nf-core/gunzip/main.nf +++ b/modules/nf-core/gunzip/main.nf @@ -1,37 +1,37 @@ process GUNZIP { - tag "$archive" + tag "${archive}" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:22.04' : - 'nf-core/ubuntu:22.04' }" + container "${workflow.containerEngine == 'singularity' && !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'}" input: tuple val(meta), path(archive) output: - tuple val(meta), path("$gunzip"), emit: gunzip - path "versions.yml" , emit: versions + tuple val(meta), path("${gunzip}"), emit: gunzip + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def extension = ( archive.toString() - '.gz' ).tokenize('.')[-1] - def name = archive.toString() - '.gz' - ".$extension" - def prefix = task.ext.prefix ?: name - gunzip = prefix + ".$extension" + def args = task.ext.args ?: '' + def extension = (archive.toString() - '.gz').tokenize('.')[-1] + def name = archive.toString() - '.gz' - ".${extension}" + def prefix = task.ext.prefix ?: name + gunzip = prefix + ".${extension}" """ # Not calling gunzip itself because it creates files # with the original group ownership rather than the # default one for that user / the work directory gzip \\ -cd \\ - $args \\ - $archive \\ - > $gunzip + ${args} \\ + ${archive} \\ + > ${gunzip} cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -40,13 +40,13 @@ process GUNZIP { """ stub: - def args = task.ext.args ?: '' - def extension = ( archive.toString() - '.gz' ).tokenize('.')[-1] - def name = archive.toString() - '.gz' - ".$extension" - def prefix = task.ext.prefix ?: name - gunzip = prefix + ".$extension" + def args = task.ext.args ?: '' + def extension = (archive.toString() - '.gz').tokenize('.')[-1] + def name = archive.toString() - '.gz' - ".${extension}" + def prefix = task.ext.prefix ?: name + gunzip = prefix + ".${extension}" """ - touch $gunzip + touch ${gunzip} cat <<-END_VERSIONS > versions.yml "${task.process}": gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//') diff --git a/modules/nf-core/gunzip/meta.yml b/modules/nf-core/gunzip/meta.yml index 9066c03..926bb22 100644 --- a/modules/nf-core/gunzip/meta.yml +++ b/modules/nf-core/gunzip/meta.yml @@ -21,21 +21,26 @@ input: type: file description: File to be compressed/uncompressed pattern: "*.*" + ontologies: [] output: - - gunzip: - - meta: + gunzip: + - - meta: type: file description: Compressed/uncompressed file pattern: "*.*" - - $gunzip: + ontologies: [] + - ${gunzip}: type: file description: Compressed/uncompressed file pattern: "*.*" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/gunzip/tests/main.nf.test.snap b/modules/nf-core/gunzip/tests/main.nf.test.snap index 069967e..a0f0e67 100644 --- a/modules/nf-core/gunzip/tests/main.nf.test.snap +++ b/modules/nf-core/gunzip/tests/main.nf.test.snap @@ -11,7 +11,7 @@ ] ], "1": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" ], "gunzip": [ [ @@ -22,15 +22,15 @@ ] ], "versions": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-06-25T11:35:10.861293" + "timestamp": "2024-12-13T11:48:22.080222697" }, "Should run without failures - stub": { "content": [ @@ -44,7 +44,7 @@ ] ], "1": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" ], "gunzip": [ [ @@ -55,15 +55,15 @@ ] ], "versions": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-06-25T11:35:05.857145" + "timestamp": "2024-12-13T11:48:14.593020264" }, "Should run without failures": { "content": [ @@ -77,7 +77,7 @@ ] ], "1": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" ], "gunzip": [ [ @@ -88,15 +88,15 @@ ] ], "versions": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2023-10-17T15:35:37.690477896" + "timestamp": "2024-12-13T11:48:01.295397925" }, "Should run without failures - prefix": { "content": [ @@ -110,7 +110,7 @@ ] ], "1": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" ], "gunzip": [ [ @@ -121,14 +121,14 @@ ] ], "versions": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-06-25T11:33:32.921739" + "timestamp": "2024-12-13T11:48:07.414271387" } } \ No newline at end of file diff --git a/modules/nf-core/gunzip/tests/tags.yml b/modules/nf-core/gunzip/tests/tags.yml deleted file mode 100644 index fd3f691..0000000 --- a/modules/nf-core/gunzip/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -gunzip: - - modules/nf-core/gunzip/** diff --git a/modules/nf-core/samtools/faidx/environment.yml b/modules/nf-core/samtools/faidx/environment.yml new file mode 100644 index 0000000..89e12a6 --- /dev/null +++ b/modules/nf-core/samtools/faidx/environment.yml @@ -0,0 +1,10 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf new file mode 100644 index 0000000..ed2d70a --- /dev/null +++ b/modules/nf-core/samtools/faidx/main.nf @@ -0,0 +1,61 @@ +process SAMTOOLS_FAIDX { + tag "$fasta" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" + + input: + tuple val(meta), path(fasta) + tuple val(meta2), path(fai) + val get_sizes + + output: + tuple val(meta), path ("*.{fa,fasta}") , emit: fa, optional: true + tuple val(meta), path ("*.sizes") , emit: sizes, optional: true + tuple val(meta), path ("*.fai") , emit: fai, optional: true + tuple val(meta), path ("*.gzi") , emit: gzi, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def get_sizes_command = get_sizes ? "cut -f 1,2 ${fasta}.fai > ${fasta}.sizes" : '' + """ + samtools \\ + faidx \\ + $fasta \\ + $args + + ${get_sizes_command} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + def match = (task.ext.args =~ /-o(?:utput)?\s(.*)\s?/).findAll() + def fastacmd = match[0] ? "touch ${match[0][1]}" : '' + def get_sizes_command = get_sizes ? "touch ${fasta}.sizes" : '' + """ + ${fastacmd} + touch ${fasta}.fai + if [[ "${fasta.extension}" == "gz" ]]; then + touch ${fasta}.gzi + fi + + ${get_sizes_command} + + cat <<-END_VERSIONS > versions.yml + + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/samtools/faidx/meta.yml b/modules/nf-core/samtools/faidx/meta.yml new file mode 100644 index 0000000..b7a2e0c --- /dev/null +++ b/modules/nf-core/samtools/faidx/meta.yml @@ -0,0 +1,102 @@ +name: samtools_faidx +description: Index FASTA file, and optionally generate a file of chromosome sizes +keywords: + - index + - fasta + - faidx + - chromosome +tools: + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: http://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + identifier: biotools:samtools +input: + - - meta: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fa,fasta}" + ontologies: [] + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" + ontologies: [] + - get_sizes: + type: boolean + description: use cut to get the sizes of the index (true) or not (false) + +output: + fa: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{fa,fasta}": + type: file + description: FASTA file + pattern: "*.{fa}" + ontologies: [] + sizes: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.sizes": + type: file + description: File containing chromosome lengths + pattern: "*.{sizes}" + ontologies: [] + fai: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fai": + type: file + description: FASTA index file + pattern: "*.{fai}" + ontologies: [] + gzi: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.gzi": + type: file + description: Optional gzip index file for compressed inputs + pattern: "*.gzi" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@drpatelh" + - "@ewels" + - "@phue" +maintainers: + - "@maxulysse" + - "@phue" diff --git a/modules/nf-core/samtools/faidx/tests/main.nf.test b/modules/nf-core/samtools/faidx/tests/main.nf.test new file mode 100644 index 0000000..a505abc --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/main.nf.test @@ -0,0 +1,219 @@ +nextflow_process { + + name "Test Process SAMTOOLS_FAIDX" + script "../main.nf" + process "SAMTOOLS_FAIDX" + + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/faidx" + + test("test_samtools_faidx") { + + 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] = [[],[]] + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_bgzip") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true)] + input[1] = [[],[]] + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_fasta") { + + config "./nextflow.config" + + 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] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_stub_fasta") { + + config "./nextflow2.config" + + 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] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_stub_fai") { + + 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] = [[],[]] + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_get_sizes") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[1] = [[],[]] + input[2] = true + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_get_sizes_bgzip") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ]) + input[1] = [[],[]] + input[2] = true + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_get_sizes - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[1] = [[],[]] + input[2] = true + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_get_sizes_bgzip - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ]) + input[1] = [[],[]] + input[2] = true + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/samtools/faidx/tests/main.nf.test.snap b/modules/nf-core/samtools/faidx/tests/main.nf.test.snap new file mode 100644 index 0000000..3be7b82 --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/main.nf.test.snap @@ -0,0 +1,543 @@ +{ + "test_samtools_faidx": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "3": [ + + ], + "4": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "gzi": [ + + ], + "sizes": [ + + ], + "versions": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:09:38.874686" + }, + "test_samtools_faidx_get_sizes_bgzip - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.sizes:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.fai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.gzi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,8e7d141eb8c2944042dfb5e942bffe08" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.fai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "gzi": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.gzi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sizes": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.sizes:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,8e7d141eb8c2944042dfb5e942bffe08" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:10:10.958397" + }, + "test_samtools_faidx_get_sizes": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "genome.fasta.sizes:md5,a57c401f27ae5133823fb09fb21c8a3c" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "3": [ + + ], + "4": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test" + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "gzi": [ + + ], + "sizes": [ + [ + { + "id": "test" + }, + "genome.fasta.sizes:md5,a57c401f27ae5133823fb09fb21c8a3c" + ] + ], + "versions": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:09:59.237249" + }, + "test_samtools_faidx_bgzip": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474" + ] + ], + "4": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "gzi": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474" + ] + ], + "sizes": [ + + ], + "versions": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:09:42.949204" + }, + "test_samtools_faidx_fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "extract.fa:md5,6a0774a0ad937ba0bfd2ac7457d90f36" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ], + "fa": [ + [ + { + "id": "test", + "single_end": false + }, + "extract.fa:md5,6a0774a0ad937ba0bfd2ac7457d90f36" + ] + ], + "fai": [ + + ], + "gzi": [ + + ], + "sizes": [ + + ], + "versions": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:09:46.914038" + }, + "test_samtools_faidx_get_sizes - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "genome.fasta.sizes:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "genome.fasta.fai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + + ], + "4": [ + "versions.yml:md5,8e7d141eb8c2944042dfb5e942bffe08" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test" + }, + "genome.fasta.fai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "gzi": [ + + ], + "sizes": [ + [ + { + "id": "test" + }, + "genome.fasta.sizes:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,8e7d141eb8c2944042dfb5e942bffe08" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:10:06.961912" + }, + "test_samtools_faidx_stub_fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "extract.fa:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ], + "fa": [ + [ + { + "id": "test", + "single_end": false + }, + "extract.fa:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "fai": [ + + ], + "gzi": [ + + ], + "sizes": [ + + ], + "versions": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:09:51.226016" + }, + "test_samtools_faidx_stub_fai": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "3": [ + + ], + "4": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "gzi": [ + + ], + "sizes": [ + + ], + "versions": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:09:55.423005" + }, + "test_samtools_faidx_get_sizes_bgzip": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.sizes:md5,a57c401f27ae5133823fb09fb21c8a3c" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "3": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474" + ] + ], + "4": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "gzi": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474" + ] + ], + "sizes": [ + [ + { + "id": "test" + }, + "genome.fasta.gz.sizes:md5,a57c401f27ae5133823fb09fb21c8a3c" + ] + ], + "versions": [ + "versions.yml:md5,001211003daf11e8dd2f1aca7a378a68" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-10T13:10:03.04872" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/faidx/tests/nextflow.config b/modules/nf-core/samtools/faidx/tests/nextflow.config new file mode 100644 index 0000000..f76a3ba --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: SAMTOOLS_FAIDX { + ext.args = 'MT192765.1 -o extract.fa' + } + +} diff --git a/modules/nf-core/samtools/faidx/tests/nextflow2.config b/modules/nf-core/samtools/faidx/tests/nextflow2.config new file mode 100644 index 0000000..33ebbd5 --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/nextflow2.config @@ -0,0 +1,6 @@ +process { + + withName: SAMTOOLS_FAIDX { + ext.args = '-o extract.fa' + } +} diff --git a/modules/nf-core/tabix/bgzip/environment.yml b/modules/nf-core/tabix/bgzip/environment.yml index 017c259..771b138 100644 --- a/modules/nf-core/tabix/bgzip/environment.yml +++ b/modules/nf-core/tabix/bgzip/environment.yml @@ -1,7 +1,8 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.20 - - bioconda::tabix=1.11 + - bioconda::htslib=1.21 diff --git a/modules/nf-core/tabix/bgzip/main.nf b/modules/nf-core/tabix/bgzip/main.nf index 67991c7..c7e7462 100644 --- a/modules/nf-core/tabix/bgzip/main.nf +++ b/modules/nf-core/tabix/bgzip/main.nf @@ -4,16 +4,16 @@ process TABIX_BGZIP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' : - 'biocontainers/htslib:1.20--h5efdd21_2' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/92/92859404d861ae01afb87e2b789aebc71c0ab546397af890c7df74e4ee22c8dd/data' : + 'community.wave.seqera.io/library/htslib:1.21--ff8e28a189fbecaa' }" input: tuple val(meta), path(input) output: - tuple val(meta), path("${output}") , emit: output - tuple val(meta), path("${output}.gzi"), emit: gzi, optional: true - path "versions.yml" , emit: versions + tuple val(meta), path("${output}"), emit: output + tuple val(meta), path("*.gzi") , emit: gzi, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -26,7 +26,8 @@ process TABIX_BGZIP { output = in_bgzip ? "${prefix}.${extension}" : "${prefix}.${extension}.gz" command = in_bgzip ? '-d' : '' // Name the index according to $prefix, unless a name has been requested - if ((args.matches("(^| )-i\\b") || args.matches("(^| )--index(\$| )")) && !args.matches("(^| )-I\\b") && !args.matches("(^| )--index-name\\b")) { + split_args = args.split(' +|=') + if ((split_args.contains('-i') || split_args.contains('--index')) && !split_args.contains('-I') && !split_args.contains('--index-name')) { args = args + " -I ${output}.gzi" } """ diff --git a/modules/nf-core/tabix/bgzip/meta.yml b/modules/nf-core/tabix/bgzip/meta.yml index 131e92c..247830a 100644 --- a/modules/nf-core/tabix/bgzip/meta.yml +++ b/modules/nf-core/tabix/bgzip/meta.yml @@ -23,9 +23,10 @@ input: - input: type: file description: file to compress or to decompress + ontologies: [] output: - - output: - - meta: + output: + - - meta: type: map description: | Groovy Map containing sample information @@ -34,21 +35,25 @@ output: type: file description: Output compressed/decompressed file pattern: "*." - - gzi: - - meta: + ontologies: [] + gzi: + - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - ${output}.gzi: + - "*.gzi": type: file description: Optional gzip index file for compressed inputs pattern: "*.gzi" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/tabix/bgzip/tests/main.nf.test b/modules/nf-core/tabix/bgzip/tests/main.nf.test index d784aa0..00e7c09 100644 --- a/modules/nf-core/tabix/bgzip/tests/main.nf.test +++ b/modules/nf-core/tabix/bgzip/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process TABIX_BGZIP" - script "modules/nf-core/tabix/bgzip/main.nf" + script "../main.nf" process "TABIX_BGZIP" tag "modules" diff --git a/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap b/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap index 0748143..c605d54 100644 --- a/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap +++ b/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap @@ -24,7 +24,7 @@ ], "2": [ - "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + "versions.yml:md5,8721da9158d25c69b2215adf9cdc9fde" ], "gzi": [ @@ -38,15 +38,15 @@ ] ], "versions": [ - "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + "versions.yml:md5,8721da9158d25c69b2215adf9cdc9fde" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.5" }, - "timestamp": "2024-07-19T11:28:34.159992362" + "timestamp": "2025-03-26T13:52:19.285035543" }, "test_stub": { "content": [ @@ -73,7 +73,7 @@ ], "2": [ - "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + "versions.yml:md5,8721da9158d25c69b2215adf9cdc9fde" ], "gzi": [ @@ -87,15 +87,15 @@ ] ], "versions": [ - "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + "versions.yml:md5,8721da9158d25c69b2215adf9cdc9fde" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.5" }, - "timestamp": "2024-07-19T11:28:22.087769106" + "timestamp": "2025-03-26T13:52:15.290470496" }, "sarscov2_vcf_bgzip_compress_gzi": { "content": [ @@ -117,7 +117,7 @@ ] ], "2": [ - "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + "versions.yml:md5,8721da9158d25c69b2215adf9cdc9fde" ], "gzi": [ [ @@ -136,15 +136,15 @@ ] ], "versions": [ - "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + "versions.yml:md5,8721da9158d25c69b2215adf9cdc9fde" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.5" }, - "timestamp": "2024-07-19T11:28:57.15091665" + "timestamp": "2025-03-26T13:52:26.577148245" }, "bgzip_test": { "content": [ @@ -186,7 +186,7 @@ ] ], "2": [ - "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + "versions.yml:md5,8721da9158d25c69b2215adf9cdc9fde" ], "gzi": [ [ @@ -205,14 +205,14 @@ ] ], "versions": [ - "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + "versions.yml:md5,8721da9158d25c69b2215adf9cdc9fde" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.5" }, - "timestamp": "2024-07-19T11:28:45.219404786" + "timestamp": "2025-03-26T13:52:22.850987971" } } \ No newline at end of file diff --git a/modules/nf-core/tabix/bgzip/tests/tags.yml b/modules/nf-core/tabix/bgzip/tests/tags.yml deleted file mode 100644 index de0eec8..0000000 --- a/modules/nf-core/tabix/bgzip/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -tabix/bgzip: - - "modules/nf-core/tabix/bgzip/**" diff --git a/modules/nf-core/tabix/tabix/environment.yml b/modules/nf-core/tabix/tabix/environment.yml index 017c259..771b138 100644 --- a/modules/nf-core/tabix/tabix/environment.yml +++ b/modules/nf-core/tabix/tabix/environment.yml @@ -1,7 +1,8 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.20 - - bioconda::tabix=1.11 + - bioconda::htslib=1.21 diff --git a/modules/nf-core/tabix/tabix/main.nf b/modules/nf-core/tabix/tabix/main.nf index 13acd67..5abf86d 100644 --- a/modules/nf-core/tabix/tabix/main.nf +++ b/modules/nf-core/tabix/tabix/main.nf @@ -4,16 +4,15 @@ process TABIX_TABIX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' : - 'biocontainers/htslib:1.20--h5efdd21_2' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/92/92859404d861ae01afb87e2b789aebc71c0ab546397af890c7df74e4ee22c8dd/data' : + 'community.wave.seqera.io/library/htslib:1.21--ff8e28a189fbecaa' }" input: tuple val(meta), path(tab) output: - tuple val(meta), path("*.tbi"), optional:true, emit: tbi - tuple val(meta), path("*.csi"), optional:true, emit: csi - path "versions.yml" , emit: versions + tuple val(meta), path("*.{tbi,csi}"), emit: index + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -28,18 +27,19 @@ process TABIX_TABIX { cat <<-END_VERSIONS > versions.yml "${task.process}": - tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + tabix: \$(tabix --version | sed '1!d;s/.* //' ) END_VERSIONS """ stub: + def args = task.ext.args ?: '' + def index = args.contains("-C ") || args.contains("--csi") ? "csi" : "tbi" """ - touch ${tab}.tbi - touch ${tab}.csi + touch ${tab}.${index} cat <<-END_VERSIONS > versions.yml "${task.process}": - tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + tabix: \$(tabix --version | sed '1!d;s/.* //' ) END_VERSIONS """ } diff --git a/modules/nf-core/tabix/tabix/meta.yml b/modules/nf-core/tabix/tabix/meta.yml index 7864832..5ff0133 100644 --- a/modules/nf-core/tabix/tabix/meta.yml +++ b/modules/nf-core/tabix/tabix/meta.yml @@ -22,32 +22,26 @@ input: type: file description: TAB-delimited genome position file compressed with bgzip pattern: "*.{bed.gz,gff.gz,sam.gz,vcf.gz}" + ontologies: [] output: - - tbi: - - meta: + index: + - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.tbi": + - "*.{tbi,csi}": type: file - description: tabix index file - pattern: "*.{tbi}" - - csi: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - "*.csi": - type: file - description: coordinate sorted index file - pattern: "*.{csi}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + description: Tabix index file (either tbi or csi) + pattern: "*.{tbi,csi}" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/tabix/tabix/tests/main.nf.test b/modules/nf-core/tabix/tabix/tests/main.nf.test index 102b0d7..8d19ccb 100644 --- a/modules/nf-core/tabix/tabix/tests/main.nf.test +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process TABIX_TABIX" - script "modules/nf-core/tabix/tabix/main.nf" + script "../main.nf" process "TABIX_TABIX" tag "modules" @@ -9,9 +9,13 @@ nextflow_process { tag "tabix" tag "tabix/tabix" + config "./nextflow.config" + test("sarscov2_bedgz_tbi") { - config "./tabix_bed.config" when { + params { + module_args = '-p bed' + } process { """ input[0] = [ @@ -25,17 +29,16 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot( - process.out, - file(process.out.tbi[0][1]).name - ).match() } + { assert snapshot(process.out).match() } ) } } test("sarscov2_gff_tbi") { - config "./tabix_gff.config" when { + params { + module_args = '-p gff' + } process { """ input[0] = [ @@ -49,17 +52,17 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot( - process.out, - file(process.out.tbi[0][1]).name).match() } + { assert snapshot(process.out).match() } ) } } test("sarscov2_vcf_tbi") { - config "./tabix_vcf_tbi.config" when { + params { + module_args = '-p vcf' + } process { """ input[0] = [ @@ -73,18 +76,17 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot( - process.out, - file(process.out.tbi[0][1]).name - ).match() } + { assert snapshot(process.out).match() } ) } } test("sarscov2_vcf_csi") { - config "./tabix_vcf_csi.config" when { + params { + module_args = '-p vcf --csi' + } process { """ input[0] = [ @@ -98,19 +100,18 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot( - process.out, - file(process.out.csi[0][1]).name - ).match() } + { assert snapshot(process.out).match() } ) } } test("sarscov2_vcf_csi_stub") { - config "./tabix_vcf_csi.config" options "-stub" when { + params { + module_args = '-p vcf --csi' + } process { """ input[0] = [ @@ -124,10 +125,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot( - process.out, - file(process.out.csi[0][1]).name - ).match() } + { assert snapshot(process.out).match() } ) } diff --git a/modules/nf-core/tabix/tabix/tests/main.nf.test.snap b/modules/nf-core/tabix/tabix/tests/main.nf.test.snap index c2b9ed0..ff6f82b 100644 --- a/modules/nf-core/tabix/tabix/tests/main.nf.test.snap +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test.snap @@ -11,15 +11,9 @@ ] ], "1": [ - + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ], - "2": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" - ], - "csi": [ - - ], - "tbi": [ + "index": [ [ { "id": "tbi_gff" @@ -28,16 +22,15 @@ ] ], "versions": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ] - }, - "genome.gff3.gz.tbi" + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-19T12:06:25.653807564" + "timestamp": "2025-11-05T15:25:35.514843472" }, "sarscov2_bedgz_tbi": { "content": [ @@ -51,15 +44,9 @@ ] ], "1": [ - - ], - "2": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ], - "csi": [ - - ], - "tbi": [ + "index": [ [ { "id": "tbi_bed" @@ -68,16 +55,15 @@ ] ], "versions": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ] - }, - "test.bed.gz.tbi" + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-19T12:06:09.754082161" + "timestamp": "2025-11-05T15:25:28.854965597" }, "sarscov2_vcf_tbi": { "content": [ @@ -91,15 +77,9 @@ ] ], "1": [ - - ], - "2": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" - ], - "csi": [ - + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ], - "tbi": [ + "index": [ [ { "id": "tbi_vcf" @@ -108,29 +88,20 @@ ] ], "versions": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ] - }, - "test.vcf.gz.tbi" + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-19T12:06:40.042648294" + "timestamp": "2025-11-05T15:25:42.062992614" }, "sarscov2_vcf_csi_stub": { "content": [ { "0": [ - [ - { - "id": "vcf_csi_stub" - }, - "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ [ { "id": "vcf_csi_stub" @@ -138,10 +109,10 @@ "test.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "2": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" + "1": [ + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ], - "csi": [ + "index": [ [ { "id": "vcf_csi_stub" @@ -149,33 +120,21 @@ "test.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "tbi": [ - [ - { - "id": "vcf_csi_stub" - }, - "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], "versions": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ] - }, - "test.vcf.gz.csi" + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-19T12:07:08.700367261" + "timestamp": "2025-11-05T15:53:22.599650411" }, "sarscov2_vcf_csi": { "content": [ { "0": [ - - ], - "1": [ [ { "id": "vcf_csi" @@ -183,30 +142,26 @@ "test.vcf.gz.csi:md5,04b41c1efd9ab3c6b1e008a286e27d2b" ] ], - "2": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" + "1": [ + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ], - "csi": [ + "index": [ [ { "id": "vcf_csi" }, "test.vcf.gz.csi:md5,04b41c1efd9ab3c6b1e008a286e27d2b" ] - ], - "tbi": [ - ], "versions": [ - "versions.yml:md5,07064637fb8a217174052be8e40234e2" + "versions.yml:md5,3bfeccaff5f93fb7fca5f6dc0f0975d5" ] - }, - "test.vcf.gz.csi" + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-19T12:06:55.362067748" + "timestamp": "2025-11-05T15:42:23.826911272" } } \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/tests/tabix_vcf_csi.config b/modules/nf-core/tabix/tabix/tests/nextflow.config similarity index 54% rename from modules/nf-core/tabix/tabix/tests/tabix_vcf_csi.config rename to modules/nf-core/tabix/tabix/tests/nextflow.config index eb4f2d7..96685ef 100644 --- a/modules/nf-core/tabix/tabix/tests/tabix_vcf_csi.config +++ b/modules/nf-core/tabix/tabix/tests/nextflow.config @@ -1,5 +1,5 @@ process { withName: TABIX_TABIX { - ext.args = '-p vcf --csi' + ext.args = params.module_args } } diff --git a/modules/nf-core/tabix/tabix/tests/tabix_bed.config b/modules/nf-core/tabix/tabix/tests/tabix_bed.config deleted file mode 100644 index 7ff0590..0000000 --- a/modules/nf-core/tabix/tabix/tests/tabix_bed.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: TABIX_TABIX { - ext.args = '-p bed' - } -} \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/tests/tabix_gff.config b/modules/nf-core/tabix/tabix/tests/tabix_gff.config deleted file mode 100644 index 20c0a1e..0000000 --- a/modules/nf-core/tabix/tabix/tests/tabix_gff.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: TABIX_TABIX { - ext.args = '-p gff' - } -} \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/tests/tabix_vcf_tbi.config b/modules/nf-core/tabix/tabix/tests/tabix_vcf_tbi.config deleted file mode 100644 index 2774c8a..0000000 --- a/modules/nf-core/tabix/tabix/tests/tabix_vcf_tbi.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: TABIX_TABIX { - ext.args = '-p vcf' - } -} \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/tests/tags.yml b/modules/nf-core/tabix/tabix/tests/tags.yml deleted file mode 100644 index 6eda065..0000000 --- a/modules/nf-core/tabix/tabix/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -tabix/tabix: - - "modules/nf-core/tabix/tabix/**" diff --git a/subworkflows/local/fasta_windows.nf b/subworkflows/local/fasta_windows.nf index dd2966d..848e8f8 100644 --- a/subworkflows/local/fasta_windows.nf +++ b/subworkflows/local/fasta_windows.nf @@ -76,9 +76,9 @@ workflow FASTA_WINDOWS { } // Do the indexing on the compatible bedGraph files - ch_indexed_bed_csi= TABIX_TABIX_CSI ( tabix_selector.tbi_and_csi.mix(tabix_selector.only_csi) ).csi + ch_indexed_bed_csi= TABIX_TABIX_CSI ( tabix_selector.tbi_and_csi.mix(tabix_selector.only_csi) ).index ch_versions = ch_versions.mix(TABIX_TABIX_CSI.out.versions.first()) - ch_indexed_bed_tbi= TABIX_TABIX_TBI ( tabix_selector.tbi_and_csi ).tbi + ch_indexed_bed_tbi= TABIX_TABIX_TBI ( tabix_selector.tbi_and_csi ).index ch_versions = ch_versions.mix(TABIX_TABIX_TBI.out.versions.first()) diff --git a/subworkflows/local/params_check.nf b/subworkflows/local/params_check.nf index e58363a..66921c1 100644 --- a/subworkflows/local/params_check.nf +++ b/subworkflows/local/params_check.nf @@ -2,7 +2,7 @@ // Check and parse the input parameters // -include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/custom/getchromsizes/main' +include { SAMTOOLS_FAIDX } from '../../modules/nf-core/samtools/faidx/main' include { GUNZIP } from '../../modules/nf-core/gunzip/main' workflow PARAMS_CHECK { @@ -45,13 +45,13 @@ workflow PARAMS_CHECK { meta, fasta, fai -> indexed : fai.exists() notindexed : true - return [meta, fasta] // remove fai from the channel because it will be added by CUSTOM_GETCHROMSIZES below + return [meta, fasta] // remove fai from the channel because it will be added by SAMTOOLS_FAIDX below } . set { ch_inputs_checked } // Generate Samtools index and chromosome sizes file, again with some channel manipulations ch_samtools_faidx = ch_inputs_checked.notindexed // (meta, fasta) - .join( CUSTOM_GETCHROMSIZES (ch_inputs_checked.notindexed).fai ) // joined with (meta, fai) makes (meta, fasta, fai) - ch_versions = ch_versions.mix(CUSTOM_GETCHROMSIZES.out.versions) + .join( SAMTOOLS_FAIDX (ch_inputs_checked.notindexed, [[], []], true).fai ) // joined with (meta, fai) makes (meta, fasta, fai) + ch_versions = ch_versions.mix(SAMTOOLS_FAIDX.out.versions) // Read the .fai file, extract sequence statistics, and make an extended meta map ch_fasta_fai = ch_inputs_checked.indexed.mix(ch_samtools_faidx).map { diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 9d5a9cd..d5ad940 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -3,9 +3,6 @@ "content": [ 67, { - "CUSTOM_GETCHROMSIZES": { - "getchromsizes": 1.21 - }, "EXTRACT_COLUMN": { "python": "3.9.5" }, @@ -13,16 +10,19 @@ "fasta_windows": "0.2.4" }, "GUNZIP": { - "gunzip": 1.1 + "gunzip": 1.13 + }, + "SAMTOOLS_FAIDX": { + "samtools": "1.22.1" }, "TABIX_BGZIP": { - "tabix": 1.2 + "tabix": 1.21 }, "TABIX_TABIX_CSI": { - "tabix": 1.2 + "tabix": 1.21 }, "TABIX_TABIX_TBI": { - "tabix": 1.2 + "tabix": 1.21 }, "Workflow": { "sanger-tol/sequencecomposition": "v1.2.0dev" @@ -180,6 +180,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-01T20:19:08.331871664" + "timestamp": "2025-12-02T10:22:58.692820548" } } \ No newline at end of file