diff --git a/modules/nf-core/bandage/image/tests/main.nf.test b/modules/nf-core/bandage/image/tests/main.nf.test index f0f834535999..8500d1c8b9ba 100644 --- a/modules/nf-core/bandage/image/tests/main.nf.test +++ b/modules/nf-core/bandage/image/tests/main.nf.test @@ -9,7 +9,7 @@ nextflow_process { tag "modules_nfcore" tag "bandage" tag "bandage/image" - tag "tabix/bgzip" + tag "htslib/bgziptabix" test("test-bandage-image") { @@ -41,14 +41,19 @@ nextflow_process { test("test-bandage-image - gzip") { setup { - run("TABIX_BGZIP"){ - script "../../../tabix/bgzip/main.nf" + run("HTSLIB_BGZIPTABIX"){ + script "../../../htslib/bgziptabix/main.nf" process { """ input[0] = [ [ id:'B-3106' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/gfa/assembly.gfa', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/gfa/assembly.gfa', checkIfExists: true), + [], + [] ] + input[1] = "compress" + input[2] = false + input[3] = "gfa" """ } } @@ -57,7 +62,7 @@ nextflow_process { when { process { """ - input[0] = TABIX_BGZIP.out.output + input[0] = HTSLIB_BGZIPTABIX.out.output """ } } diff --git a/modules/nf-core/custom/geneticmapconvert/tests/main.nf.test b/modules/nf-core/custom/geneticmapconvert/tests/main.nf.test index 3fb055ee1681..c231b37d51b4 100644 --- a/modules/nf-core/custom/geneticmapconvert/tests/main.nf.test +++ b/modules/nf-core/custom/geneticmapconvert/tests/main.nf.test @@ -10,7 +10,7 @@ nextflow_process { tag "modules_nfcore" tag "custom" tag "custom/geneticmapconvert" - tag "tabix/bgzip" + tag "htslib/bgziptabix" test("Convert map with pos\\tchr\\tcm - with header - meta.chr (glimpse format)") { when { @@ -44,14 +44,19 @@ nextflow_process { test("Convert map with pos\\tchr\\tcM - with header - meta.chr (glimpse compressed format)") { setup { - run("TABIX_BGZIP"){ - script "../../../tabix/bgzip/main.nf" + run("HTSLIB_BGZIPTABIX"){ + script "../../../htslib/bgziptabix/main.nf" process { """ input[0] = [ [id: "test", chr:"chr21"], - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genetic_map/genome.GRCh38.chr21.glimpse.map', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genetic_map/genome.GRCh38.chr21.glimpse.map', checkIfExists: true), + [], + [] ] + input[1] = "compress" + input[2] = false + input[3] = "map" """ } } @@ -62,7 +67,7 @@ nextflow_process { } process { """ - input[0] = TABIX_BGZIP.out.output + input[0] = HTSLIB_BGZIPTABIX.out.output """ } } diff --git a/modules/nf-core/htslib/bgziptabix/environment.yml b/modules/nf-core/htslib/bgziptabix/environment.yml new file mode 100644 index 000000000000..69099380ea31 --- /dev/null +++ b/modules/nf-core/htslib/bgziptabix/environment.yml @@ -0,0 +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.23.1" + - "conda-forge::xz=5.8.3" diff --git a/modules/nf-core/htslib/bgziptabix/main.nf b/modules/nf-core/htslib/bgziptabix/main.nf new file mode 100644 index 000000000000..9efe9689bfe6 --- /dev/null +++ b/modules/nf-core/htslib/bgziptabix/main.nf @@ -0,0 +1,88 @@ +process HTSLIB_BGZIPTABIX { + tag "${meta.id}" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/33/33a1f2c7f36ec58339e41cbea096d121f606918778a91cfbef944b40ba7ce48b/data' + : 'community.wave.seqera.io/library/htslib_xz:49c8c84af5c4b3b9'}" + + input: + tuple val(meta), path(infile), path(infile_tbi), path(regions) + val action + val make_index + val out_ext + + output: + tuple val(meta), path("${outfile}"), emit: output + tuple val(meta), path("${outfile}.{tbi,csi}"), emit: index, optional: true + // all htslib tools have the same version, we use bgzip + tuple val("${task.process}"), val('htslib'), eval("bgzip --version | sed '1! d; s/bgzip (htslib) //'"), topic: versions, emit: versions_htslib + tuple val("${task.process}"), val('xz'), eval("xz --version | sed '1! d; s/xz (XZ Utils) //'"), topic: versions, emit: versions_xz + + when: + task.ext.when == null || task.ext.when + + script: + def allowed_actions = ["compress", "decompress"] + if (action !in allowed_actions) { + error("htslib/bgziptabix: Invalid action: ${action}. Allowed actions are: ${allowed_actions.join(', ')}") + } + + if (action == "decompress" && make_index) { + log.warn("htslib/bgziptabix: Cannot create index when decompressing. Ignoring make_index option.") + } + + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + outfile = action == "compress" ? (out_ext ? "${prefix}.${out_ext}.gz" : "${prefix}.gz") : (out_ext ? "${prefix}.${out_ext}" : "${prefix}") + + def compress_cmd = action == "compress" ? "bgzip -c ${args} -@ ${task.cpus}" : "cat" + def bgzip_cmd = action == "compress" ? "[ '\$(basename ${infile})' != '\$(basename ${outfile})' ] && ln -s ${infile} ${outfile}" : "bgzip -c -d ${args} -@ ${task.cpus} ${infile} > ${outfile}" + + def regions_arg = regions ? "-R ${regions}" : "" + def tabix_cmd = (make_index && !infile_tbi) ? "tabix -@ ${task.cpus} ${regions_arg} ${args2} -f ${outfile}" : "" + def link_tabix_cmd = make_index && infile_tbi ? "ln -s ${infile_tbi} ${outfile}.${infile_tbi.extension}" : "" + def uncompressed_cmd = action == "compress" ? "${compress_cmd} ${infile} > ${outfile}" : (infile.getName() == outfile ? "" : "ln -s ${infile} ${outfile}") + """ + ${link_tabix_cmd} + + FILE_TYPE=\$(htsfile ${infile}) + + case "\$FILE_TYPE" in + *BGZF-compressed*) + ${bgzip_cmd} ;; + *gzip-compressed*) + [ "\$(basename ${infile})" == "\$(basename ${outfile})" ] && echo "Input and output names cannot be the same" && exit 1 + zcat ${infile} | ${compress_cmd} > ${outfile} ;; + *bzip2-compressed*) + bzcat ${infile} | ${compress_cmd} > ${outfile} ;; + *XZ-compressed*) + xzcat ${infile} | ${compress_cmd} > ${outfile} ;; + *) + ${uncompressed_cmd} ;; + esac + + ${tabix_cmd} + """ + + stub: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + outfile = action == "compress" ? (out_ext ? "${prefix}.${out_ext}.gz" : "${prefix}.gz") : (out_ext ? "${prefix}.${out_ext}" : "${prefix}") + + def touch_cmd = action == "compress" ? "echo | bgzip -c" : "echo" + def index_fmt = args2.contains('-C') ? 'csi' : 'tbi' + def tabix_cmd = make_index ? "touch ${outfile}.${index_fmt}" : "" + def link_tabix_cmd = make_index && infile_tbi ? "ln -s ${infile_tbi} ${outfile}.${infile_tbi.extension}" : "" + """ + echo ${args} + + ${touch_cmd} > ${outfile} + + ${tabix_cmd} + ${link_tabix_cmd} + """ +} diff --git a/modules/nf-core/htslib/bgziptabix/meta.yml b/modules/nf-core/htslib/bgziptabix/meta.yml new file mode 100644 index 000000000000..4cdefd0e16dc --- /dev/null +++ b/modules/nf-core/htslib/bgziptabix/meta.yml @@ -0,0 +1,125 @@ +name: "htslib_bgziptabix" +description: "Multi-purpose module to compress, decompress and index files using bgzip + and tabix." +keywords: + - compress + - decompress + - index + - bgzip + - tabix + - gzip + - bzip + - xz +tools: + - "htslib": + description: "C library for high-throughput sequencing data formats." + homepage: "http://www.htslib.org/" + documentation: "http://www.htslib.org/doc/" + tool_dev_url: "https://github.com/samtools/htslib" + doi: "10.1093/gigascience/giab007" + licence: + - "MIT" + identifier: biotools:htslib +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample1' ] + - infile: + type: file + description: Input file to compress or decompress + pattern: "*" + ontologies: [] + - infile_tbi: + type: file + description: Optional tabix index for the input file. + pattern: "*.{tbi,csi}" + ontologies: + - edam: http://edamontology.org/format_3616 # tabix + - regions: + type: file + description: Optional file of regions to extract (BED or chr:start-end format). + Only used when creating an index for the output file. + pattern: "*.{bed,txt,tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + - edam: http://edamontology.org/format_3003 # BED + - action: + type: string + description: Action to perform, either `compress` or `decompress` + - make_index: + type: boolean + description: Whether to create a tabix index for the output file; only used + if `action` is `compress` + - out_ext: + type: string + description: Output file extension without `.gz` suffix (for example `vcf`) +output: + output: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample1' ] + - ${outfile}: + type: file + description: Compressed or decompressed output file + pattern: "*" + ontologies: [] + index: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample1' ] + - ${outfile}.{tbi,csi}: + type: file + description: Tabix index file for the compressed output file + pattern: "*.{tbi,csi}" + ontologies: + - edam: http://edamontology.org/format_3616 # tabix + versions_htslib: + - - ${task.process}: + type: string + description: The name of the process + - htslib: + type: string + description: The name of the tool + - bgzip --version | sed '1! d; s/bgzip (htslib) //': + type: eval + description: The expression to obtain the version of the tool + versions_xz: + - - ${task.process}: + type: string + description: The name of the process + - xz: + type: string + description: The name of the tool + - xz --version | sed '1! d; s/xz (XZ Utils) //': + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - htslib: + type: string + description: The name of the tool + - bgzip --version | sed '1! d; s/bgzip (htslib) //': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - xz: + type: string + description: The name of the tool + - xz --version | sed '1! d; s/xz (XZ Utils) //': + type: eval + description: The expression to obtain the version of the tool +authors: + - "@itrujnara" +maintainers: + - "@itrujnara" diff --git a/modules/nf-core/htslib/bgziptabix/tests/main.nf.test b/modules/nf-core/htslib/bgziptabix/tests/main.nf.test new file mode 100644 index 000000000000..cde03546fd0d --- /dev/null +++ b/modules/nf-core/htslib/bgziptabix/tests/main.nf.test @@ -0,0 +1,463 @@ +nextflow_process { + + name "Test Process HTSLIB_BGZIPTABIX" + script "../main.nf" + process "HTSLIB_BGZIPTABIX" + + tag "modules" + tag "modules_nfcore" + tag "htslib" + tag "htslib/bgziptabix" + + test("sarscov2 - vcf - decompress") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), + [], + [] + ] + input[1] = 'decompress' // action + input[2] = false // make_index + input[3] = 'vcf' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.vcf') }, + { assert process.out.index.size() == 0 } + ) + } + + } + + test("sarscov2 - vcf - compress - index") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), + [], + [] + ] + input[1] = 'compress' // action + input[2] = true // make_index + input[3] = 'vcf' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.vcf.gz') }, + { assert process.out.index.get(0).get(1).endsWith('.vcf.gz.tbi') } + ) + } + + } + + test("sarscov2 - vcf + regions - compress - index") { + when { + process { + """ + input[0] = [ + [ id:'example' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file('https://raw.githubusercontent.com/luisas/test-datasets/refs/heads/add-bedgraph-subset-illumina/data/genomics/sarscov2/illumina/bed/test.bed', checkIfExists: true) + ] + input[1] = 'compress' // action + input[2] = true // make_index + input[3] = 'vcf' // out_ext + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.index, + path(process.out.output[0][1]).vcf.getVariantsMD5(), + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } + ) + } + } + + test("sarscov2 - bgzip - decompress") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = 'decompress' // action + input[2] = false // make_index + input[3] = 'vcf' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.vcf') }, + { assert process.out.index.size() == 0 } + ) + } + } + + test("sarscov2 - bgzip - compress - no index") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = 'compress' // action + input[2] = false // make_index + input[3] = 'vcf' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.vcf.gz') }, + { assert process.out.index.size() == 0 } + ) + } + + } + + test("sarscov2 - gzip - decompress") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + [], + [] + ] + input[1] = 'decompress' // action + input[2] = false // make_index + input[3] = 'fastq' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.fastq') }, + { assert process.out.index.size() == 0 } + ) + } + } + + test("sarscov2 - gzip - (re)compress - no index") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + [], + [] + ] + input[1] = 'compress' // action + input[2] = false // make_index + input[3] = 'fastq' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.fastq.gz') }, + { assert process.out.index.size() == 0 } + ) + } + } + + test("sarscov2 - gzip - name clash") { + + when { + process { + """ + input[0] = [ + [ id:'test_1' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + [], + [] + ] + input[1] = 'compress' // action + input[2] = false // make_index + input[3] = 'fastq' // out_ext + """ + } + } + + then { + assert process.failed + assertAll( + { assert process.errorReport.contains("Input and output names cannot be the same") } + ) + } + } + + test("metagenome - bz2 - decompress") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/prokaryotes/metagenome/rgi/card-data.tar.bz2', checkIfExists: true), + [], + [] + ] + input[1] = 'decompress' // action + input[2] = false // make_index + input[3] = 'tar' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.tar') }, + { assert process.out.index.size() == 0 } + ) + } + } + + test("metagenome - bz2 - (re)compress - no index") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/prokaryotes/metagenome/rgi/card-data.tar.bz2', checkIfExists: true), + [], + [] + ] + input[1] = 'compress' // action + input[2] = false // make_index + input[3] = 'tar' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.tar.gz') }, + { assert process.out.index.size() == 0 } + ) + } + } + + test("metagenome - xz - decompress") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/prokaryotes/metagenome/taxonomy/misc/taxa_sqlite.xz', checkIfExists: true), + [], + [] + ] + input[1] = 'decompress' // action + input[2] = false // make_index + input[3] = '' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('test') }, + { assert process.out.index.size() == 0 } + ) + } + } + + test("metagenome - xz - (re)compress - no index") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/prokaryotes/metagenome/taxonomy/misc/taxa_sqlite.xz', checkIfExists: true), + [], + [] + ] + input[1] = 'compress' // action + input[2] = false // make_index + input[3] = '' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() }, + { assert process.out.output.get(0).get(1).endsWith('.gz') }, + { assert process.out.index.size() == 0 } + ) + } + } + + test("sarscov2 - vcf - compress - index - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), + [], + [] + ] + input[1] = 'compress' // action + input[2] = true // make_index + input[3] = 'vcf' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - vcf - decompress - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = 'decompress' // action + input[2] = false // make_index + input[3] = 'vcf' // out_ext + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot(process.out).match() } + ) + } + + } + + test("illegal action") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), + [], + [] + ] + input[1] = 'invalid_action' // action + input[2] = true // make_index + input[3] = 'vcf' // out_ext + """ + } + } + + then { + assert process.failed + assert process.errorReport.contains("Invalid action: invalid_action. Allowed actions are: compress, decompress") + } + + } + +} diff --git a/modules/nf-core/htslib/bgziptabix/tests/main.nf.test.snap b/modules/nf-core/htslib/bgziptabix/tests/main.nf.test.snap new file mode 100644 index 000000000000..cbd4e3bc8869 --- /dev/null +++ b/modules/nf-core/htslib/bgziptabix/tests/main.nf.test.snap @@ -0,0 +1,995 @@ +{ + "sarscov2 - gzip - (re)compress - no index": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:30:32.391550457", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "metagenome - xz - (re)compress - no index": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.gz:md5,b8d852a2b1ee52ed64d83046dcdb9de2" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.gz:md5,b8d852a2b1ee52ed64d83046dcdb9de2" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:44:52.395458538", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "metagenome - bz2 - decompress": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.tar:md5,39e9e71fd16cfd09ceca12cd46e6abce" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.tar:md5,39e9e71fd16cfd09ceca12cd46e6abce" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:30:48.48636532", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - vcf - decompress - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.vcf:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:45:40.441558804", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - gzip - decompress": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:30:25.541539783", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - vcf - compress - index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "output": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:45:16.347879793", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - vcf - decompress": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.vcf:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:29:51.051014953", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "metagenome - bz2 - (re)compress - no index": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.tar.gz:md5,39e9e71fd16cfd09ceca12cd46e6abce" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.tar.gz:md5,39e9e71fd16cfd09ceca12cd46e6abce" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:30:58.628427144", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - vcf - compress - index": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,7f005943c935f2b55ba3f9d4802aa09f" + ] + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,7f005943c935f2b55ba3f9d4802aa09f" + ] + ], + "output": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:29:57.777418731", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "metagenome - xz - decompress": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test:md5,b8d852a2b1ee52ed64d83046dcdb9de2" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test:md5,b8d852a2b1ee52ed64d83046dcdb9de2" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:31:30.587093278", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - vcf - compress - no index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ] + } + ], + "timestamp": "2026-05-06T15:27:48.766118732", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - bgzip - compress - no index": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:30:18.777591499", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - vcf + regions - compress - index": { + "content": [ + [ + [ + { + "id": "example" + }, + "example.vcf.gz.tbi:md5,d22e5b84e4fcd18792179f72e6da702e" + ] + ], + "bc7bf3ee9e8430e064c539eb81e59bf9", + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:30:05.072037581", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "sarscov2 - bgzip - decompress": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "1": [ + + ], + "2": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "3": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ], + "index": [ + + ], + "output": [ + [ + { + "id": "test" + }, + "test.vcf:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + }, + { + "versions_htslib": [ + [ + "HTSLIB_BGZIPTABIX", + "htslib", + "1.23.1" + ] + ], + "versions_xz": [ + [ + "HTSLIB_BGZIPTABIX", + "xz", + "5.8.3" + ] + ] + } + ], + "timestamp": "2026-05-12T11:30:11.845127997", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test b/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test index 699e3157b244..8816277ee94c 100644 --- a/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test +++ b/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test @@ -9,7 +9,7 @@ nextflow_process { tag "modkit" tag "modkit/bedmethyltobigwig" tag "modkit/pileup" - tag "tabix/bgzip" + tag "htslib/bgziptabix" setup { run("MODKIT_PILEUP"){ @@ -27,11 +27,15 @@ nextflow_process { } } - run("TABIX_BGZIP"){ - script "../../../tabix/bgzip/main.nf" + run("HTSLIB_BGZIPTABIX"){ + script "../../../htslib/bgziptabix/main.nf" process { """ input[0] = MODKIT_PILEUP.out.bedgz + .map { meta, bedgz -> [meta, bedgz, [], []] } + input[1] = "decompress" + input[2] = false + input[3] = "bed" """ } } @@ -42,7 +46,7 @@ nextflow_process { when { process { """ - input[0] = TABIX_BGZIP.out.output + input[0] = HTSLIB_BGZIPTABIX.out.output input[1] = [ [ id : 'hg38' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) @@ -88,7 +92,7 @@ nextflow_process { when { process { """ - input[0] = TABIX_BGZIP.out.output + input[0] = HTSLIB_BGZIPTABIX.out.output input[1] = [ [ id : 'hg38' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) diff --git a/modules/nf-core/multivcfanalyzer/environment.yml b/modules/nf-core/multivcfanalyzer/environment.yml index 52d9057cfaf2..259a2b9564ba 100644 --- a/modules/nf-core/multivcfanalyzer/environment.yml +++ b/modules/nf-core/multivcfanalyzer/environment.yml @@ -4,5 +4,5 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.23 + - bioconda::htslib=1.23.1 - bioconda::multivcfanalyzer=0.89.0 diff --git a/modules/nf-core/multivcfanalyzer/main.nf b/modules/nf-core/multivcfanalyzer/main.nf index 8b8c01e5c9e2..5192a9a37c7e 100644 --- a/modules/nf-core/multivcfanalyzer/main.nf +++ b/modules/nf-core/multivcfanalyzer/main.nf @@ -4,8 +4,8 @@ process MULTIVCFANALYZER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/07/0713bc8b2176da50f1967ae24dd955f913b7288b966408220596e91c5c14aeeb/data' : - 'community.wave.seqera.io/library/htslib_multivcfanalyzer:6387733614faccad' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/79/7946097c8ad51df09c52ebf0b91d4f2c42ab74fd37ac3c00fd6acab0e3602136/data' : + 'community.wave.seqera.io/library/htslib_multivcfanalyzer:a64c201b4804e6cd' }" input: tuple val(meta), path(vcfs) diff --git a/modules/nf-core/multivcfanalyzer/tests/main.nf.test b/modules/nf-core/multivcfanalyzer/tests/main.nf.test index a26d0b879163..6a892878022f 100644 --- a/modules/nf-core/multivcfanalyzer/tests/main.nf.test +++ b/modules/nf-core/multivcfanalyzer/tests/main.nf.test @@ -7,7 +7,6 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "multivcfanalyzer" - tag "tabix/bgzip" tag "gatk/unifiedgenotyper" test("sarscov2 - vcf") { diff --git a/modules/nf-core/multivcfanalyzer/tests/main.nf.test.snap b/modules/nf-core/multivcfanalyzer/tests/main.nf.test.snap index baacc84175f2..b16dd77d887d 100644 --- a/modules/nf-core/multivcfanalyzer/tests/main.nf.test.snap +++ b/modules/nf-core/multivcfanalyzer/tests/main.nf.test.snap @@ -13,7 +13,7 @@ [ "MULTIVCFANALYZER", "tabix", - "1.23" + "1.23.1" ] ] }, @@ -63,11 +63,11 @@ } } ], + "timestamp": "2026-05-08T14:59:53.626235086", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-03-18T15:41:27.085433" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "sarscov2 - vcf - stub": { "content": [ @@ -107,7 +107,7 @@ [ "MULTIVCFANALYZER", "tabix", - "1.23" + "1.23.1" ] ], "2": [ @@ -273,7 +273,7 @@ [ "MULTIVCFANALYZER", "tabix", - "1.23" + "1.23.1" ] ] }, @@ -289,15 +289,15 @@ [ "MULTIVCFANALYZER", "tabix", - "1.23" + "1.23.1" ] ] } ], + "timestamp": "2026-05-08T15:00:05.521714771", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-03-18T15:45:17.21456" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file diff --git a/modules/nf-core/paraphase/environment.yml b/modules/nf-core/paraphase/environment.yml index 646441944589..d9211e4a3dd6 100644 --- a/modules/nf-core/paraphase/environment.yml +++ b/modules/nf-core/paraphase/environment.yml @@ -10,4 +10,4 @@ dependencies: # renovate: datasource=conda depName=bioconda/paraphase - bioconda::paraphase=3.5.0 # renovate: datasource=conda depName=bioconda/samtools - - bioconda::samtools=1.23 + - bioconda::samtools=1.23.1 diff --git a/modules/nf-core/paraphase/main.nf b/modules/nf-core/paraphase/main.nf index 04231185ce14..7f060e24183f 100644 --- a/modules/nf-core/paraphase/main.nf +++ b/modules/nf-core/paraphase/main.nf @@ -5,8 +5,8 @@ process PARAPHASE { conda "${moduleDir}/environment.yml" container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container - ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/d2/d2f7e7ef6dd6def56bef5252c28a65f279d5fcef09a832510d0de1d6dab09194/data' - : 'community.wave.seqera.io/library/minimap2_paraphase_samtools:2c52f03fe994efa6'}" + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/44/4438b3091fe6cc6f4c5bc79c1722f359155539b5f657846d11a76cd36b1df729/data' + : 'community.wave.seqera.io/library/minimap2_paraphase_samtools:a2e6a25ed8d1a8e5'}" input: tuple val(meta), path(bam), path(bai) @@ -68,7 +68,7 @@ process PARAPHASE { touch ${prefix}.paraphase.json touch ${prefix}.paraphase.bam touch ${prefix}.paraphase.bam.bai - echo '' | gzip > ${prefix}_paraphase_vcfs/${prefix}_stub.vcf.gz + echo "" | gzip > ${prefix}_paraphase_vcfs/${prefix}_stub.vcf.gz touch ${prefix}_paraphase_vcfs/${prefix}_stub.vcf.gz.${index} """ } diff --git a/modules/nf-core/paraphase/tests/main.nf.test b/modules/nf-core/paraphase/tests/main.nf.test index 4705fc152cdc..3b29259dd5b5 100644 --- a/modules/nf-core/paraphase/tests/main.nf.test +++ b/modules/nf-core/paraphase/tests/main.nf.test @@ -8,17 +8,22 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "paraphase" - tag "tabix/bgzip" + tag "htslib/bgziptabix" setup { - run("TABIX_BGZIP") { - script "../../tabix/bgzip/main.nf" + run("HTSLIB_BGZIPTABIX") { + script "../../htslib/bgziptabix/main.nf" process { """ input[0] = [ [ id:'test_ref' ], // meta map file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr22_chr22_KI270734v1_random/sequence/genome.fa.gz', checkIfExists: true), + [], + [] ] + input[1] = "decompress" + input[2] = false + input[3] = "fa" """ } } @@ -37,7 +42,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), ] - input[1] = TABIX_BGZIP.out.output + input[1] = HTSLIB_BGZIPTABIX.out.output input[2] = [ [:], [] @@ -77,7 +82,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), ] - input[1] = TABIX_BGZIP.out.output + input[1] = HTSLIB_BGZIPTABIX.out.output input[2] = [ [ id:'test_config' ], file(params.modules_testdata_base_path + 'generic/config/paraphase_config.yaml', checkIfExists: true), @@ -116,7 +121,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), ] - input[1] = TABIX_BGZIP.out.output + input[1] = HTSLIB_BGZIPTABIX.out.output input[2] = [ [ id:'test_config' ], file(params.modules_testdata_base_path + 'generic/config/paraphase_config.yaml', checkIfExists: true), @@ -156,7 +161,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), ] - input[1] = TABIX_BGZIP.out.output + input[1] = HTSLIB_BGZIPTABIX.out.output input[2] = [ [ id:'test_config' ], file(params.modules_testdata_base_path + 'generic/config/paraphase_config.yaml', checkIfExists: true), @@ -197,7 +202,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), ] - input[1] = TABIX_BGZIP.out.output + input[1] = HTSLIB_BGZIPTABIX.out.output input[2] = [ [:], [] @@ -229,7 +234,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), ] - input[1] = TABIX_BGZIP.out.output + input[1] = HTSLIB_BGZIPTABIX.out.output input[2] = [ [ id:'test_config' ], file(params.modules_testdata_base_path + 'generic/config/paraphase_config.yaml', checkIfExists: true), @@ -262,7 +267,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), ] - input[1] = TABIX_BGZIP.out.output + input[1] = HTSLIB_BGZIPTABIX.out.output input[2] = [ [ id:'test_config' ], file(params.modules_testdata_base_path + 'generic/config/paraphase_config.yaml', checkIfExists: true), diff --git a/modules/nf-core/paraphase/tests/main.nf.test.snap b/modules/nf-core/paraphase/tests/main.nf.test.snap index 5016be3d0e7d..4d8c79a24cf3 100644 --- a/modules/nf-core/paraphase/tests/main.nf.test.snap +++ b/modules/nf-core/paraphase/tests/main.nf.test.snap @@ -66,15 +66,15 @@ [ "PARAPHASE", "samtools", - "1.23" + "1.23.1" ] ] } ], - "timestamp": "2026-03-05T14:04:38.827925407", + "timestamp": "2026-05-08T14:50:17.296254762", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } }, "homo_sapiens - [ bam, bai ], no_vcf": { @@ -131,15 +131,15 @@ [ "PARAPHASE", "samtools", - "1.23" + "1.23.1" ] ] } ], - "timestamp": "2026-03-05T14:22:39.219497979", + "timestamp": "2026-05-08T14:50:46.83589087", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } }, "homo_sapiens - [ bam, bai ], config - stub": { @@ -208,15 +208,15 @@ [ "PARAPHASE", "samtools", - "1.23" + "1.23.1" ] ] } ], - "timestamp": "2026-03-05T14:05:34.4449022", + "timestamp": "2026-05-08T14:51:24.50756361", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } }, "homo_sapiens - [ bam, bai ], config - csi_index": { @@ -286,15 +286,15 @@ [ "PARAPHASE", "samtools", - "1.23" + "1.23.1" ] ] } ], - "timestamp": "2026-03-05T14:05:16.809547984", + "timestamp": "2026-05-08T14:51:03.735069977", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } }, "homo_sapiens - [ bam, bai ], [] - stub": { @@ -363,15 +363,15 @@ [ "PARAPHASE", "samtools", - "1.23" + "1.23.1" ] ] } ], - "timestamp": "2026-03-05T14:05:25.477896955", + "timestamp": "2026-05-08T14:51:13.727430134", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } }, "homo_sapiens - [ bam, bai ], config": { @@ -441,15 +441,15 @@ [ "PARAPHASE", "samtools", - "1.23" + "1.23.1" ] ] } ], - "timestamp": "2026-03-05T14:04:52.751574184", + "timestamp": "2026-05-08T14:50:34.175416206", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } }, "homo_sapiens - [ bam, bai ], config - stub - csi_index": { @@ -518,15 +518,15 @@ [ "PARAPHASE", "samtools", - "1.23" + "1.23.1" ] ] } ], - "timestamp": "2026-03-05T14:05:43.65305743", + "timestamp": "2026-05-08T14:51:34.514801984", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.4" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } } } \ No newline at end of file diff --git a/modules/nf-core/paraphrase/tests/main.nf.test b/modules/nf-core/paraphrase/tests/main.nf.test index 8f1494d1b2d6..ba02a4030929 100644 --- a/modules/nf-core/paraphrase/tests/main.nf.test +++ b/modules/nf-core/paraphrase/tests/main.nf.test @@ -7,19 +7,24 @@ nextflow_process { tag "modules" tag "modules_nfcore" - tag "tabix/bgzip" + tag "htslib/bgziptabix" tag "paraphase" tag "paraphrase" setup { - run("TABIX_BGZIP") { - script "../../tabix/bgzip/main.nf" + run("HTSLIB_BGZIPTABIX") { + script "../../htslib/bgziptabix/main.nf" process { """ input[0] = [ [ id:'test_ref' ], // meta map file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr22_chr22_KI270734v1_random/sequence/genome.fa.gz', checkIfExists: true), + [], + [] ] + input[1] = "decompress" + input[2] = false + input[3] = "fa" """ } } @@ -32,7 +37,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), ] - input[1] = TABIX_BGZIP.out.output + input[1] = HTSLIB_BGZIPTABIX.out.output input[2] = [ [:], [] diff --git a/modules/nf-core/samtools/bgzip/main.nf b/modules/nf-core/samtools/bgzip/main.nf index 424e99688865..87b33350e2af 100644 --- a/modules/nf-core/samtools/bgzip/main.nf +++ b/modules/nf-core/samtools/bgzip/main.nf @@ -12,41 +12,27 @@ process SAMTOOLS_BGZIP { val out_ext output: - tuple val(meta), path("${outfile}"), emit: output + tuple val(meta), path("output.gz"), emit: output tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), emit: versions_samtools, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - out_ext = out_ext ?: "fasta" - outfile = "${prefix}.${out_ext}.gz" - """ - FILE_TYPE=\$(htsfile ${infile}) - case "\$FILE_TYPE" in - *BGZF-compressed*) - # Do nothing or just rename if the file was already compressed - [ "\$(basename ${infile})" != "\$(basename ${outfile})" ] && ln -s ${infile} ${outfile} ;; - *gzip-compressed*) - [ "\$(basename ${infile})" == "\$(basename ${outfile})" ] && echo "Filename collision (\$basename ${infile})" && exit 1 - zcat ${infile} | bgzip -c ${args} -@${task.cpus} > ${outfile} ;; - *bzip2-compressed*) - bzcat ${infile} | bgzip -c ${args} -@${task.cpus} > ${outfile} ;; - *XZ-compressed*) - xzcat ${infile} | bgzip -c ${args} -@${task.cpus} > ${outfile} ;; - *) - bgzip -c ${args} -@${task.cpus} ${infile} > ${outfile} ;; - esac - """ + def deprecation_message = """ + WARNING: This module has been deprecated. Please use HTSLIB/BGZIPTABIX instead. + + Reason: + This module is duplicative of TABIX/BGZIPTABIX and HTSLIB/BGZIPTABIX. The new HTSLIB/BGZIPTABIX module provides equivalent functionality with a more predictable behavior and better interface. + """.stripIndent() + assert false: deprecation_message stub: - def prefix = task.ext.prefix ?: "${meta.id}" - out_ext = out_ext ?: "fasta" - outfile = "${prefix}.${out_ext}.gz" - """ - [ "\$(basename ${infile})" == "\$(basename ${outfile})" ] && echo "Filename collision \$(basename ${infile})" && exit 1 - echo '' | bgzip > ${outfile} - """ + def deprecation_message = """ + WARNING: This module has been deprecated. Please use HTSLIB/BGZIPTABIX instead. + + Reason: + This module is duplicative of TABIX/BGZIPTABIX and HTSLIB/BGZIPTABIX. The new HTSLIB/BGZIPTABIX module provides equivalent functionality with a more predictable behavior and better interface. + """.stripIndent() + assert false: deprecation_message } diff --git a/modules/nf-core/samtools/bgzip/meta.yml b/modules/nf-core/samtools/bgzip/meta.yml index 91eca4bfea5c..575663423986 100644 --- a/modules/nf-core/samtools/bgzip/meta.yml +++ b/modules/nf-core/samtools/bgzip/meta.yml @@ -1,5 +1,5 @@ name: samtools_bgzip -description: Converts an arbitrary compressed or uncompressed file to BGZIP +description: DEPRECATED. Use HTSLIB/BGZIPTABIX instead. Converts an arbitrary compressed or uncompressed file to BGZIP keywords: - compression - fasta @@ -43,7 +43,7 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - ${outfile}: + - output.gz: type: map description: | A FASTA file compressed with the BGZF algorithm. It will be diff --git a/modules/nf-core/samtools/bgzip/tests/main.nf.test b/modules/nf-core/samtools/bgzip/tests/main.nf.test index feb92ff23674..03325cf36c20 100644 --- a/modules/nf-core/samtools/bgzip/tests/main.nf.test +++ b/modules/nf-core/samtools/bgzip/tests/main.nf.test @@ -9,7 +9,7 @@ nextflow_process { tag "samtools" tag "samtools/bgzip" - test("test_samtools_bgzip - fasta") { + test("test_samtools_bgzip - deprecated") { when { process { @@ -23,95 +23,13 @@ nextflow_process { then { assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.failed }, + { assert process.errorReport.contains("WARNING: This module has been deprecated.") } ) } } - test("test_samtools_bgzip - fasta bgzipped") { - - 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] = 'fasta' // suffix - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_samtools_bgzip - fasta bgzipped same name") { - // This checks that the module avoids file name clashes when input is already bzipped. - - when { - process { - """ - input[0] = [ [ id:'genome', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) ] - input[1] = 'fasta' // suffix - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_samtools_bgzip - proteome gzipped") { - // This file is not bgziped. It is used to check the re-zipping branch of the case statement in the module. - - when { - process { - """ - input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta.gz', checkIfExists: true) ] - input[1] = 'fasta' // suffix - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_samtools_bgzip - vcf gzipped") { - - when { - process { - """ - input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) ] - input[1] = 'vcf' // suffix - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_samtools_bgzip - fasta stub") { + test("test_samtools_bgzip - deprecated - stub") { options "-stub" when { @@ -126,8 +44,8 @@ nextflow_process { then { assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.failed }, + { assert process.errorReport.contains("WARNING: This module has been deprecated.") } ) } } diff --git a/modules/nf-core/tabix/bgzip/main.nf b/modules/nf-core/tabix/bgzip/main.nf index 9acb2ef8d906..8768c96b5ba7 100644 --- a/modules/nf-core/tabix/bgzip/main.nf +++ b/modules/nf-core/tabix/bgzip/main.nf @@ -11,7 +11,7 @@ process TABIX_BGZIP { tuple val(meta), path(input) output: - tuple val(meta), path("${output}"), emit: output + tuple val(meta), path("output.gz"), emit: output tuple val(meta), path("*.gzi") , emit: gzi, optional: true tuple val("${task.process}"), val('tabix'), eval("tabix -h 2>&1 | grep -oP 'Version:\\s*\\K[^\\s]+'") , topic: versions , emit: versions_tabix @@ -19,30 +19,20 @@ process TABIX_BGZIP { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - in_bgzip = ["gz", "bgz", "bgzf"].contains(input.getExtension()) - extension = in_bgzip ? input.getBaseName().tokenize(".")[-1] : input.getExtension() - output = in_bgzip ? "${prefix}.${extension}" : "${prefix}.${extension}.gz" - command = in_bgzip ? '-d' : '' - // Name the index according to $prefix, unless a name has been requested - 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" - } - """ - bgzip $command -c $args -@${task.cpus} $input > ${output} - - """ + def deprecation_message = """ + WARNING: This module has been deprecated. Please use HTSLIB/BGZIPTABIX instead. - stub: - prefix = task.ext.prefix ?: "${meta.id}" - in_bgzip = ["gz", "bgz", "bgzf"].contains(input.getExtension()) - output = in_bgzip ? input.getBaseName() : "${prefix}.${input.getExtension()}.gz" + Reason: + This module is duplicative of TABIX/BGZIPTABIX and SAMTOOLS/BGZIP. The new HTSLIB/BGZIPTABIX module provides equivalent functionality with a more predictable behavior and better interface. + """.stripIndent() + assert false: deprecation_message - """ - echo "" | gzip > ${output} - touch ${output}.gzi + stub: + def deprecation_message = """ + WARNING: This module has been deprecated. Please use HTSLIB/BGZIPTABIX instead. - """ + Reason: + This module is duplicative of TABIX/BGZIPTABIX and SAMTOOLS/BGZIP. The new HTSLIB/BGZIPTABIX module provides equivalent functionality with a more predictable behavior and better interface. + """.stripIndent() + assert false: deprecation_message } diff --git a/modules/nf-core/tabix/bgzip/meta.yml b/modules/nf-core/tabix/bgzip/meta.yml index 7b56e897cc18..d704dcf29825 100644 --- a/modules/nf-core/tabix/bgzip/meta.yml +++ b/modules/nf-core/tabix/bgzip/meta.yml @@ -1,5 +1,5 @@ name: tabix_bgzip -description: Compresses/decompresses files +description: DEPRECATED. Use HTSLIB/BGZIPTABIX instead. Compresses/decompresses files keywords: - compress - decompress @@ -31,7 +31,7 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - ${output}: + - output.gz: type: file description: Output compressed/decompressed file pattern: "*." diff --git a/modules/nf-core/tabix/bgzip/tests/main.nf.test b/modules/nf-core/tabix/bgzip/tests/main.nf.test index 00e7c098402b..e4eca15e9c84 100644 --- a/modules/nf-core/tabix/bgzip/tests/main.nf.test +++ b/modules/nf-core/tabix/bgzip/tests/main.nf.test @@ -9,7 +9,7 @@ nextflow_process { tag "tabix" tag "tabix/bgzip" - test("sarscov2_vcf_bgzip_compress") { + test("sarscov2 - vcf - bgzip - compress - deprecated") { when { process { """ @@ -23,41 +23,13 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.output[0][1]).name - ).match("bgzip_test") - } + { assert process.failed }, + { assert process.errorReport.contains("WARNING: This module has been deprecated.") } ) } } - test("homo_genome_bedgz_compress") { - when { - process { - """ - input[0] = [ - [ id:'bedgz_test' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed.gz', checkIfExists: true) ] - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.output[0][1]).name - ).match("bedgz_test") - } - ) - } - } - - test("sarscov2_vcf_bgzip_compress_stub") { + test("sarscov2 - vcf - bgzip - compress - deprecated - stub") { options '-stub' config "./bgzip_compress.config" @@ -74,37 +46,8 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.output[0][1]).name - ).match("test_stub") - } - ) - } - } - - test("sarscov2_vcf_bgzip_compress_gzi") { - config "./bgzip_compress.config" - when { - process { - """ - input[0] = [ - [ id:"gzi_compress_test" ], - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.gzi[0][1]).name - ).match("gzi_compress_test") - } + { assert process.failed }, + { assert process.errorReport.contains("WARNING: This module has been deprecated.") } ) } } diff --git a/modules/nf-core/tabix/bgziptabix/main.nf b/modules/nf-core/tabix/bgziptabix/main.nf index 9c901b6ba81e..faf928fb44ff 100644 --- a/modules/nf-core/tabix/bgziptabix/main.nf +++ b/modules/nf-core/tabix/bgziptabix/main.nf @@ -19,22 +19,20 @@ process TABIX_BGZIPTABIX { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - bgzip --threads ${task.cpus} -c $args $input > ${prefix}.${input.getExtension()}.gz - tabix --threads ${task.cpus} $args2 ${prefix}.${input.getExtension()}.gz + def deprecation_message = """ + WARNING: This module has been deprecated. Please use HTSLIB/BGZIPTABIX instead. - """ + Reason: + This module is duplicative of HTSLIB/BGZIPTABIX. The HTSLIB/BGZIPTABIX module is the canonical replacement and provides equivalent functionality through HTSlib with a more predictable behavior and better interface. + """.stripIndent() + assert false: deprecation_message stub: - def prefix = task.ext.prefix ?: "${meta.id}" - def args2 = task.ext.args2 ?: '' - def index = args2.contains("-C ") || args2.contains("--csi") ? "csi" : "tbi" - """ - echo "" | gzip > ${prefix}.${input.getExtension()}.gz - touch ${prefix}.${input.getExtension()}.gz.${index} - - """ + def deprecation_message = """ + WARNING: This module has been deprecated. Please use HTSLIB/BGZIPTABIX instead. + + Reason: + This module is duplicative of HTSLIB/BGZIPTABIX. The HTSLIB/BGZIPTABIX module is the canonical replacement and provides equivalent functionality through HTSlib with a more predictable behavior and better interface. + """.stripIndent() + assert false: deprecation_message } diff --git a/modules/nf-core/tabix/bgziptabix/meta.yml b/modules/nf-core/tabix/bgziptabix/meta.yml index 2a3078c55faa..ed6e1569c3a8 100644 --- a/modules/nf-core/tabix/bgziptabix/meta.yml +++ b/modules/nf-core/tabix/bgziptabix/meta.yml @@ -1,5 +1,5 @@ name: tabix_bgziptabix -description: bgzip a sorted tab-delimited genome file and then create tabix +description: DEPRECATED. Use HTSLIB/BGZIPTABIX instead. bgzip a sorted tab-delimited genome file and then create tabix index keywords: - bgzip diff --git a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test index 1955b143e365..7f9f72bfd6ab 100644 --- a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test +++ b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_process { config "./nextflow.config" - test("sarscov2_bed_tbi") { + test("sarscov2 - bed - tbi - deprecated") { when { params { module_args = '-p vcf' @@ -28,63 +28,13 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.failed }, + { assert process.errorReport.contains("WARNING: This module has been deprecated.") } ) } } - test("sarscov2_bed_csi") { - when { - params { - module_args = '-p vcf --csi' - } - process { - """ - input[0] = [ - [ id:'csi_test' ], - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2_bed_csi_stub") { - options "-stub" - - when { - params { - module_args = '-p vcf --csi' - } - process { - """ - input[0] = [ - [ id:'test' ], - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2_bed_tbi_stub") { + test("sarscov2 - bed - tbi - deprecated - stub") { options "-stub" when { @@ -103,11 +53,10 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.failed }, + { assert process.errorReport.contains("WARNING: This module has been deprecated.") } ) } - } } diff --git a/modules/nf-core/tabix/tabix/main.nf b/modules/nf-core/tabix/tabix/main.nf index 6ade19760716..a150f0a260bf 100644 --- a/modules/nf-core/tabix/tabix/main.nf +++ b/modules/nf-core/tabix/tabix/main.nf @@ -11,37 +11,29 @@ process TABIX_TABIX { tuple val(meta), path(tab), path(tai), path(regions) output: - tuple val(meta), path("*.{tbi,csi}"), emit: index, optional: true - tuple val(meta), path("${prefix}.*gz"), emit: extracted, optional: true - tuple val("${task.process}"), val('tabix'), eval("tabix -h 2>&1 | grep -oP 'Version:\\s*\\K[^\\s]+'") , topic: versions , emit: versions_tabix + tuple val(meta), path("*.{tbi,csi}"), emit: index , optional: true + tuple val(meta), path("output.*gz") , emit: extracted, optional: true + tuple val("${task.process}"), val('tabix'), eval("tabix -h 2>&1 | grep -oP 'Version:\\s*\\K[^\\s]+'"), topic: versions, emit: versions_tabix when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def tab_suffix = tab.name.indexOf('.') >= 0 ? tab.name.substring(tab.name.indexOf('.')) : '' - def regions_arg = regions ? "-R ${regions}" : "" - def output_arg = regions ? "| bgzip --threads ${task.cpus} > ${prefix}${tab_suffix}" : "" - """ - tabix \\ - ${regions_arg} \\ - --threads $task.cpus \\ - $args \\ - $tab \\ - ${output_arg} - - """ + def deprecation_message = """ + WARNING: This module has been deprecated. Please use HTSLIB/BGZIPTABIX instead. + + Reason: + This module is duplicative of HTSLIB/BGZIPTABIX. The HTSLIB/BGZIPTABIX module is the canonical replacement and provides equivalent functionality through HTSlib with a more predictable behavior and better interface. + """.stripIndent() + assert false: deprecation_message + stub: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def tab_suffix = tab.name.indexOf('.') >= 0 ? tab.name.substring(tab.name.indexOf('.')) : '' - def ext = args.contains("-C ") || args.contains("--csi") ? "csi" : "tbi" - def index = regions ? "" : "touch ${tab}.${ext}" - def extracted = regions ? "echo | gzip > ${prefix}${tab_suffix}" : "" - """ - ${index} - ${extracted} - """ + def deprecation_message = """ + WARNING: This module has been deprecated. Please use HTSLIB/BGZIPTABIX instead. + + Reason: + This module is duplicative of HTSLIB/BGZIPTABIX. The HTSLIB/BGZIPTABIX module is the canonical replacement and provides equivalent functionality through HTSlib with a more predictable behavior and better interface. + """.stripIndent() + assert false: deprecation_message + } diff --git a/modules/nf-core/tabix/tabix/meta.yml b/modules/nf-core/tabix/tabix/meta.yml index 5c32b22a26bc..244ed18a3a91 100644 --- a/modules/nf-core/tabix/tabix/meta.yml +++ b/modules/nf-core/tabix/tabix/meta.yml @@ -1,7 +1,8 @@ name: tabix_tabix description: | - Create a tabix index from a sorted bgzip TAB-delimited genome file, or - extract regions from a bgzipped VCF file using an optional regions file. + DEPRECATED. Use HTSLIB/BGZIPTABIX instead. Create a tabix index from a sorted + bgzip TAB-delimited genome file, or extract regions from a bgzipped VCF file + using an optional regions file. keywords: - index - tabix @@ -62,7 +63,7 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "${prefix}.*gz": + - "output.*gz": type: file description: Bgzipped file of extracted regions, preserving the input file extension. Emitted when a regions file is provided. diff --git a/modules/nf-core/tabix/tabix/tests/main.nf.test b/modules/nf-core/tabix/tabix/tests/main.nf.test index 280eac25959d..aa0df9701c24 100644 --- a/modules/nf-core/tabix/tabix/tests/main.nf.test +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_process { config "./nextflow.config" - test("sarscov2_bedgz_tbi") { + test("sarscov2 - bed gz - deprecated") { when { params { module_args = '-p bed' @@ -30,156 +30,23 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.failed }, + { assert process.errorReport.contains("WARNING: This module has been deprecated.") } ) } } - test("sarscov2_gff_tbi") { - when { - params { - module_args = '-p gff' - } - process { - """ - input[0] = [ - [ id:'tbi_gff' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true), - [], - [] - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2_vcf_tbi") { - when { - params { - module_args = '-p vcf' - } - process { - """ - input[0] = [ - [ id:'tbi_vcf' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), - [], - [] - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2_vcf_csi") { - when { - params { - module_args = '-p vcf --csi' - } - process { - """ - input[0] = [ - [ id:'vcf_csi' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), - [], - [] - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2_vcf_tbi_regions") { - when { - params { - module_args = '-h' - } - process { - """ - input[0] = [ - [ id:'vcf_regions' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), - file('https://raw.githubusercontent.com/luisas/test-datasets/refs/heads/add-bedgraph-subset-illumina/data/genomics/sarscov2/illumina/bed/test.bed', checkIfExists: true) - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot( - process.out.index, - path(process.out.extracted[0][1]).vcf.getVariantsMD5(), - process.out.versions_tabix - ).match() } - ) - } - } - - test("sarscov2_vcf_tbi_regions_stub") { + test("sarscov2 - bed gz - deprecated - stub") { options "-stub" when { params { - module_args = '' + module_args = '-p bed' } process { """ input[0] = [ - [ id:'vcf_regions_stub' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), - file('https://raw.githubusercontent.com/luisas/test-datasets/refs/heads/add-bedgraph-subset-illumina/data/genomics/sarscov2/illumina/bed/test.bed', checkIfExists: true) - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(sanitizeOutput(process.out)).match() } - ) - } - } - - test("sarscov2_vcf_csi_stub") { - options "-stub" - when { - params { - module_args = '-p vcf --csi' - } - process { - """ - input[0] = [ - [ id:'vcf_csi_stub' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [ id:'tbi_bed_stub' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed.gz', checkIfExists: true), [], [] ] @@ -189,8 +56,8 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.failed }, + { assert process.errorReport.contains("WARNING: This module has been deprecated.") } ) } } diff --git a/modules/nf-core/wittyer/tests/main.nf.test b/modules/nf-core/wittyer/tests/main.nf.test index 3319f2620762..b807a99f37d4 100644 --- a/modules/nf-core/wittyer/tests/main.nf.test +++ b/modules/nf-core/wittyer/tests/main.nf.test @@ -7,33 +7,43 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "wittyer" - tag "tabix/bgzip" + tag "htslib/bgziptabix" config "./nextflow.config" setup { - run('TABIX_BGZIP', alias: 'TABIX_BGZIP_1') { - script "../../../nf-core/tabix/bgzip" + run('HTSLIB_BGZIPTABIX', alias: 'HTSLIB_BGZIPTABIX_1') { + script "../../../nf-core/htslib/bgziptabix/main.nf" process { """ input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/chr21/simulated_sv.vcf.gz', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/chr21/simulated_sv.vcf.gz', checkIfExists: true), + [], + [] ] + input[1] = "decompress" + input[2] = false + input[3] = "vcf" """ } } - run('TABIX_BGZIP', alias: 'TABIX_BGZIP_2') { - script "../../../nf-core/tabix/bgzip" + run('HTSLIB_BGZIPTABIX', alias: 'HTSLIB_BGZIPTABIX_2') { + script "../../../nf-core/htslib/bgziptabix/main.nf" process { """ input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/chr21/simulated_sv2.vcf.gz', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/chr21/simulated_sv2.vcf.gz', checkIfExists: true), + [], + [] ] + input[1] = "decompress" + input[2] = false + input[3] = "vcf" """ } } @@ -44,7 +54,7 @@ nextflow_process { when { process { """ - input[0] = TABIX_BGZIP_1.out.output.join(TABIX_BGZIP_2.out.output).map{meta, vcf1, vcf2 -> tuple(meta, vcf1, vcf2, [], [])} + input[0] = HTSLIB_BGZIPTABIX_1.out.output.join(HTSLIB_BGZIPTABIX_2.out.output).map{meta, vcf1, vcf2 -> tuple(meta, vcf1, vcf2, [], [])} """ } } @@ -68,8 +78,8 @@ nextflow_process { when { process { """ - input[0] = TABIX_BGZIP_1.out.output - .join(TABIX_BGZIP_2.out.output) + input[0] = HTSLIB_BGZIPTABIX_1.out.output + .join(HTSLIB_BGZIPTABIX_2.out.output) .map{meta, vcf1, vcf2 -> tuple(meta, vcf1, vcf2, [file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true)], @@ -98,8 +108,8 @@ nextflow_process { when { process { """ - input[0] = TABIX_BGZIP_1.out.output - .join(TABIX_BGZIP_2.out.output) + input[0] = HTSLIB_BGZIPTABIX_1.out.output + .join(HTSLIB_BGZIPTABIX_2.out.output) .map{meta, vcf1, vcf2 -> tuple(meta, vcf1, vcf2, [], // change to config file @@ -130,8 +140,8 @@ nextflow_process { when { process { """ - input[0] = TABIX_BGZIP_1.out.output - .join(TABIX_BGZIP_2.out.output) + input[0] = HTSLIB_BGZIPTABIX_1.out.output + .join(HTSLIB_BGZIPTABIX_2.out.output) .map{meta, vcf1, vcf2 -> tuple(meta, vcf1, vcf2, [], [file(params.modules_testdata_base_path + 'generic/config/wittyer_config.json', checkIfExists: true)]) diff --git a/modules/nf-core/wittyer/tests/nextflow.config b/modules/nf-core/wittyer/tests/nextflow.config index a78e20265631..93616609b8bc 100644 --- a/modules/nf-core/wittyer/tests/nextflow.config +++ b/modules/nf-core/wittyer/tests/nextflow.config @@ -1,9 +1,9 @@ process{ - withName: TABIX_BGZIP_1 { - ext.prefix = {input.toString() - ".vcf.gz"} + withName: HTSLIB_BGZIPTABIX_1 { + ext.prefix = {infile.getName() - ".vcf.gz"} } - withName: TABIX_BGZIP_2 { - ext.prefix = {input.toString() - ".vcf.gz"} + withName: HTSLIB_BGZIPTABIX_2 { + ext.prefix = {infile.getName() - ".vcf.gz"} } withName: WITTYER { containerOptions = { diff --git a/subworkflows/nf-core/bam_variant_calling_mpileup_bcftools/tests/main.nf.test b/subworkflows/nf-core/bam_variant_calling_mpileup_bcftools/tests/main.nf.test index 27fdc93b8366..6965ce7da512 100644 --- a/subworkflows/nf-core/bam_variant_calling_mpileup_bcftools/tests/main.nf.test +++ b/subworkflows/nf-core/bam_variant_calling_mpileup_bcftools/tests/main.nf.test @@ -14,8 +14,6 @@ nextflow_workflow { tag "vcf_gather_bcftools" tag "gawk" - tag "tabix" - tag "tabix/bgzip" tag "bcftools" tag "bcftools/mpileup" tag "bcftools/annotate" diff --git a/subworkflows/nf-core/bam_variant_calling_mpileup_bcftools/tests/main.nf.test.snap b/subworkflows/nf-core/bam_variant_calling_mpileup_bcftools/tests/main.nf.test.snap index c749af80c6c7..58c04be86b4b 100644 --- a/subworkflows/nf-core/bam_variant_calling_mpileup_bcftools/tests/main.nf.test.snap +++ b/subworkflows/nf-core/bam_variant_calling_mpileup_bcftools/tests/main.nf.test.snap @@ -11,17 +11,17 @@ "NA12878_22.vcf.gz", "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=902, phased=false, phasedAutodetect=false]", "b852b1cae943360e00ab93004509808a", - "NA12878_22.vcf.gz.tbi" + "all_samples.vcf.gz.tbi" ] ], [ "NA12878_22.bcftools_stats.txt:md5,99e061326bb518f555db886788420467" ] ], - "timestamp": "2026-03-23T01:55:41.061652061", + "timestamp": "2026-05-08T14:29:45.990449432", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.2" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } }, "Two individuals and two chromosomes, sort and annotate": { @@ -64,7 +64,7 @@ "all_samples_all_chr.concat.vcf.gz", "VcfFile [chromosomes=[chr21, chr22], sampleCount=1, variantCount=1737, phased=false, phasedAutodetect=false]", "2e125158b5531e9325cc00f004cebeeb", - "all_samples_all_chr.concat.vcf.gz.tbi" + "all_samples.vcf.gz.tbi" ] ], [ @@ -72,10 +72,10 @@ "NA12878_22.bcftools_stats.txt:md5,99e061326bb518f555db886788420467" ] ], - "timestamp": "2026-03-23T01:55:55.943228912", + "timestamp": "2026-05-08T14:29:58.835487732", "meta": { - "nf-test": "0.9.4", - "nextflow": "25.10.2" + "nf-test": "0.9.5", + "nextflow": "26.04.0" } } } \ No newline at end of file diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep/tests/main.nf.test b/subworkflows/nf-core/vcf_annotate_ensemblvep/tests/main.nf.test index 03e186d7db8d..17f402d4bbb9 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep/tests/main.nf.test +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep/tests/main.nf.test @@ -8,7 +8,6 @@ nextflow_workflow { tag "subworkflows_nfcore" tag "subworkflows/vcf_annotate_ensemblvep" tag "ensemblvep/vep" - tag "tabix/tabix" config "./nextflow.config" diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/main.nf b/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/main.nf index 3ee3fb26c75d..cb6443034439 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/main.nf +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/main.nf @@ -2,13 +2,13 @@ // Run VEP and/or SNPEFF to annotate VCF files // -include { BCFTOOLS_CONCAT } from '../../../modules/nf-core/bcftools/concat' -include { BCFTOOLS_PLUGINSCATTER } from '../../../modules/nf-core/bcftools/pluginscatter' -include { BCFTOOLS_SORT } from '../../../modules/nf-core/bcftools/sort' -include { ENSEMBLVEP_VEP } from '../../../modules/nf-core/ensemblvep/vep' -include { SNPEFF_SNPEFF } from '../../../modules/nf-core/snpeff/snpeff' -include { TABIX_BGZIP } from '../../../modules/nf-core/tabix/bgzip' -include { TABIX_TABIX } from '../../../modules/nf-core/tabix/tabix' +include { BCFTOOLS_CONCAT } from '../../../modules/nf-core/bcftools/concat' +include { BCFTOOLS_PLUGINSCATTER } from '../../../modules/nf-core/bcftools/pluginscatter' +include { BCFTOOLS_SORT } from '../../../modules/nf-core/bcftools/sort' +include { ENSEMBLVEP_VEP } from '../../../modules/nf-core/ensemblvep/vep' +include { SNPEFF_SNPEFF } from '../../../modules/nf-core/snpeff/snpeff' +include { HTSLIB_BGZIPTABIX as COMPRESS_VCF } from '../../../modules/nf-core/htslib/bgziptabix/main.nf' +include { HTSLIB_BGZIPTABIX as INDEX_VCF } from '../../../modules/nf-core/htslib/bgziptabix/main.nf' workflow VCF_ANNOTATE_ENSEMBLVEP_SNPEFF { take: @@ -116,11 +116,14 @@ workflow VCF_ANNOTATE_ENSEMBLVEP_SNPEFF { ch_snpeff_html = SNPEFF_SNPEFF.out.summary_html ch_snpeff_genes = SNPEFF_SNPEFF.out.genes_txt - TABIX_BGZIP( - SNPEFF_SNPEFF.out.vcf + COMPRESS_VCF( + SNPEFF_SNPEFF.out.vcf.map { meta, vcf -> [meta, vcf, [], []] }, + "compress", + false, + "vcf" ) - ch_snpeff_output = TABIX_BGZIP.out.output + ch_snpeff_output = COMPRESS_VCF.out.output } else { ch_snpeff_output = ch_vep_output @@ -166,10 +169,15 @@ workflow VCF_ANNOTATE_ENSEMBLVEP_SNPEFF { return [meta, vcf, []] } - TABIX_TABIX(ch_tabix_input.bgzip.map { meta, vcf -> [meta, vcf, [], []] }) + INDEX_VCF( + ch_tabix_input.bgzip.map { meta, vcf -> [meta, vcf, [], []] }, + "compress", + true, + "vcf" + ) def ch_vcf_tbi = ch_tabix_input.bgzip - .join(TABIX_TABIX.out.index, failOnDuplicate: true, failOnMismatch: true) + .join(INDEX_VCF.out.index, failOnDuplicate: true, failOnMismatch: true) .mix(ch_tabix_input.unzip) emit: diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/meta.yml b/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/meta.yml index 8e0e205537fa..26f6b5b5c0aa 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/meta.yml +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/meta.yml @@ -12,8 +12,7 @@ components: - ensemblvep/vep - snpeff/download - snpeff/snpeff - - tabix/tabix - - tabix/bgzip + - htslib/bgziptabix - bcftools/pluginscatter - bcftools/concat - bcftools/sort diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/tests/main.nf.test b/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/tests/main.nf.test index 85bc7a58e78e..951d9f8be16f 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/tests/main.nf.test +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/tests/main.nf.test @@ -9,8 +9,7 @@ nextflow_workflow { tag "subworkflows/vcf_annotate_ensemblvep_snpeff" tag "ensemblvep/vep" tag "snpeff/snpeff" - tag "tabix/tabix" - tag "tabix/bgzip" + tag "htslib/bgziptabix" tag "bcftools/pluginscatter" tag "bcftools/concat" tag "bcftools/sort" diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/tests/main.nf.test.snap b/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/tests/main.nf.test.snap index f400e4c76403..1691027d4e75 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/tests/main.nf.test.snap +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep_snpeff/tests/main.nf.test.snap @@ -146,11 +146,11 @@ ] ], + "timestamp": "2026-01-27T15:42:18.478291", "meta": { "nf-test": "0.9.3", "nextflow": "25.10.3" - }, - "timestamp": "2026-01-27T15:42:18.478291" + } }, "sarscov2 - ensemblvep - large chunks": { "content": [ @@ -191,11 +191,11 @@ ] ], + "timestamp": "2026-01-20T12:44:15.673809362", "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" - }, - "timestamp": "2026-01-20T12:44:15.673809362" + } }, "sarscov2 - snpeff + ensemblvep": { "content": [ @@ -296,11 +296,11 @@ ] ], + "timestamp": "2026-01-27T15:43:01.336201", "meta": { "nf-test": "0.9.3", "nextflow": "25.10.3" - }, - "timestamp": "2026-01-27T15:43:01.336201" + } }, "sarscov2 - ensemblvep - no scatter": { "content": [ @@ -311,7 +311,7 @@ "single_end": false }, "custom_test.vep.vcf.gz,variantsMD5:38fc31c1429fffc7727ce5db161fdb66", - "custom_test.vep.vcf.gz.tbi" + "custom_test.vcf.gz.tbi" ] ], [ @@ -338,11 +338,11 @@ ] ], + "timestamp": "2026-05-08T08:21:33.916839923", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-20T10:47:27.604904698" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "sarscov2 - ensemblvep": { "content": [ @@ -392,10 +392,10 @@ ] ], + "timestamp": "2026-01-20T12:42:57.541734749", "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" - }, - "timestamp": "2026-01-20T12:42:57.541734749" + } } } \ No newline at end of file diff --git a/subworkflows/nf-core/vcf_annotate_snpeff/main.nf b/subworkflows/nf-core/vcf_annotate_snpeff/main.nf index 3eccc896f893..3ffe0ebf50f9 100644 --- a/subworkflows/nf-core/vcf_annotate_snpeff/main.nf +++ b/subworkflows/nf-core/vcf_annotate_snpeff/main.nf @@ -3,7 +3,7 @@ // include { SNPEFF_SNPEFF } from '../../../modules/nf-core/snpeff/snpeff' -include { TABIX_BGZIPTABIX } from '../../../modules/nf-core/tabix/bgziptabix' +include { HTSLIB_BGZIPTABIX } from '../../../modules/nf-core/htslib/bgziptabix' workflow VCF_ANNOTATE_SNPEFF { take: @@ -13,12 +13,20 @@ workflow VCF_ANNOTATE_SNPEFF { main: SNPEFF_SNPEFF(ch_vcf, val_snpeff_db, ch_snpeff_cache) - TABIX_BGZIPTABIX(SNPEFF_SNPEFF.out.vcf) + HTSLIB_BGZIPTABIX( + SNPEFF_SNPEFF.out.vcf.map { meta, vcf -> [ meta, vcf, [], [] ] }, + "compress", + true, + "vcf" + ) + ch_vcf_tbi = HTSLIB_BGZIPTABIX.out.output.join( + HTSLIB_BGZIPTABIX.out.index + ) emit: - vcf_tbi = TABIX_BGZIPTABIX.out.gz_index // channel: [ val(meta), path(vcf), path(tbi) ] - reports = SNPEFF_SNPEFF.out.report // channel: [ path(html) ] + vcf_tbi = ch_vcf_tbi // channel: [ val(meta), path(vcf), path(tbi) ] + reports = SNPEFF_SNPEFF.out.report // channel: [ path(html) ] summary = SNPEFF_SNPEFF.out.summary_html // channel: [ path(html) ] - genes_txt = SNPEFF_SNPEFF.out.genes_txt // channel: [ path(genes.txt) ] + genes_txt = SNPEFF_SNPEFF.out.genes_txt // channel: [ path(genes.txt) ] } diff --git a/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml b/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml index bf2db6523b54..17aa43605d72 100644 --- a/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml +++ b/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml @@ -8,7 +8,7 @@ keywords: components: - snpeff - snpeff/snpeff - - tabix/bgziptabix + - htslib/bgziptabix input: - ch_vcf: description: | diff --git a/subworkflows/nf-core/vcf_annotate_snpeff/tests/main.nf.test b/subworkflows/nf-core/vcf_annotate_snpeff/tests/main.nf.test index 5c508267d6cb..86fc3c8c4ca8 100644 --- a/subworkflows/nf-core/vcf_annotate_snpeff/tests/main.nf.test +++ b/subworkflows/nf-core/vcf_annotate_snpeff/tests/main.nf.test @@ -8,7 +8,7 @@ nextflow_workflow { tag "subworkflows_nfcore" tag "subworkflows/vcf_annotate_snpeff" tag "snpeff/snpeff" - tag "tabix/bgziptabix" + tag "htslib/bgziptabix" config "./nextflow.config" diff --git a/subworkflows/nf-core/vcf_annotate_snpeff/tests/main.nf.test.snap b/subworkflows/nf-core/vcf_annotate_snpeff/tests/main.nf.test.snap index bd5ab4ce4e3d..45fbf0f734b1 100644 --- a/subworkflows/nf-core/vcf_annotate_snpeff/tests/main.nf.test.snap +++ b/subworkflows/nf-core/vcf_annotate_snpeff/tests/main.nf.test.snap @@ -7,8 +7,8 @@ "id": "test", "single_end": false }, - "test_snpEff.ann.vcf.gz,variantsMD5:fd266e623365c7d1837bc9eb088fe70c", - "test_snpEff.ann.vcf.gz.tbi" + "test.vcf.gz,variantsMD5:fd266e623365c7d1837bc9eb088fe70c", + "test.vcf.gz.tbi" ] ], [ @@ -45,11 +45,11 @@ ] ] ], + "timestamp": "2026-05-08T11:58:11.23938487", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-02-11T11:34:58.21819" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "WBcel235.99 - test.vcf.gz - stub": { "content": [ @@ -60,8 +60,8 @@ "id": "test", "single_end": false }, - "test_snpEff.ann.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_snpEff.ann.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -136,16 +136,16 @@ "id": "test", "single_end": false }, - "test_snpEff.ann.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_snpEff.ann.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ] } ], + "timestamp": "2026-05-08T11:58:18.853879167", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-02-11T11:35:06.006968" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file diff --git a/subworkflows/nf-core/vcf_extract_relate_somalier/main.nf b/subworkflows/nf-core/vcf_extract_relate_somalier/main.nf index 4b4f593c8034..3c7e54ca6832 100644 --- a/subworkflows/nf-core/vcf_extract_relate_somalier/main.nf +++ b/subworkflows/nf-core/vcf_extract_relate_somalier/main.nf @@ -1,6 +1,6 @@ -include { SOMALIER_EXTRACT } from '../../../modules/nf-core/somalier/extract/main' -include { SOMALIER_RELATE } from '../../../modules/nf-core/somalier/relate/main' -include { TABIX_TABIX } from '../../../modules/nf-core/tabix/tabix/main' +include { SOMALIER_EXTRACT } from '../../../modules/nf-core/somalier/extract/main' +include { SOMALIER_RELATE } from '../../../modules/nf-core/somalier/relate/main' +include { HTSLIB_BGZIPTABIX } from '../../../modules/nf-core/htslib/bgziptabix/main' workflow VCF_EXTRACT_RELATE_SOMALIER { take: @@ -21,13 +21,18 @@ workflow VCF_EXTRACT_RELATE_SOMALIER { return [ meta, vcf ] } - TABIX_TABIX( - ch_input.no_tbi.map { meta, vcf -> [meta, vcf, [], []] } + HTSLIB_BGZIPTABIX( + ch_input.no_tbi.map { meta, vcf -> [meta, vcf, [], []] }, + "compress", + true, + "vcf" ) - ch_somalierextract_input = ch_input.no_tbi - .join(TABIX_TABIX.out.index) - .mix(ch_input.tbi) + ch_somalierextract_input = HTSLIB_BGZIPTABIX.out.output.join( + HTSLIB_BGZIPTABIX.out.index + ).mix( + ch_input.tbi + ) SOMALIER_EXTRACT( ch_somalierextract_input, diff --git a/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml b/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml index 76b97228a874..f31ac706f25e 100644 --- a/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml +++ b/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml @@ -8,7 +8,7 @@ keywords: - ped - relatedness components: - - tabix/tabix + - htslib/bgziptabix - somalier/extract - somalier/relate input: diff --git a/subworkflows/nf-core/vcf_extract_relate_somalier/tests/main.nf.test b/subworkflows/nf-core/vcf_extract_relate_somalier/tests/main.nf.test index fe71eda43c70..f94df0bc770b 100644 --- a/subworkflows/nf-core/vcf_extract_relate_somalier/tests/main.nf.test +++ b/subworkflows/nf-core/vcf_extract_relate_somalier/tests/main.nf.test @@ -15,8 +15,8 @@ nextflow_workflow { tag "somalier/extract" tag "somalier/relate" tag "somalier" - tag "tabix/tabix" - tag "tabix" + tag "htslib/bgziptabix" + tag "htslib" tag "bcftools/merge" tag "bcftools" diff --git a/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/main.nf b/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/main.nf index 00c752502833..aef3d71291aa 100644 --- a/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/main.nf +++ b/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/main.nf @@ -1,6 +1,6 @@ include { BCFTOOLS_VIEW } from '../../../modules/nf-core/bcftools/view' include { ENSEMBLVEP_FILTERVEP } from '../../../modules/nf-core/ensemblvep/filtervep' -include { TABIX_BGZIPTABIX } from '../../../modules/nf-core/tabix/bgziptabix' +include { HTSLIB_BGZIPTABIX } from '../../../modules/nf-core/htslib/bgziptabix' // Please note this subworkflow requires the options for bcftools_view that are included in the nextflow.config workflow VCF_FILTER_BCFTOOLS_ENSEMBLVEP { @@ -35,12 +35,15 @@ workflow VCF_FILTER_BCFTOOLS_ENSEMBLVEP { ch_filter_vep_feature_file.map { _meta, file -> file }, ) - TABIX_BGZIPTABIX( - ENSEMBLVEP_FILTERVEP.out.output + HTSLIB_BGZIPTABIX( + ENSEMBLVEP_FILTERVEP.out.output.map { meta, vcf -> [meta, vcf, [], []] }, + "compress", + true, + "vcf" ) - ch_vcf = TABIX_BGZIPTABIX.out.gz_index.map { meta, vcf, _tbi -> [meta, vcf] } - ch_tbi = TABIX_BGZIPTABIX.out.gz_index.map { meta, _vcf, tbi -> [meta, tbi] } + ch_vcf = HTSLIB_BGZIPTABIX.out.output + ch_tbi = HTSLIB_BGZIPTABIX.out.index } emit: diff --git a/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/meta.yml b/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/meta.yml index b9d3d7c40ad1..34a65794161f 100644 --- a/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/meta.yml +++ b/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/meta.yml @@ -9,7 +9,7 @@ keywords: components: - bcftools/view - ensemblvep/filtervep - - tabix/bgziptabix + - htslib/bgziptabix input: - ch_vcf: type: file diff --git a/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/tests/main.nf.test b/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/tests/main.nf.test index fb000d16adba..8b7020fbdf6e 100644 --- a/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/tests/main.nf.test +++ b/subworkflows/nf-core/vcf_filter_bcftools_ensemblvep/tests/main.nf.test @@ -10,7 +10,7 @@ nextflow_workflow { tag "subworkflows/vcf_filter_bcftools_ensemblvep" tag "bcftools/view" tag "ensemblvep/filtervep" - tag "tabix/bgziptabix" + tag "htslib/bgziptabix" test("vcf, hgnc_ids - filter on expression") { diff --git a/subworkflows/nf-core/vcf_gather_bcftools/main.nf b/subworkflows/nf-core/vcf_gather_bcftools/main.nf index 0d0df166b65e..1542b3f76afe 100644 --- a/subworkflows/nf-core/vcf_gather_bcftools/main.nf +++ b/subworkflows/nf-core/vcf_gather_bcftools/main.nf @@ -1,6 +1,6 @@ include { BCFTOOLS_CONCAT } from '../../../modules/nf-core/bcftools/concat/main' include { BCFTOOLS_SORT } from '../../../modules/nf-core/bcftools/sort/main' -include { TABIX_TABIX } from '../../../modules/nf-core/tabix/tabix/main' +include { HTSLIB_BGZIPTABIX } from '../../../modules/nf-core/htslib/bgziptabix/main' workflow VCF_GATHER_BCFTOOLS { take: @@ -54,13 +54,18 @@ workflow VCF_GATHER_BCFTOOLS { ch_tabix_input = ch_vcf_concat } - TABIX_TABIX(ch_tabix_input.map { meta, vcf -> [meta, vcf, [], []] }) + HTSLIB_BGZIPTABIX( + ch_tabix_input.map { meta, vcf -> [meta, vcf, [], []] }, + "compress", + true, + "vcf" + ) ch_vcf_index = ch_tabix_input - .join(TABIX_TABIX.out.index) + .join(HTSLIB_BGZIPTABIX.out.index) emit: vcf = ch_vcf_concat // channel: [ val(meta), [ vcf ] ] - index = TABIX_TABIX.out.index // channel: [ val(meta), [ tbi or csi ] ] + index = HTSLIB_BGZIPTABIX.out.index // channel: [ val(meta), [ tbi or csi ] ] vcf_index = ch_vcf_index // channel: [ val(meta), [ vcf ], [ tbi or csi ] ] } diff --git a/subworkflows/nf-core/vcf_gather_bcftools/meta.yml b/subworkflows/nf-core/vcf_gather_bcftools/meta.yml index cadb33e3f85d..5198a01d0d28 100644 --- a/subworkflows/nf-core/vcf_gather_bcftools/meta.yml +++ b/subworkflows/nf-core/vcf_gather_bcftools/meta.yml @@ -12,7 +12,7 @@ keywords: components: - bcftools/sort - bcftools/concat - - tabix/tabix + - htslib/bgziptabix input: - meta: type: map diff --git a/subworkflows/nf-core/vcf_gather_bcftools/tests/main.nf.test b/subworkflows/nf-core/vcf_gather_bcftools/tests/main.nf.test index fc6902661f70..0ab0938398d9 100644 --- a/subworkflows/nf-core/vcf_gather_bcftools/tests/main.nf.test +++ b/subworkflows/nf-core/vcf_gather_bcftools/tests/main.nf.test @@ -14,8 +14,8 @@ nextflow_workflow { tag "bcftools/concat" tag "bcftools/sort" tag "bcftools" - tag "tabix/tabix" - tag "tabix" + tag "htslib/bgziptabix" + tag "htslib" test("homo_sapiens - [vcf, tbi] [vcf, tbi] - meta [] 2 - sample, key - true") { when { diff --git a/subworkflows/nf-core/vcf_gather_bcftools/tests/main.nf.test.snap b/subworkflows/nf-core/vcf_gather_bcftools/tests/main.nf.test.snap index 6658f35462cb..220e9a7f32c9 100644 --- a/subworkflows/nf-core/vcf_gather_bcftools/tests/main.nf.test.snap +++ b/subworkflows/nf-core/vcf_gather_bcftools/tests/main.nf.test.snap @@ -37,15 +37,15 @@ } ] }, - "null.sorted.vcf.gz.tbi" + "null.vcf.gz.tbi" ] ] ], + "timestamp": "2026-05-08T12:11:39.669945556", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T14:03:09.814655722" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "homo_sapiens - [vcf, tbi] [vcf, tbi] - meta [] 1 - id - false": { "content": [ @@ -86,7 +86,7 @@ } ] }, - "test2_haplotc.ann.vcf.gz.tbi" + "test_1.vcf.gz.tbi" ], [ { @@ -98,15 +98,15 @@ } ] }, - "test2_haplotc.vcf.gz.tbi" + "test_2.vcf.gz.tbi" ] ] ], + "timestamp": "2026-05-08T12:11:47.25104859", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T14:03:15.844814123" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "homo_sapiens no_meta - [vcf, tbi] [vcf, tbi] - meta equal [] 2 - [] - true": { "content": [ @@ -124,15 +124,15 @@ { "id": "test" }, - "test.sorted.vcf.gz.tbi" + "test.vcf.gz.tbi" ] ] ], + "timestamp": "2026-05-08T12:11:55.989957001", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T13:59:22.879536838" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "homo_sapiens no_meta - [vcf, tbi] [vcf, tbi] - meta equal [] 2 - [] - true -- stub": { "content": [ @@ -143,7 +143,7 @@ "other_meta": "test" }, "test.sorted.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.sorted.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" ], [ { @@ -151,14 +151,14 @@ "other_meta": "test2" }, "test2.sorted.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test2.sorted.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + "test2.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ] ], + "timestamp": "2026-05-08T12:12:05.096756591", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.3" - }, - "timestamp": "2026-02-03T14:03:34.21563537" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file