diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 307a9224af..938a53b4f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -279,6 +279,7 @@ jobs: - tags: "strelka/germline" - tags: "strelka/somatic" - tags: "subworkflows/utils_nfvalidation_plugin" + - tags: "svdb/merge" - tags: "tabix/bgziptabix" - tags: "tabix/tabix" - tags: "tiddit/sv" diff --git a/CHANGELOG.md b/CHANGELOG.md index c59e484096..ef30c87bc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [1677](https://github.com/nf-core/sarek/pull/1677) - Migrate pytest aligner and pipeline default tests to nf-test - [1680](https://github.com/nf-core/sarek/pull/1680) - Template update for nf-core/tools v3.0.0 - [1681](https://github.com/nf-core/sarek/pull/1681) - Template update for nf-core/tools v3.0.1 +- [1686](https://github.com/nf-core/sarek/pull/1686) - Template update for nf-core/tools v3.0.2 - [1692](https://github.com/nf-core/sarek/pull/1692) - Update ensemblvep +- [1695](https://github.com/nf-core/sarek/pull/1695) - Update all modules ### Fixed @@ -30,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [1673](https://github.com/nf-core/sarek/pull/1673) - Print warning message instead of silent error with Nextflow versions prior to 24.08.0edge - [1693](https://github.com/nf-core/sarek/pull/1693) - Fixes flowcell retrieval during samplesheet parsing - [1694](https://github.com/nf-core/sarek/pull/1694) - Fix manifest DOI display on CLI +- [1695](https://github.com/nf-core/sarek/pull/1695) - Fix and update input_schema.json ### Removed @@ -39,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | Dependency | Old version | New version | | ------------- | ----------- | ----------- | +| `coreutils` | 8.30 | 9.5 | | `deepvariant` | 1.5.0 | 1.6.1 | | `ensemblvep` | 111.0 | 113.0 | | `fgbio` | 2.0.2 | 2.1.2 | @@ -46,6 +50,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | `lofreq` | | 2.1.5 | | `multiqc` | 1.21 | 1.25.1 | | `samtools` | 1.20 | 1.21 | +| `sentieon` | 202308.02 | 202308.03 | +| `svdb` | 2.8.1 | 2.8.2 | ### Parameters diff --git a/assets/schema_input.json b/assets/schema_input.json index 0db8056be7..4284b97430 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -23,22 +23,14 @@ "errorMessage": "Sex cannot contain spaces", "meta": ["sex"], "default": "NA", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+$" - }, - { - "type": "string", - "maxLength": 0 - } - ] + "type": "string", + "pattern": "^\\S+$" }, "status": { "type": "integer", "errorMessage": "Status can only be 0 (normal) or 1 (tumor). Defaults to 0, if none is supplied.", "meta": ["status"], - "default": "0", + "default": 0, "minimum": 0, "maximum": 1 }, @@ -48,152 +40,72 @@ "meta": ["lane"] }, "fastq_1": { - "errorMessage": "Gzipped FastQ file for reads 1 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.f(ast)?q\\.gz$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "errorMessage": "FastQ file for reads 1 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'", + "type": "string", + "pattern": "^\\S+\\.f(ast)?q\\.gz$", "format": "file-path", "exists": true }, "fastq_2": { - "errorMessage": "Gzipped FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.f(ast)?q\\.gz$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'", + "type": "string", + "pattern": "^\\S+\\.f(ast)?q\\.gz$", "format": "file-path", "exists": true }, "spring_1": { "errorMessage": "Gzipped and spring-compressed FastQ file for reads 1 cannot contain spaces and must have extension '.fq.gz.spring' or '.fastq.gz.spring'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.f(ast)?q\\.gz.spring$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "type": "string", + "pattern": "^\\S+\\.f(ast)?q\\.gz.spring$", "format": "file-path", "exists": true }, "spring_2": { "errorMessage": "Gzipped and spring-compressed FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz.spring' or '.fastq.gz.spring'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.f(ast)?q\\.gz.spring$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "type": "string", + "pattern": "^\\S+\\.f(ast)?q\\.gz.spring$", "format": "file-path", "exists": true }, "table": { "errorMessage": "Recalibration table cannot contain spaces and must have extension '.table'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.table$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "type": "string", + "pattern": "^\\S+\\.table$", "format": "file-path", "exists": true }, "cram": { "errorMessage": "CRAM file cannot contain spaces and must have extension '.cram'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.cram$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "type": "string", + "pattern": "^\\S+\\.cram$", "format": "file-path", "exists": true }, "crai": { "errorMessage": "CRAM index file cannot contain spaces and must have extension '.crai'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.crai$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "type": "string", + "pattern": "^\\S+\\.crai$", "format": "file-path", "exists": true }, "bam": { "errorMessage": "BAM file cannot contain spaces and must have extension '.bam'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.bam$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "type": "string", + "pattern": "^\\S+\\.bam$", "format": "file-path", "exists": true }, "bai": { "errorMessage": "BAM index file cannot contain spaces and must have extension '.bai'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.bai$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "type": "string", + "pattern": "^\\S+\\.bai$", "format": "file-path", "exists": true }, "vcf": { "errorMessage": "VCF file for reads 1 cannot contain spaces and must have extension '.vcf' or '.vcf.gz'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.vcf(\\.gz)?$" - }, - { - "type": "string", - "maxLength": 0 - } - ], + "type": "string", + "pattern": "^\\S+\\.vcf(\\.gz)?$", "format": "file-path", "exists": true }, @@ -201,30 +113,28 @@ "type": "string" } }, - "required": ["patient", "sample"], - "uniqueEntries": ["patient", "sample"], "anyOf": [ { "dependentRequired": { - "fastq_2": ["fastq_1"], - "spring_2": ["spring_1"], - "lane": ["bam"] + "lane": ["fastq_1"] } }, { "dependentRequired": { - "fastq_2": ["fastq_1"], - "spring_2": ["spring_1"], - "lane": ["fastq_1"] + "lane": ["spring_1"] } }, { "dependentRequired": { - "fastq_2": ["fastq_1"], - "spring_2": ["spring_1"], - "lane": ["spring_1"] + "lane": ["bam"] } } - ] + ], + "dependentRequired": { + "fastq_2": ["fastq_1"], + "spring_2": ["spring_1"] + }, + "required": ["patient", "sample"], + "uniqueEntries": ["lane", "patient", "sample"] } } diff --git a/conf/modules/tiddit.config b/conf/modules/tiddit.config index 335ecf0951..ac81cdab5e 100644 --- a/conf/modules/tiddit.config +++ b/conf/modules/tiddit.config @@ -47,6 +47,7 @@ process { // SVDB withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_SOMATIC_ALL:BAM_VARIANT_CALLING_SOMATIC_TIDDIT:SVDB_MERGE' { + ext.args2 = { '--output-type z' } ext.prefix = { "${meta.id}.tiddit_sv_merge" } publishDir = [ mode: params.publish_dir_mode, diff --git a/modules.json b/modules.json index fee5e24092..f15b1f14c5 100644 --- a/modules.json +++ b/modules.json @@ -12,13 +12,13 @@ }, "bcftools/annotate": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "cb08035150685b11d890d90c9534d4f16869eaec", "installed_by": ["modules"], "patch": "modules/nf-core/bcftools/annotate/bcftools-annotate.diff" }, "bcftools/concat": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "d1e0ec7670fa77905a378627232566ce54c3c26d", "installed_by": ["modules"] }, "bcftools/mpileup": { @@ -63,7 +63,7 @@ }, "cat/fastq": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "a1abf90966a2a4016d3c3e41e228bfcbd4811ccc", "installed_by": ["modules"] }, "cnvkit/antitarget": { @@ -181,7 +181,7 @@ }, "gatk4/applybqsr": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "6b3bf38285d94cc1ea3cd9fa93310d54b04c3819", "installed_by": ["modules"] }, "gatk4/applyvqsr": { @@ -231,7 +231,7 @@ }, "gatk4/gatherpileupsummaries": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "679f45cae4f603f12d7c38c042afee11150574a0", "installed_by": ["modules"] }, "gatk4/genomicsdbimport": { @@ -306,7 +306,7 @@ }, "gawk": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "97321eded31a12598837a476d3615300af413bb7", "installed_by": ["modules"] }, "lofreq/callparallel": { @@ -406,42 +406,42 @@ }, "sentieon/applyvarcal": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb7b70119bfb1877334c996d13e520c61b21067d", "installed_by": ["modules"] }, "sentieon/bwamem": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb7b70119bfb1877334c996d13e520c61b21067d", "installed_by": ["modules"] }, "sentieon/dedup": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb7b70119bfb1877334c996d13e520c61b21067d", "installed_by": ["modules"] }, "sentieon/dnamodelapply": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb7b70119bfb1877334c996d13e520c61b21067d", "installed_by": ["modules"] }, "sentieon/dnascope": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb7b70119bfb1877334c996d13e520c61b21067d", "installed_by": ["modules"] }, "sentieon/gvcftyper": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb7b70119bfb1877334c996d13e520c61b21067d", "installed_by": ["modules"] }, "sentieon/haplotyper": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb7b70119bfb1877334c996d13e520c61b21067d", "installed_by": ["modules"] }, "sentieon/varcal": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb7b70119bfb1877334c996d13e520c61b21067d", "installed_by": ["modules"] }, "snpeff/download": { @@ -456,7 +456,7 @@ }, "spring/decompress": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "d7462e71f9129083ce10c3fe953ed401781e0ebd", "installed_by": ["modules"] }, "strelka/germline": { @@ -471,12 +471,12 @@ }, "svdb/merge": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "eb2c3f7ee2c938ab1a49764bdb1319adaa35492c", "installed_by": ["modules"] }, "tabix/bgziptabix": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "f448e846bdadd80fc8be31fbbc78d9f5b5131a45", "installed_by": ["modules", "vcf_annotate_snpeff"] }, "tabix/tabix": { diff --git a/modules/nf-core/bcftools/annotate/main.nf b/modules/nf-core/bcftools/annotate/main.nf index 1e42b8cec8..1b3a371ecf 100644 --- a/modules/nf-core/bcftools/annotate/main.nf +++ b/modules/nf-core/bcftools/annotate/main.nf @@ -61,12 +61,12 @@ process BCFTOOLS_ANNOTATE { args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : "vcf" - def index = args.contains("--write-index=tbi") || args.contains("-W=tbi") ? "tbi" : - args.contains("--write-index=csi") || args.contains("-W=csi") ? "csi" : - args.contains("--write-index") || args.contains("-W") ? "csi" : - "" + def index_extension = args.contains("--write-index=tbi") || args.contains("-W=tbi") ? "tbi" : + args.contains("--write-index=csi") || args.contains("-W=csi") ? "csi" : + args.contains("--write-index") || args.contains("-W") ? "csi" : + "" def create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" - def create_index = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index}" : "" + def create_index = extension.endsWith(".gz") && index_extension.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index_extension}" : "" """ ${create_cmd} ${prefix}.${extension} diff --git a/modules/nf-core/bcftools/concat/main.nf b/modules/nf-core/bcftools/concat/main.nf index e2337eff25..a94b28d86d 100644 --- a/modules/nf-core/bcftools/concat/main.nf +++ b/modules/nf-core/bcftools/concat/main.nf @@ -11,18 +11,22 @@ process BCFTOOLS_CONCAT { tuple val(meta), path(vcfs), path(tbi) output: - tuple val(meta), path("*.gz") , emit: vcf - tuple val(meta), path("*.tbi"), emit: tbi, optional: true - tuple val(meta), path("*.csi"), emit: csi, optional: true - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.vcf.gz.tbi"), emit: tbi, optional: true + tuple val(meta), path("${prefix}.vcf.gz.csi"), emit: csi, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + prefix = task.ext.prefix ?: "${meta.id}" + def tbi_names = tbi.findAll { file -> !(file instanceof List) }.collect { file -> file.name } + def create_input_index = vcfs.collect { vcf -> tbi_names.contains(vcf.name + ".tbi") ? "" : "tabix ${vcf}" }.join("\n ") """ + ${create_input_index} + bcftools concat \\ --output ${prefix}.vcf.gz \\ $args \\ @@ -37,7 +41,7 @@ process BCFTOOLS_CONCAT { stub: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + prefix = task.ext.prefix ?: "${meta.id}" def index = args.contains("--write-index=tbi") || args.contains("-W=tbi") ? "tbi" : args.contains("--write-index=csi") || args.contains("-W=csi") ? "csi" : args.contains("--write-index") || args.contains("-W") ? "csi" : diff --git a/modules/nf-core/bcftools/concat/meta.yml b/modules/nf-core/bcftools/concat/meta.yml index b5d1f5b2ce..d2565b289f 100644 --- a/modules/nf-core/bcftools/concat/meta.yml +++ b/modules/nf-core/bcftools/concat/meta.yml @@ -37,9 +37,12 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.gz": - type: file - description: VCF concatenated output file + pattern: "*.{vcf.gz}" + - ${prefix}.vcf.gz: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] pattern: "*.{vcf.gz}" - tbi: - meta: @@ -47,9 +50,12 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.tbi": - type: file - description: Alternative VCF file index + pattern: "*.tbi" + - ${prefix}.vcf.gz.tbi: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] pattern: "*.tbi" - csi: - meta: @@ -57,9 +63,12 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.csi": - type: file - description: Default VCF file index + pattern: "*.csi" + - ${prefix}.vcf.gz.csi: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] pattern: "*.csi" - versions: - versions.yml: diff --git a/modules/nf-core/bcftools/concat/tests/main.nf.test b/modules/nf-core/bcftools/concat/tests/main.nf.test index cea386e3bd..cb4642b29c 100644 --- a/modules/nf-core/bcftools/concat/tests/main.nf.test +++ b/modules/nf-core/bcftools/concat/tests/main.nf.test @@ -10,7 +10,7 @@ nextflow_process { tag "bcftools/concat" - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]]") { config "./nextflow.config" @@ -41,7 +41,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index") { config "./vcf_gz_index.config" @@ -78,7 +78,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi") { config "./vcf_gz_index_csi.config" @@ -115,7 +115,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi") { config "./vcf_gz_index_tbi.config" @@ -153,7 +153,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], []]") { + test("homo_sapiens - [[vcf1, vcf2], []]") { config "./nextflow.config" @@ -181,7 +181,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - stub") { config "./nextflow.config" options "-stub" @@ -213,7 +213,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index - stub") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index - stub") { config "./vcf_gz_index.config" options "-stub" @@ -246,7 +246,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi - stub") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi - stub") { config "./vcf_gz_index_csi.config" options "-stub" @@ -279,7 +279,7 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi - stub") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi - stub") { config "./vcf_gz_index_tbi.config" options "-stub" diff --git a/modules/nf-core/bcftools/concat/tests/main.nf.test.snap b/modules/nf-core/bcftools/concat/tests/main.nf.test.snap index 1182854f94..09e87cd3e5 100644 --- a/modules/nf-core/bcftools/concat/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/concat/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index - stub": { + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index - stub": { "content": [ { "0": [ @@ -49,12 +49,12 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-05T08:09:13.734103412" + "timestamp": "2024-09-26T11:04:11.178539482" }, - "sarscov2 - [[vcf1, vcf2], []]": { + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]]": { "content": [ { "0": [ @@ -94,12 +94,12 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-04T15:19:09.213249578" + "timestamp": "2024-09-26T11:03:08.765639958" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index": { + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index": { "content": [ [ [ @@ -125,12 +125,12 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-05T08:08:23.981388325" + "timestamp": "2024-09-26T11:03:21.607274757" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi - stub": { + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi - stub": { "content": [ { "0": [ @@ -142,29 +142,29 @@ ] ], "1": [ - - ], - "2": [ [ { "id": "test3" }, - "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + "test3_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" ] + ], + "2": [ + ], "3": [ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" ], "csi": [ + + ], + "tbi": [ [ { "id": "test3" }, - "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + "test3_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "tbi": [ - ], "vcf": [ [ @@ -180,12 +180,43 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-26T11:04:27.332133878" + }, + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-05T14:01:24.419027693" + "timestamp": "2024-09-26T11:03:36.575719606" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]": { + "homo_sapiens - [[vcf1, vcf2], []]": { "content": [ { "0": [ @@ -225,43 +256,12 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-04T15:19:03.597061078" + "timestamp": "2024-09-26T11:03:54.069826178" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi": { - "content": [ - [ - [ - { - "id": "test3" - }, - "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" - ] - ], - [ - [ - { - "id": "test3" - }, - "test3_vcf.vcf.gz.csi" - ] - ], - [ - - ], - [ - "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-05T14:00:10.868487669" - }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub": { + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - stub": { "content": [ { "0": [ @@ -301,12 +301,12 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-04T15:19:14.836256897" + "timestamp": "2024-09-26T11:04:02.45346063" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi": { + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi": { "content": [ [ [ @@ -332,12 +332,12 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-05T14:00:31.061411617" + "timestamp": "2024-09-26T11:03:44.618596639" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi - stub": { + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi - stub": { "content": [ { "0": [ @@ -349,29 +349,29 @@ ] ], "1": [ + + ], + "2": [ [ { "id": "test3" }, - "test3_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "2": [ - ], "3": [ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" ], "csi": [ - - ], - "tbi": [ [ { "id": "test3" }, - "test3_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] + ], + "tbi": [ + ], "vcf": [ [ @@ -387,9 +387,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-05T14:01:35.209746508" + "timestamp": "2024-09-26T11:04:19.745768656" } } \ No newline at end of file diff --git a/modules/nf-core/cat/fastq/environment.yml b/modules/nf-core/cat/fastq/environment.yml index c7eb9bd1c3..71e04c3d71 100644 --- a/modules/nf-core/cat/fastq/environment.yml +++ b/modules/nf-core/cat/fastq/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - conda-forge::coreutils=8.30 + - conda-forge::coreutils=9.5 diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index b68e5f9114..4364a389b7 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -4,8 +4,8 @@ process CAT_FASTQ { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/c2/c262fc09eca59edb5a724080eeceb00fb06396f510aefb229c2d2c6897e63975/data' : + 'community.wave.seqera.io/library/coreutils:9.5--ae99c88a9b28c264' }" input: tuple val(meta), path(reads, stageAs: "input*/*") diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap index aec119a94e..f8689a1ce5 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test.snap +++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap @@ -12,7 +12,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -24,15 +24,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-01-17T17:30:39.816981" + "timestamp": "2024-10-19T20:02:07.519211144" }, "test_cat_fastq_single_end_same_name": { "content": [ @@ -47,7 +47,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -59,15 +59,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-01-17T17:32:35.229332" + "timestamp": "2024-10-19T20:02:31.618628921" }, "test_cat_fastq_single_end_single_file": { "content": [ @@ -82,7 +82,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -94,15 +94,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-01-17T17:34:00.058829" + "timestamp": "2024-10-19T20:02:57.904149581" }, "test_cat_fastq_paired_end_same_name": { "content": [ @@ -120,7 +120,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -135,15 +135,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-01-17T17:33:33.031555" + "timestamp": "2024-10-19T20:02:44.577183829" }, "test_cat_fastq_single_end - stub": { "content": [ @@ -158,7 +158,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -170,15 +170,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-05T12:07:28.244999" + "timestamp": "2024-10-19T20:03:10.603734777" }, "test_cat_fastq_paired_end_same_name - stub": { "content": [ @@ -196,7 +196,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -211,15 +211,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-05T12:07:57.070911" + "timestamp": "2024-10-19T20:03:46.041808828" }, "test_cat_fastq_single_end_same_name - stub": { "content": [ @@ -234,7 +234,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -246,15 +246,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-05T12:07:46.796254" + "timestamp": "2024-10-19T20:03:34.13865402" }, "test_cat_fastq_paired_end": { "content": [ @@ -272,7 +272,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -287,15 +287,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-01-17T17:32:02.270935" + "timestamp": "2024-10-19T20:02:19.64383573" }, "test_cat_fastq_paired_end - stub": { "content": [ @@ -313,7 +313,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -328,15 +328,15 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-05T12:07:37.807553" + "timestamp": "2024-10-19T20:03:22.597246066" }, "test_cat_fastq_single_end_single_file - stub": { "content": [ @@ -351,7 +351,7 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ], "reads": [ [ @@ -363,14 +363,14 @@ ] ], "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions.yml:md5,6ef4fd28546a005865b9454bbedbf81a" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-05T12:14:51.861264" + "timestamp": "2024-10-19T20:03:58.44849001" } } \ No newline at end of file diff --git a/modules/nf-core/gatk4/applybqsr/main.nf b/modules/nf-core/gatk4/applybqsr/main.nf index 78db9d7f00..4e91c311b0 100644 --- a/modules/nf-core/gatk4/applybqsr/main.nf +++ b/modules/nf-core/gatk4/applybqsr/main.nf @@ -48,4 +48,17 @@ process GATK4_APPLYBQSR { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def input_extension = input.getExtension() + def output_extension = input_extension == 'bam' ? 'bam' : 'cram' + """ + touch ${prefix}.${output_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/nf-core/gatk4/applybqsr/tests/main.nf.test b/modules/nf-core/gatk4/applybqsr/tests/main.nf.test index 3d9c6204f7..acb41ce1e4 100644 --- a/modules/nf-core/gatk4/applybqsr/tests/main.nf.test +++ b/modules/nf-core/gatk4/applybqsr/tests/main.nf.test @@ -92,4 +92,63 @@ nextflow_process { } } + test("sarscov2 - cram - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } + + test("sarscov2 - bam - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/gatk/test.baserecalibrator.table', checkIfExists: true), + [] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + } diff --git a/modules/nf-core/gatk4/applybqsr/tests/main.nf.test.snap b/modules/nf-core/gatk4/applybqsr/tests/main.nf.test.snap index a387039d6a..19b37d0636 100644 --- a/modules/nf-core/gatk4/applybqsr/tests/main.nf.test.snap +++ b/modules/nf-core/gatk4/applybqsr/tests/main.nf.test.snap @@ -1,4 +1,43 @@ { + "sarscov2 - bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,bb2a060a0280c812fba3c74b1707b350" + ], + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + + ], + "versions": [ + "versions.yml:md5,bb2a060a0280c812fba3c74b1707b350" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-20T10:25:00.314573" + }, "sarscov2 - bam - intervals": { "content": [ { @@ -60,6 +99,45 @@ }, "timestamp": "2023-12-09T03:10:46.70859771" }, + "sarscov2 - cram - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,bb2a060a0280c812fba3c74b1707b350" + ], + "bam": [ + + ], + "cram": [ + [ + { + "id": "test" + }, + "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,bb2a060a0280c812fba3c74b1707b350" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-20T10:24:52.761169" + }, "sarscov2 - bam": { "content": [ { diff --git a/modules/nf-core/gatk4/gatherpileupsummaries/main.nf b/modules/nf-core/gatk4/gatherpileupsummaries/main.nf index c784d59ab2..bcafd544b4 100644 --- a/modules/nf-core/gatk4/gatherpileupsummaries/main.nf +++ b/modules/nf-core/gatk4/gatherpileupsummaries/main.nf @@ -44,4 +44,15 @@ process GATK4_GATHERPILEUPSUMMARIES { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.pileups.table + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/nf-core/gatk4/gatherpileupsummaries/tests/main.nf.test b/modules/nf-core/gatk4/gatherpileupsummaries/tests/main.nf.test index 8497e64db3..f33c6a0d94 100644 --- a/modules/nf-core/gatk4/gatherpileupsummaries/tests/main.nf.test +++ b/modules/nf-core/gatk4/gatherpileupsummaries/tests/main.nf.test @@ -34,4 +34,29 @@ nextflow_process { } } + test("test-gatk4-gatherpileupsummaries - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test.pileups.table', checkIfExists: true) ] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + } diff --git a/modules/nf-core/gatk4/gatherpileupsummaries/tests/main.nf.test.snap b/modules/nf-core/gatk4/gatherpileupsummaries/tests/main.nf.test.snap index f05a7ef0d1..fd9f258344 100644 --- a/modules/nf-core/gatk4/gatherpileupsummaries/tests/main.nf.test.snap +++ b/modules/nf-core/gatk4/gatherpileupsummaries/tests/main.nf.test.snap @@ -1,4 +1,39 @@ { + "test-gatk4-gatherpileupsummaries - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.pileups.table:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,d3772ab0d5963a88a2748fd83af76c02" + ], + "table": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.pileups.table:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d3772ab0d5963a88a2748fd83af76c02" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-20T10:44:42.759098" + }, "test-gatk4-gatherpileupsummaries": { "content": [ { diff --git a/modules/nf-core/gawk/main.nf b/modules/nf-core/gawk/main.nf index ca4689297c..7514246eeb 100644 --- a/modules/nf-core/gawk/main.nf +++ b/modules/nf-core/gawk/main.nf @@ -8,7 +8,7 @@ process GAWK { 'biocontainers/gawk:5.3.0' }" input: - tuple val(meta), path(input) + tuple val(meta), path(input, arity: '0..*') path(program_file) output: @@ -22,15 +22,19 @@ process GAWK { def args = task.ext.args ?: '' // args is used for the main arguments of the tool def args2 = task.ext.args2 ?: '' // args2 is used to specify a program when no program file has been given prefix = task.ext.prefix ?: "${meta.id}" - suffix = task.ext.suffix ?: "${input.getExtension()}" + suffix = task.ext.suffix ?: "${input.collect{ it.getExtension()}.get(0)}" // use the first extension of the input files - program = program_file ? "-f ${program_file}" : "${args2}" + program = program_file ? "-f ${program_file}" : "${args2}" + lst_gz = input.collect{ it.getExtension().endsWith("gz") } + unzip = lst_gz.contains(false) ? "" : "find ${input} -exec zcat {} \\; | \\" + input_cmd = unzip ? "" : "${input}" """ + ${unzip} awk \\ ${args} \\ ${program} \\ - ${input} \\ + ${input_cmd} \\ > ${prefix}.${suffix} cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/gawk/meta.yml b/modules/nf-core/gawk/meta.yml index 051700820d..2da41405de 100644 --- a/modules/nf-core/gawk/meta.yml +++ b/modules/nf-core/gawk/meta.yml @@ -26,7 +26,8 @@ input: - input: type: file description: The input file - Specify the logic that needs to be executed on - this file on the `ext.args2` or in the program file + this file on the `ext.args2` or in the program file. + If the files have a `.gz` extension, they will be unzipped using `zcat`. pattern: "*" - - program_file: type: file diff --git a/modules/nf-core/gawk/tests/main.nf.test b/modules/nf-core/gawk/tests/main.nf.test index fce82ca95a..5952e9a293 100644 --- a/modules/nf-core/gawk/tests/main.nf.test +++ b/modules/nf-core/gawk/tests/main.nf.test @@ -8,7 +8,7 @@ nextflow_process { tag "modules_nfcore" tag "gawk" - test("convert fasta to bed") { + test("Convert fasta to bed") { config "./nextflow.config" when { @@ -31,7 +31,7 @@ nextflow_process { } } - test("convert fasta to bed with program file") { + test("Convert fasta to bed with program file") { config "./nextflow_with_program_file.config" when { @@ -53,4 +53,52 @@ nextflow_process { ) } } + + test("Extract first column from multiple files") { + config "./nextflow_with_program_file.config" + tag "test" + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [file(params.modules_testdata_base_path + 'generic/txt/hello.txt', checkIfExists: true), + file(params.modules_testdata_base_path + 'generic/txt/species_names.txt', checkIfExists: true)] + ] + input[1] = Channel.of('BEGIN {FS=" "}; {print \$1}').collectFile(name:"program.txt") + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("Unzip files before processing") { + config "./nextflow_with_program_file.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA12878_chrM.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz', checkIfExists: true)] + ] + input[1] = Channel.of('/^#CHROM/ { print \$1, \$10 }').collectFile(name:"column_header.txt") + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } } \ No newline at end of file diff --git a/modules/nf-core/gawk/tests/main.nf.test.snap b/modules/nf-core/gawk/tests/main.nf.test.snap index 4f3a759c62..d396f738b6 100644 --- a/modules/nf-core/gawk/tests/main.nf.test.snap +++ b/modules/nf-core/gawk/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "convert fasta to bed with program file": { + "Convert fasta to bed": { "content": [ { "0": [ @@ -28,11 +28,11 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.03.0" + "nextflow": "24.04.4" }, - "timestamp": "2024-05-17T15:20:02.495430346" + "timestamp": "2024-10-19T13:14:02.347809811" }, - "convert fasta to bed": { + "Convert fasta to bed with program file": { "content": [ { "0": [ @@ -61,8 +61,74 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.03.0" + "nextflow": "24.04.4" }, - "timestamp": "2024-05-17T15:19:53.291809648" + "timestamp": "2024-10-19T13:14:11.894616209" + }, + "Extract first column from multiple files": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed:md5,566c51674bd643227bb2d83e0963376d" + ] + ], + "1": [ + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" + ], + "output": [ + [ + { + "id": "test" + }, + "test.bed:md5,566c51674bd643227bb2d83e0963376d" + ] + ], + "versions": [ + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-19T22:04:47.729300129" + }, + "Unzip files before processing": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed:md5,1e31ebd4a060aab5433bbbd9ab24e403" + ] + ], + "1": [ + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" + ], + "output": [ + [ + { + "id": "test" + }, + "test.bed:md5,1e31ebd4a060aab5433bbbd9ab24e403" + ] + ], + "versions": [ + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-19T22:08:19.533527657" } -} \ No newline at end of file +} diff --git a/modules/nf-core/sentieon/applyvarcal/environment.yml b/modules/nf-core/sentieon/applyvarcal/environment.yml index 185d95bde8..d7abf668ea 100644 --- a/modules/nf-core/sentieon/applyvarcal/environment.yml +++ b/modules/nf-core/sentieon/applyvarcal/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sentieon=202308.02 + - bioconda::sentieon=202308.03 diff --git a/modules/nf-core/sentieon/applyvarcal/main.nf b/modules/nf-core/sentieon/applyvarcal/main.nf index 9f64f5a2f3..724912d689 100644 --- a/modules/nf-core/sentieon/applyvarcal/main.nf +++ b/modules/nf-core/sentieon/applyvarcal/main.nf @@ -5,8 +5,8 @@ process SENTIEON_APPLYVARCAL { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'oras://community.wave.seqera.io/library/sentieon:202308.02--ffce1b7074ce9924' : - 'nf-core/sentieon:202308.02--c641bc397cbf79d5' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a6/a64461f38d76bebea8e21441079e76e663e1168b0c59dafee6ee58440ad8c8ac/data' : + 'community.wave.seqera.io/library/sentieon:202308.03--59589f002351c221' }" input: tuple val(meta), path(vcf), path(vcf_tbi), path(recal), path(recal_index), path(tranches) diff --git a/modules/nf-core/sentieon/bwamem/environment.yml b/modules/nf-core/sentieon/bwamem/environment.yml index 185d95bde8..d7abf668ea 100644 --- a/modules/nf-core/sentieon/bwamem/environment.yml +++ b/modules/nf-core/sentieon/bwamem/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sentieon=202308.02 + - bioconda::sentieon=202308.03 diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf index 76e364deca..c038a857bf 100644 --- a/modules/nf-core/sentieon/bwamem/main.nf +++ b/modules/nf-core/sentieon/bwamem/main.nf @@ -5,8 +5,8 @@ process SENTIEON_BWAMEM { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'oras://community.wave.seqera.io/library/sentieon:202308.02--ffce1b7074ce9924' : - 'nf-core/sentieon:202308.02--c641bc397cbf79d5' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a6/a64461f38d76bebea8e21441079e76e663e1168b0c59dafee6ee58440ad8c8ac/data' : + 'community.wave.seqera.io/library/sentieon:202308.03--59589f002351c221' }" input: tuple val(meta), path(reads) diff --git a/modules/nf-core/sentieon/bwamem/tests/main.nf.test.snap b/modules/nf-core/sentieon/bwamem/tests/main.nf.test.snap index 0dc67a9a5b..77070ccc45 100644 --- a/modules/nf-core/sentieon/bwamem/tests/main.nf.test.snap +++ b/modules/nf-core/sentieon/bwamem/tests/main.nf.test.snap @@ -8,12 +8,12 @@ "id": "test", "single_end": true }, - "test.bam:md5,58bc2194d084cf8462a3a7f6114c303a", - "test.bam.bai:md5,4fd9b026ff2306cc292cd695e11d5628" + "test.bam:md5,7b62831cb67d6d4a8e33b3cb788dfb1b", + "test.bam.bai:md5,6fc1dff58fab0491ecfa48f016041a18" ] ], "1": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ], "bam_and_bai": [ [ @@ -21,12 +21,12 @@ "id": "test", "single_end": true }, - "test.bam:md5,58bc2194d084cf8462a3a7f6114c303a", - "test.bam.bai:md5,4fd9b026ff2306cc292cd695e11d5628" + "test.bam:md5,7b62831cb67d6d4a8e33b3cb788dfb1b", + "test.bam.bai:md5,6fc1dff58fab0491ecfa48f016041a18" ] ], "versions": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ] } ], @@ -34,7 +34,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-19T08:58:40.112926615" + "timestamp": "2024-10-02T10:25:33.275731212" }, "Paired-End - stub": { "content": [ @@ -50,7 +50,7 @@ ] ], "1": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ], "bam_and_bai": [ [ @@ -63,7 +63,7 @@ ] ], "versions": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ] } ], @@ -71,7 +71,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-19T08:59:20.476791905" + "timestamp": "2024-10-02T10:26:16.58588651" }, "Paired-End": { "content": [ @@ -82,12 +82,12 @@ "id": "test", "single_end": false }, - "test.bam:md5,3418d864f42215d1c0c8d604d9571b0d", + "test.bam:md5,b0c8606d660dbe50a34cf80a376bb268", "test.bam.bai:md5,be4ad85790468042f7fc01ca2e36a919" ] ], "1": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ], "bam_and_bai": [ [ @@ -95,12 +95,12 @@ "id": "test", "single_end": false }, - "test.bam:md5,3418d864f42215d1c0c8d604d9571b0d", + "test.bam:md5,b0c8606d660dbe50a34cf80a376bb268", "test.bam.bai:md5,be4ad85790468042f7fc01ca2e36a919" ] ], "versions": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ] } ], @@ -108,7 +108,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-19T08:59:00.346034062" + "timestamp": "2024-10-02T10:25:55.068934639" }, "Single-End - stub": { "content": [ @@ -124,7 +124,7 @@ ] ], "1": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ], "bam_and_bai": [ [ @@ -137,7 +137,7 @@ ] ], "versions": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ] } ], @@ -145,7 +145,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-19T08:59:10.054146084" + "timestamp": "2024-10-02T10:26:05.151760076" }, "Single-End Output CRAM": { "content": [ @@ -156,12 +156,12 @@ "id": "test", "single_end": true }, - "test.cram:md5,04d88bd709dc0bc27ca81a09e80d4a1b", - "test.cram.crai:md5,ac34c713fe95aa8a1fd6291bdbb76dcf" + "test.cram:md5,817cf0847ae0c89062e2ee4be312101a", + "test.cram.crai:md5,60f801c550a18982e55207adb31ec351" ] ], "1": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ], "bam_and_bai": [ [ @@ -169,12 +169,12 @@ "id": "test", "single_end": true }, - "test.cram:md5,04d88bd709dc0bc27ca81a09e80d4a1b", - "test.cram.crai:md5,ac34c713fe95aa8a1fd6291bdbb76dcf" + "test.cram:md5,817cf0847ae0c89062e2ee4be312101a", + "test.cram.crai:md5,60f801c550a18982e55207adb31ec351" ] ], "versions": [ - "versions.yml:md5,6095ad80036c5d876c2616504a21efcc" + "versions.yml:md5,755d24c7416c1408313ec93814cef759" ] } ], @@ -182,6 +182,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-19T08:58:49.962693499" + "timestamp": "2024-10-02T10:25:44.360755915" } } \ No newline at end of file diff --git a/modules/nf-core/sentieon/dedup/environment.yml b/modules/nf-core/sentieon/dedup/environment.yml index 185d95bde8..d7abf668ea 100644 --- a/modules/nf-core/sentieon/dedup/environment.yml +++ b/modules/nf-core/sentieon/dedup/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sentieon=202308.02 + - bioconda::sentieon=202308.03 diff --git a/modules/nf-core/sentieon/dedup/main.nf b/modules/nf-core/sentieon/dedup/main.nf index f0b387f64f..5735df7340 100644 --- a/modules/nf-core/sentieon/dedup/main.nf +++ b/modules/nf-core/sentieon/dedup/main.nf @@ -5,8 +5,8 @@ process SENTIEON_DEDUP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'oras://community.wave.seqera.io/library/sentieon:202308.02--ffce1b7074ce9924' : - 'nf-core/sentieon:202308.02--c641bc397cbf79d5' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a6/a64461f38d76bebea8e21441079e76e663e1168b0c59dafee6ee58440ad8c8ac/data' : + 'community.wave.seqera.io/library/sentieon:202308.03--59589f002351c221' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/sentieon/dedup/tests/main.nf.test.snap b/modules/nf-core/sentieon/dedup/tests/main.nf.test.snap index c1cd83ec34..26117a7cdf 100644 --- a/modules/nf-core/sentieon/dedup/tests/main.nf.test.snap +++ b/modules/nf-core/sentieon/dedup/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "test" }, - "test.cram:md5,d2993113f4614f5196fc74d489412fc4" + "test.cram:md5,e46e97256846338e1cff32d862105491" ] ], "1": [ @@ -34,7 +34,7 @@ { "id": "test" }, - "test.score:md5,a97459ff2939682091bac3c3912402dc" + "test.score:md5,835f05ecc5d3ef5d4e31ba7f831d9a8b" ] ], "5": [ @@ -42,7 +42,7 @@ { "id": "test" }, - "test.cram.metrics:md5,ccd45ea1f2397184e3ab271b1ba8bb2a" + "test.cram.metrics:md5,208f7c5fa2f489cfaaffbce116fed0bc" ] ], "6": [ @@ -50,11 +50,11 @@ { "id": "test" }, - "test.cram.metrics.multiqc.tsv:md5,ccd45ea1f2397184e3ab271b1ba8bb2a" + "test.cram.metrics.multiqc.tsv:md5,208f7c5fa2f489cfaaffbce116fed0bc" ] ], "7": [ - "versions.yml:md5,f057aca19107ce54f0cec1e42edd097e" + "versions.yml:md5,763463853476be96846b6da5aecfacf4" ], "bai": [ [ @@ -80,7 +80,7 @@ { "id": "test" }, - "test.cram:md5,d2993113f4614f5196fc74d489412fc4" + "test.cram:md5,e46e97256846338e1cff32d862105491" ] ], "metrics": [ @@ -88,7 +88,7 @@ { "id": "test" }, - "test.cram.metrics:md5,ccd45ea1f2397184e3ab271b1ba8bb2a" + "test.cram.metrics:md5,208f7c5fa2f489cfaaffbce116fed0bc" ] ], "metrics_multiqc_tsv": [ @@ -96,7 +96,7 @@ { "id": "test" }, - "test.cram.metrics.multiqc.tsv:md5,ccd45ea1f2397184e3ab271b1ba8bb2a" + "test.cram.metrics.multiqc.tsv:md5,208f7c5fa2f489cfaaffbce116fed0bc" ] ], "score": [ @@ -104,19 +104,19 @@ { "id": "test" }, - "test.score:md5,a97459ff2939682091bac3c3912402dc" + "test.score:md5,835f05ecc5d3ef5d4e31ba7f831d9a8b" ] ], "versions": [ - "versions.yml:md5,f057aca19107ce54f0cec1e42edd097e" + "versions.yml:md5,763463853476be96846b6da5aecfacf4" ] } ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-26T13:02:23.640202" + "timestamp": "2024-10-02T10:28:10.570152622" }, "Test removing duplicates": { "content": [ @@ -126,7 +126,7 @@ { "id": "test" }, - "test.cram:md5,e67398ab64430191f9d15cb8a8f425c7" + "test.cram:md5,8075d3e7c66d36fdbb81270eefc996d4" ] ], "1": [ @@ -153,7 +153,7 @@ { "id": "test" }, - "test.score:md5,a97459ff2939682091bac3c3912402dc" + "test.score:md5,835f05ecc5d3ef5d4e31ba7f831d9a8b" ] ], "5": [ @@ -161,7 +161,7 @@ { "id": "test" }, - "test.cram.metrics:md5,7fc2ddc6b21838bdc42aff146549cea2" + "test.cram.metrics:md5,2a41239de0275a8321f4658286d97d65" ] ], "6": [ @@ -169,11 +169,11 @@ { "id": "test" }, - "test.cram.metrics.multiqc.tsv:md5,7fc2ddc6b21838bdc42aff146549cea2" + "test.cram.metrics.multiqc.tsv:md5,2a41239de0275a8321f4658286d97d65" ] ], "7": [ - "versions.yml:md5,f057aca19107ce54f0cec1e42edd097e" + "versions.yml:md5,763463853476be96846b6da5aecfacf4" ], "bai": [ [ @@ -199,7 +199,7 @@ { "id": "test" }, - "test.cram:md5,e67398ab64430191f9d15cb8a8f425c7" + "test.cram:md5,8075d3e7c66d36fdbb81270eefc996d4" ] ], "metrics": [ @@ -207,7 +207,7 @@ { "id": "test" }, - "test.cram.metrics:md5,7fc2ddc6b21838bdc42aff146549cea2" + "test.cram.metrics:md5,2a41239de0275a8321f4658286d97d65" ] ], "metrics_multiqc_tsv": [ @@ -215,7 +215,7 @@ { "id": "test" }, - "test.cram.metrics.multiqc.tsv:md5,7fc2ddc6b21838bdc42aff146549cea2" + "test.cram.metrics.multiqc.tsv:md5,2a41239de0275a8321f4658286d97d65" ] ], "score": [ @@ -223,19 +223,19 @@ { "id": "test" }, - "test.score:md5,a97459ff2939682091bac3c3912402dc" + "test.score:md5,835f05ecc5d3ef5d4e31ba7f831d9a8b" ] ], "versions": [ - "versions.yml:md5,f057aca19107ce54f0cec1e42edd097e" + "versions.yml:md5,763463853476be96846b6da5aecfacf4" ] } ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-26T13:02:33.698037" + "timestamp": "2024-10-02T10:28:19.377946074" }, "Test stub": { "content": [ @@ -292,7 +292,7 @@ ] ], "7": [ - "versions.yml:md5,f057aca19107ce54f0cec1e42edd097e" + "versions.yml:md5,763463853476be96846b6da5aecfacf4" ], "bai": [ [ @@ -346,14 +346,14 @@ ] ], "versions": [ - "versions.yml:md5,f057aca19107ce54f0cec1e42edd097e" + "versions.yml:md5,763463853476be96846b6da5aecfacf4" ] } ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-26T13:02:41.360148" + "timestamp": "2024-10-02T10:28:28.792696026" } } \ No newline at end of file diff --git a/modules/nf-core/sentieon/dnamodelapply/environment.yml b/modules/nf-core/sentieon/dnamodelapply/environment.yml index 185d95bde8..d7abf668ea 100644 --- a/modules/nf-core/sentieon/dnamodelapply/environment.yml +++ b/modules/nf-core/sentieon/dnamodelapply/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sentieon=202308.02 + - bioconda::sentieon=202308.03 diff --git a/modules/nf-core/sentieon/dnamodelapply/main.nf b/modules/nf-core/sentieon/dnamodelapply/main.nf index b4b10ce4d0..85fd601b39 100644 --- a/modules/nf-core/sentieon/dnamodelapply/main.nf +++ b/modules/nf-core/sentieon/dnamodelapply/main.nf @@ -5,8 +5,8 @@ process SENTIEON_DNAMODELAPPLY { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'oras://community.wave.seqera.io/library/sentieon:202308.02--ffce1b7074ce9924' : - 'nf-core/sentieon:202308.02--c641bc397cbf79d5' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a6/a64461f38d76bebea8e21441079e76e663e1168b0c59dafee6ee58440ad8c8ac/data' : + 'community.wave.seqera.io/library/sentieon:202308.03--59589f002351c221' }" input: tuple val(meta), path(vcf), path(idx) diff --git a/modules/nf-core/sentieon/dnascope/environment.yml b/modules/nf-core/sentieon/dnascope/environment.yml index 185d95bde8..d7abf668ea 100644 --- a/modules/nf-core/sentieon/dnascope/environment.yml +++ b/modules/nf-core/sentieon/dnascope/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sentieon=202308.02 + - bioconda::sentieon=202308.03 diff --git a/modules/nf-core/sentieon/dnascope/main.nf b/modules/nf-core/sentieon/dnascope/main.nf index 63d7d23b8a..bdeb62521a 100644 --- a/modules/nf-core/sentieon/dnascope/main.nf +++ b/modules/nf-core/sentieon/dnascope/main.nf @@ -5,8 +5,8 @@ process SENTIEON_DNASCOPE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'oras://community.wave.seqera.io/library/sentieon:202308.02--ffce1b7074ce9924' : - 'nf-core/sentieon:202308.02--c641bc397cbf79d5' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a6/a64461f38d76bebea8e21441079e76e663e1168b0c59dafee6ee58440ad8c8ac/data' : + 'community.wave.seqera.io/library/sentieon:202308.03--59589f002351c221' }" input: tuple val(meta), path(bam), path(bai), path(intervals) diff --git a/modules/nf-core/sentieon/gvcftyper/environment.yml b/modules/nf-core/sentieon/gvcftyper/environment.yml index 185d95bde8..d7abf668ea 100644 --- a/modules/nf-core/sentieon/gvcftyper/environment.yml +++ b/modules/nf-core/sentieon/gvcftyper/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sentieon=202308.02 + - bioconda::sentieon=202308.03 diff --git a/modules/nf-core/sentieon/gvcftyper/main.nf b/modules/nf-core/sentieon/gvcftyper/main.nf index e2e5d2434d..6817c6dbe2 100644 --- a/modules/nf-core/sentieon/gvcftyper/main.nf +++ b/modules/nf-core/sentieon/gvcftyper/main.nf @@ -5,8 +5,8 @@ process SENTIEON_GVCFTYPER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'oras://community.wave.seqera.io/library/sentieon:202308.02--ffce1b7074ce9924' : - 'nf-core/sentieon:202308.02--c641bc397cbf79d5' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a6/a64461f38d76bebea8e21441079e76e663e1168b0c59dafee6ee58440ad8c8ac/data' : + 'community.wave.seqera.io/library/sentieon:202308.03--59589f002351c221' }" input: tuple val(meta), path(gvcfs), path(tbis), path(intervals) diff --git a/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test.snap b/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test.snap index 5e7e40fb6b..627b62fd87 100644 --- a/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test.snap +++ b/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test.snap @@ -2,58 +2,58 @@ "sentieon gvcftyper dbsnp": { "content": [ [ - "versions.yml:md5,bc9039ece9061340830a80ac2b171f3b" + "versions.yml:md5,03a2696e8be5117cccfe48a9bfd8c68a" ], "test.genotyped.vcf.gz.tbi", "21606383c760bf676d4c1f747b97d118" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T14:12:47.508154" + "timestamp": "2024-10-02T10:29:01.102534193" }, "sentieon gvcftyper dbsnp intervals": { "content": [ [ - "versions.yml:md5,bc9039ece9061340830a80ac2b171f3b" + "versions.yml:md5,03a2696e8be5117cccfe48a9bfd8c68a" ], "test.genotyped.vcf.gz.tbi", "21606383c760bf676d4c1f747b97d118" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T14:13:05.636172" + "timestamp": "2024-10-02T10:29:20.933217951" }, "sentieon gvcftyper vcf.gz": { "content": [ [ - "versions.yml:md5,bc9039ece9061340830a80ac2b171f3b" + "versions.yml:md5,03a2696e8be5117cccfe48a9bfd8c68a" ], "test.genotyped.vcf.gz.tbi", "d13216836f1452e200b215b796606671" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T14:12:38.720056" + "timestamp": "2024-10-02T10:28:50.937002394" }, "sentieon gvcftyper intervals": { "content": [ [ - "versions.yml:md5,bc9039ece9061340830a80ac2b171f3b" + "versions.yml:md5,03a2696e8be5117cccfe48a9bfd8c68a" ], "test.genotyped.vcf.gz.tbi", "d13216836f1452e200b215b796606671" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T14:12:56.700687" + "timestamp": "2024-10-02T10:29:11.029924476" }, "sentieon gvcftyper - stub": { "content": [ @@ -75,7 +75,7 @@ ] ], "2": [ - "versions.yml:md5,bc9039ece9061340830a80ac2b171f3b" + "versions.yml:md5,03a2696e8be5117cccfe48a9bfd8c68a" ], "vcf_gz": [ [ @@ -94,28 +94,28 @@ ] ], "versions": [ - "versions.yml:md5,bc9039ece9061340830a80ac2b171f3b" + "versions.yml:md5,03a2696e8be5117cccfe48a9bfd8c68a" ] } ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T14:03:46.379477" + "timestamp": "2024-10-02T10:29:30.788262037" }, "sentieon gvcftyper vcf": { "content": [ [ - "versions.yml:md5,bc9039ece9061340830a80ac2b171f3b" + "versions.yml:md5,03a2696e8be5117cccfe48a9bfd8c68a" ], "test.genotyped.vcf.gz.tbi", "d13216836f1452e200b215b796606671" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T14:12:29.24482" + "timestamp": "2024-10-02T10:28:41.276698125" } } \ No newline at end of file diff --git a/modules/nf-core/sentieon/haplotyper/environment.yml b/modules/nf-core/sentieon/haplotyper/environment.yml index 185d95bde8..d7abf668ea 100644 --- a/modules/nf-core/sentieon/haplotyper/environment.yml +++ b/modules/nf-core/sentieon/haplotyper/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sentieon=202308.02 + - bioconda::sentieon=202308.03 diff --git a/modules/nf-core/sentieon/haplotyper/main.nf b/modules/nf-core/sentieon/haplotyper/main.nf index 33122d86b2..a04b342caf 100644 --- a/modules/nf-core/sentieon/haplotyper/main.nf +++ b/modules/nf-core/sentieon/haplotyper/main.nf @@ -5,8 +5,8 @@ process SENTIEON_HAPLOTYPER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'oras://community.wave.seqera.io/library/sentieon:202308.02--ffce1b7074ce9924' : - 'nf-core/sentieon:202308.02--c641bc397cbf79d5' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a6/a64461f38d76bebea8e21441079e76e663e1168b0c59dafee6ee58440ad8c8ac/data' : + 'community.wave.seqera.io/library/sentieon:202308.03--59589f002351c221' }" input: tuple val(meta), path(input), path(input_index), path(intervals), path(recal_table) diff --git a/modules/nf-core/sentieon/haplotyper/tests/main.nf.test.snap b/modules/nf-core/sentieon/haplotyper/tests/main.nf.test.snap index 5b77a02f5e..0527f0fcbe 100644 --- a/modules/nf-core/sentieon/haplotyper/tests/main.nf.test.snap +++ b/modules/nf-core/sentieon/haplotyper/tests/main.nf.test.snap @@ -2,49 +2,49 @@ "Sentieon Haplotyper VCF": { "content": [ [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ], "test.unfiltered.vcf.gz.tbi", "cea0045051da7877b38a1e25df812a91" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T10:16:51.711057" + "timestamp": "2024-10-02T10:29:42.675527558" }, "Sentieon Haplotyper Recalibration": { "content": [ [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ], "test.unfiltered.vcf.gz.tbi", "10faa3b669c49826098e09784d8a4716" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T15:21:57.012186" + "timestamp": "2024-10-02T10:30:38.708688756" }, "Sentieon Haplotyper GVCF": { "content": [ [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ], "test.g.vcf.gz.tbi", "338fc3c37b208d6595948576833eb665" ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T10:17:01.797501" + "timestamp": "2024-10-02T10:29:53.99302993" }, "Sentieon Haplotyper BOTH": { "content": [ [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ], "test.g.vcf.gz.tbi", "338fc3c37b208d6595948576833eb665", @@ -53,14 +53,14 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T10:17:12.021226" + "timestamp": "2024-10-02T10:30:03.323463525" }, "Sentieon Haplotyper DBSNP BOTH": { "content": [ [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ], "test.g.vcf.gz.tbi", "228556b7921205f023fec51098feeb97", @@ -69,14 +69,14 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T10:30:48.065511" + "timestamp": "2024-10-02T10:30:25.917634004" }, "Sentieon Haplotyper Intervals BOTH": { "content": [ [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ], "test.g.vcf.gz.tbi", "338fc3c37b208d6595948576833eb665", @@ -85,9 +85,9 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T10:17:22.554336" + "timestamp": "2024-10-02T10:30:14.249175276" }, "Sentieon Haplotyper - stub": { "content": [ @@ -125,7 +125,7 @@ ] ], "4": [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ], "gvcf": [ [ @@ -160,28 +160,28 @@ ] ], "versions": [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ] } ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-31T10:47:33.117516" + "timestamp": "2024-10-02T10:30:56.435076872" }, "Sentieon Haplotyper multiple CRAMs": { "content": [ [ - "versions.yml:md5,b58c15c81619894cdbab1f2edf694190" + "versions.yml:md5,1a7b41acc44d0724c8dca247e6323877" ], "test.unfiltered.vcf.gz.tbi", "b5d6e09e336438e38f7bf5531799e3a" ], "meta": { - "nf-test": "0.8.4", + "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-13T17:04:30.67684393" + "timestamp": "2024-10-02T10:30:49.266709749" } } \ No newline at end of file diff --git a/modules/nf-core/sentieon/varcal/environment.yml b/modules/nf-core/sentieon/varcal/environment.yml index 185d95bde8..d7abf668ea 100644 --- a/modules/nf-core/sentieon/varcal/environment.yml +++ b/modules/nf-core/sentieon/varcal/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sentieon=202308.02 + - bioconda::sentieon=202308.03 diff --git a/modules/nf-core/sentieon/varcal/main.nf b/modules/nf-core/sentieon/varcal/main.nf index 7c85c12102..d78eacb44a 100644 --- a/modules/nf-core/sentieon/varcal/main.nf +++ b/modules/nf-core/sentieon/varcal/main.nf @@ -5,8 +5,8 @@ process SENTIEON_VARCAL { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'oras://community.wave.seqera.io/library/sentieon:202308.02--ffce1b7074ce9924' : - 'nf-core/sentieon:202308.02--c641bc397cbf79d5' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a6/a64461f38d76bebea8e21441079e76e663e1168b0c59dafee6ee58440ad8c8ac/data' : + 'community.wave.seqera.io/library/sentieon:202308.03--59589f002351c221' }" input: tuple val(meta), path(vcf), path(tbi) // input vcf and tbi of variants to recalibrate diff --git a/modules/nf-core/spring/decompress/main.nf b/modules/nf-core/spring/decompress/main.nf index 4cf7829917..86ced26906 100644 --- a/modules/nf-core/spring/decompress/main.nf +++ b/modules/nf-core/spring/decompress/main.nf @@ -38,4 +38,17 @@ process SPRING_DECOMPRESS { spring: ${VERSION} END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '1.1.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + def output = write_one_fastq_gz ? "echo '' | gzip > ${prefix}.fastq.gz" : "echo '' | gzip > ${prefix}_R1.fastq.gz; echo '' | gzip > ${prefix}_R2.fastq.gz" + """ + ${output} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + spring: ${VERSION} + END_VERSIONS + """ } diff --git a/modules/nf-core/spring/decompress/test/main.nf.test b/modules/nf-core/spring/decompress/test/main.nf.test index 550c6746b8..9428a86bcf 100644 --- a/modules/nf-core/spring/decompress/test/main.nf.test +++ b/modules/nf-core/spring/decompress/test/main.nf.test @@ -8,6 +8,8 @@ nextflow_process { script "../main.nf" process "SPRING_DECOMPRESS" + + test("Write-One-File") { setup { @@ -75,4 +77,79 @@ nextflow_process { ) } } + + test("Write-One-File-stub") { + + options "-stub" + + setup { + run("SPRING_COMPRESS") { + options "-stub" + script "../../compress/main.nf" + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + [] + ] + """ + } + } + } + + when { + process { + """ + input[0] = SPRING_COMPRESS.out.spring + input[1] = true // write_one_fastq_gz + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("Write-Two-Files-stub") { + + options "-stub" + + setup { + run("SPRING_COMPRESS") { + options "-stub" + script "../../compress/main.nf" + process { + """ + input[0] = [ + [ id:'test2' ], // meta map + file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + '/genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + ] + """ + } + } + } + + when { + process { + """ + input[0] = SPRING_COMPRESS.out.spring + input[1] = false // write_one_fastq_gz + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + } \ No newline at end of file diff --git a/modules/nf-core/spring/decompress/test/main.nf.test.snap b/modules/nf-core/spring/decompress/test/main.nf.test.snap index 14a11d2c41..7dcadbab61 100644 --- a/modules/nf-core/spring/decompress/test/main.nf.test.snap +++ b/modules/nf-core/spring/decompress/test/main.nf.test.snap @@ -1,4 +1,76 @@ { + "Write-One-File stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "/home/ramprasad.neethiraj/nextflow/modules/.nf-test/tests/2a6cfab794852e23e6324eb4955668b2/work/42/aee6c82c1ca502c3b02339f597188b/test.fastq.gz" + ] + ], + "1": [ + "versions.yml:md5,4711df5941f1464e3693d24dd29c705b" + ], + "fastq": [ + [ + { + "id": "test" + }, + "/home/ramprasad.neethiraj/nextflow/modules/.nf-test/tests/2a6cfab794852e23e6324eb4955668b2/work/42/aee6c82c1ca502c3b02339f597188b/test.fastq.gz" + ] + ], + "versions": [ + "versions.yml:md5,4711df5941f1464e3693d24dd29c705b" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-08T10:03:50.626223289" + }, + "Write-Two-Files stub": { + "content": [ + { + "0": [ + [ + { + "id": "test2" + }, + [ + "/home/ramprasad.neethiraj/nextflow/modules/.nf-test/tests/528557b5a81e4bffb57c38b19c7aa351/work/74/fc5d116d011bcd47d6f7de8d42ac34/test2_R1.fastq.gz", + "/home/ramprasad.neethiraj/nextflow/modules/.nf-test/tests/528557b5a81e4bffb57c38b19c7aa351/work/74/fc5d116d011bcd47d6f7de8d42ac34/test2_R2.fastq.gz" + ] + ] + ], + "1": [ + "versions.yml:md5,4711df5941f1464e3693d24dd29c705b" + ], + "fastq": [ + [ + { + "id": "test2" + }, + [ + "/home/ramprasad.neethiraj/nextflow/modules/.nf-test/tests/528557b5a81e4bffb57c38b19c7aa351/work/74/fc5d116d011bcd47d6f7de8d42ac34/test2_R1.fastq.gz", + "/home/ramprasad.neethiraj/nextflow/modules/.nf-test/tests/528557b5a81e4bffb57c38b19c7aa351/work/74/fc5d116d011bcd47d6f7de8d42ac34/test2_R2.fastq.gz" + ] + ] + ], + "versions": [ + "versions.yml:md5,4711df5941f1464e3693d24dd29c705b" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-08T10:03:57.417015606" + }, "Write-Two-Files": { "content": [ { @@ -70,5 +142,77 @@ "nextflow": "24.04.2" }, "timestamp": "2024-06-21T13:02:07.466039653" + }, + "Write-One-File-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + "versions.yml:md5,4711df5941f1464e3693d24dd29c705b" + ], + "fastq": [ + [ + { + "id": "test" + }, + "test.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,4711df5941f1464e3693d24dd29c705b" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-08T13:55:53.594615215" + }, + "Write-Two-Files-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test2" + }, + [ + "test2_R1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test2_R2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + "versions.yml:md5,4711df5941f1464e3693d24dd29c705b" + ], + "fastq": [ + [ + { + "id": "test2" + }, + [ + "test2_R1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test2_R2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "versions": [ + "versions.yml:md5,4711df5941f1464e3693d24dd29c705b" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-08T13:56:01.212228909" } } \ No newline at end of file diff --git a/modules/nf-core/svdb/merge/environment.yml b/modules/nf-core/svdb/merge/environment.yml index f725b65248..ab87ec70a1 100644 --- a/modules/nf-core/svdb/merge/environment.yml +++ b/modules/nf-core/svdb/merge/environment.yml @@ -3,6 +3,5 @@ channels: - bioconda dependencies: - - htslib=1.19.1 - - samtools=1.19.2 - - svdb=2.8.1 + - bcftools=1.21 + - svdb=2.8.2 diff --git a/modules/nf-core/svdb/merge/main.nf b/modules/nf-core/svdb/merge/main.nf index c24a9a7c38..5b19a29931 100644 --- a/modules/nf-core/svdb/merge/main.nf +++ b/modules/nf-core/svdb/merge/main.nf @@ -3,57 +3,102 @@ process SVDB_MERGE { label 'process_medium' conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-c8daa8f9d69d3c5a1a4ff08283a166c18edb0000:511069f65a53621c5503e5cfee319aa3c735abfa-0': - 'biocontainers/mulled-v2-c8daa8f9d69d3c5a1a4ff08283a166c18edb0000:511069f65a53621c5503e5cfee319aa3c735abfa-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-375a758a4ca8c128fb9d38047a68a9f4322d2acd:b3615e06ef17566f2988a215ce9e10808c1d08bf-0': + 'biocontainers/mulled-v2-375a758a4ca8c128fb9d38047a68a9f4322d2acd:b3615e06ef17566f2988a215ce9e10808c1d08bf-0' }" input: tuple val(meta), path(vcfs) - val (priority) + val(input_priority) + val(sort_inputs) output: - tuple val(meta), path("*.vcf.gz"), emit: vcf - path "versions.yml" , emit: versions + tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}"), emit: vcf + tuple val(meta), path("*.tbi") , emit: tbi, optional: true + tuple val(meta), path("*.csi") , emit: csi, optional: true + path "versions.yml" , emit: versions when: 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}" - def input = "${vcfs.join(" ")}" - def prio = "" - if(priority) { - prio = "--priority ${priority.join(',')}" + + // Ensure priority list matches the number of VCFs if priority is provided + if (input_priority && vcfs.collect().size() != input_priority.collect().size()) { + error "If priority is used, one tag per VCF is needed" + } + + def input = "" + def prio = "" + if (input_priority) { + if (vcfs.collect().size() > 1 && sort_inputs) { + // make vcf-prioprity pairs and sort on VCF name, so priority is also sorted the same + def pairs = vcfs.indices.collect { [vcfs[it], input_priority[it]] } + pairs = pairs.sort { a, b -> a[0].name <=> b[0].name } + vcfs = pairs.collect { it[0] } + priority = pairs.collect { it[1] } + } else { + priority = input_priority + } + + // Build inputs + prio = "--priority ${input_priority.join(',')}" input = "" - for (int index = 0; index < vcfs.size(); index++) { - input += " ${vcfs[index]}:${priority[index]}" + for (int index = 0; index < vcfs.collect().size(); index++) { + input += "${vcfs[index]}:${priority[index]} " } + + } else { + // if there's no priority input just sort the vcfs by name if possible + input = (vcfs.collect().size() > 1 && sort_inputs) ? vcfs.sort { it.name } : vcfs } + + def extension = args2.contains("--output-type b") || args2.contains("-Ob") ? "bcf.gz" : + args2.contains("--output-type u") || args2.contains("-Ou") ? "bcf" : + args2.contains("--output-type z") || args2.contains("-Oz") ? "vcf.gz" : + args2.contains("--output-type v") || args2.contains("-Ov") ? "vcf" : + "vcf" """ svdb \\ --merge \\ $args \\ $prio \\ - --vcf $input \\ - > ${prefix}.vcf - bgzip ${prefix}.vcf + --vcf $input |\\ + bcftools view \\ + --threads ${task.cpus} \\ + --output ${prefix}.${extension} cat <<-END_VERSIONS > versions.yml "${task.process}": svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" + def args2 = task.ext.args2 ?: '' + def extension = args2.contains("--output-type b") || args2.contains("-Ob") ? "bcf.gz" : + args2.contains("--output-type u") || args2.contains("-Ou") ? "bcf" : + args2.contains("--output-type z") || args2.contains("-Oz") ? "vcf.gz" : + args2.contains("--output-type v") || args2.contains("-Ov") ? "vcf" : + "vcf" + def index = args2.contains("--write-index=tbi") || args2.contains("-W=tbi") ? "tbi" : + args2.contains("--write-index=csi") || args2.contains("-W=csi") ? "csi" : + args2.contains("--write-index") || args2.contains("-W") ? "csi" : + "" + def create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" + def create_index = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index}" : "" """ - touch ${prefix}.vcf.gz + ${create_cmd} ${prefix}.${extension} + ${create_index} cat <<-END_VERSIONS > versions.yml "${task.process}": svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/nf-core/svdb/merge/meta.yml b/modules/nf-core/svdb/merge/meta.yml index 7dc7c67588..c34a9cb157 100644 --- a/modules/nf-core/svdb/merge/meta.yml +++ b/modules/nf-core/svdb/merge/meta.yml @@ -19,23 +19,52 @@ input: e.g. [ id:'test' ] - vcfs: type: list - description: Two or more VCF files. Order of files should correspond to the - order of tags used for priority. + description: | + One or more VCF files. The order and number of files should correspond to + the order and number of tags in the `priority` input channel. pattern: "*.{vcf,vcf.gz}" - - - priority: + - - input_priority: type: list - description: prioritise the input vcf files according to this list, e.g ['tiddit','cnvnator'] + description: | + Prioritize the input VCF files according to this list, + e.g ['tiddit','cnvnator']. The order and number of tags should correspond to + the order and number of VCFs in the `vcfs` input channel. + - - sort_inputs: + type: boolean + description: | + Should the input files be sorted by name. The priority tag will be sorted + together with it's corresponding VCF file. output: - vcf: - meta: type: map description: | Groovy Map containing sample information - e.g. [ id:'test' ] - - "*.vcf.gz": + e.g. [ id:'test', single_end:false ] + - "*.{vcf,vcf.gz,bcf,bcf.gz}": + type: file + description: VCF output file + pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbi": + type: file + description: Alternative VCF file index + pattern: "*.tbi" + - csi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": type: file - description: merged VCF file - pattern: "*.vcf.gz" + description: Default VCF file index + pattern: "*.csi" - versions: - versions.yml: type: file @@ -45,3 +74,4 @@ authors: - "@ramprasadn" maintainers: - "@ramprasadn" + - "@fellen31" diff --git a/modules/nf-core/svdb/merge/tests/main.nf.test b/modules/nf-core/svdb/merge/tests/main.nf.test index 42f7c57067..6a79d7a09a 100644 --- a/modules/nf-core/svdb/merge/tests/main.nf.test +++ b/modules/nf-core/svdb/merge/tests/main.nf.test @@ -2,23 +2,108 @@ nextflow_process { name "Test Process SVDB_MERGE" script "modules/nf-core/svdb/merge/main.nf" + config "./nextflow.config" process "SVDB_MERGE" tag "modules" tag "modules_nfcore" tag "svdb" tag "svdb/merge" - test("test_svdb_merge") { + test("1 sample, [], []") { when { process { """ input[0] = Channel.of([ [ id:'test' ], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true) ] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ]) - input[1] = [ 'tiddit', 'cnvnator'] + input[1] = [] + input[2] = [] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert path(process.out.vcf.get(0).get(1)).linesGzip[3].contains("--vcf test.vcf") }, // SVDB command line + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.summary, + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions + ).match() } + ) + } + } + + test("1 sample, [], true") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ]) + input[1] = [] + input[2] = [] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert path(process.out.vcf.get(0).get(1)).linesGzip[3].contains("--vcf test.vcf") }, // SVDB command line + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.summary, + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions + ).match() } + ) + } + } + + test("1 sample, ['tiddit'], []") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ]) + input[1] = ['tiddit'] + input[2] = [] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert path(process.out.vcf.get(0).get(1)).linesGzip[3].contains("--priority tiddit --vcf test.vcf:tiddit") }, // SVDB command line + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.summary, + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions + ).match() } + ) + } + } + + test("1 sample, ['tiddit'], true") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ]) + input[1] = ['tiddit'] + input[2] = true """ } } @@ -26,23 +111,61 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert path(process.out.vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") } + { assert path(process.out.vcf.get(0).get(1)).linesGzip[3].contains("--priority tiddit --vcf test.vcf:tiddit") }, // SVDB command line + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.summary, + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions + ).match() } ) } + } + + test("2 samples, [], []") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + ]) + input[1] = [] + input[2] = [] + """ + } + } + then { + assertAll ( + { assert process.success }, + { assert path(process.out.vcf.get(0).get(1)).linesGzip[3].contains("--vcf test2.vcf test.vcf") }, // SVDB command line + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.summary, + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions + ).match() } + ) + } } - test("test_svdb_merge_noprio") { + test("2 samples, [], true") { when { process { """ input[0] = Channel.of([ [ id:'test' ], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true) ] + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] ]) input[1] = [] + input[2] = true """ } } @@ -50,10 +173,188 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert path(process.out.vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") } + { assert path(process.out.vcf.get(0).get(1)).linesGzip[3].contains("--vcf test.vcf test2.vcf") }, // SVDB command line + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.summary, + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions + ).match() } ) } + } + + test("2 samples, ['tiddit', 'cnvnator'], []") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + ]) + input[1] = ['tiddit', 'cnvnator'] + input[2] = [] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert path(process.out.vcf.get(0).get(1)).linesGzip[3].contains("--priority tiddit,cnvnator --vcf test2.vcf:tiddit test.vcf:cnvnator") }, // SVDB command line + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.summary, + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions + ).match() } + ) + } + } + + test("2 samples, ['tiddit', 'cnvnator'], true") { + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + ]) + input[1] = ['tiddit', 'cnvnator'] + input[2] = true + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert path(process.out.vcf.get(0).get(1)).linesGzip[3].contains("--priority tiddit,cnvnator --vcf test.vcf:cnvnator test2.vcf:tiddit") }, // SVDB command line + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.summary, + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions + ).match() } + ) + } + } + + test("2 samples, [], [] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + ]) + input[1] = [] + input[2] = [] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("2 samples, [], true - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + ]) + input[1] = [] + input[2] = true + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("2 samples, ['tiddit', 'cnvnator'], [] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + ]) + input[1] = ['tiddit', 'cnvnator'] + input[2] = [] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("2 samples, ['tiddit', 'cnvnator'], true - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + ]) + input[1] = ['tiddit', 'cnvnator'] + input[2] = true + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } } } diff --git a/modules/nf-core/svdb/merge/tests/main.nf.test.snap b/modules/nf-core/svdb/merge/tests/main.nf.test.snap new file mode 100644 index 0000000000..e86662e533 --- /dev/null +++ b/modules/nf-core/svdb/merge/tests/main.nf.test.snap @@ -0,0 +1,294 @@ +{ + "1 sample, [], []": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=1, variantCount=9, phased=false, phasedAutodetect=false]", + "60fb4cab2aa891bebef8ffdbd0e41bc3", + [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:00:25.9277471" + }, + "2 samples, ['tiddit', 'cnvnator'], true - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "merged.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "merged.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:05:49.325618245" + }, + "2 samples, ['tiddit', 'cnvnator'], []": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=2, variantCount=9, phased=false, phasedAutodetect=false]", + "254e56e4fc8356d68424828438da66e3", + [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:02:27.964808463" + }, + "2 samples, [], []": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=2, variantCount=9, phased=false, phasedAutodetect=false]", + "7ad648266e57d405b5b01aaea4613d1c", + [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:02:11.013532413" + }, + "2 samples, ['tiddit', 'cnvnator'], true": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=2, variantCount=9, phased=false, phasedAutodetect=false]", + "254e56e4fc8356d68424828438da66e3", + [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:02:35.956320871" + }, + "1 sample, ['tiddit'], []": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=1, variantCount=9, phased=false, phasedAutodetect=false]", + "9dd588cd870672b78192f48ad440b5d", + [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:00:42.064583463" + }, + "1 sample, [], true": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=1, variantCount=9, phased=false, phasedAutodetect=false]", + "60fb4cab2aa891bebef8ffdbd0e41bc3", + [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:00:33.88572601" + }, + "1 sample, ['tiddit'], true": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=1, variantCount=9, phased=false, phasedAutodetect=false]", + "9dd588cd870672b78192f48ad440b5d", + [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:00:50.18149857" + }, + "2 samples, [], true": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=2, variantCount=9, phased=false, phasedAutodetect=false]", + "de0a3b56cdee89e4c9cd4fbb4ad3391d", + [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:02:19.556799178" + }, + "2 samples, ['tiddit', 'cnvnator'], [] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "merged.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "merged.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:05:40.427970257" + }, + "2 samples, [], [] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "merged.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "merged.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:05:24.34471465" + }, + "2 samples, [], true - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "merged.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "merged.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,bf8271626d334b2a827f94a2daacadd0" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-24T09:05:32.529261733" + } +} \ No newline at end of file diff --git a/modules/nf-core/svdb/merge/tests/nextflow.config b/modules/nf-core/svdb/merge/tests/nextflow.config new file mode 100644 index 0000000000..c267037ca0 --- /dev/null +++ b/modules/nf-core/svdb/merge/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: 'SVDB_MERGE' { + ext.prefix = "merged" + ext.args2 = '--output-type z --no-version' + } +} diff --git a/modules/nf-core/tabix/bgziptabix/main.nf b/modules/nf-core/tabix/bgziptabix/main.nf index 05041f4953..22f37a7739 100644 --- a/modules/nf-core/tabix/bgziptabix/main.nf +++ b/modules/nf-core/tabix/bgziptabix/main.nf @@ -34,10 +34,11 @@ process TABIX_BGZIPTABIX { 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.tbi - touch ${prefix}.${input.getExtension()}.gz.csi + touch ${prefix}.${input.getExtension()}.gz.${index} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test index 1a84d74fc0..4d4130dc07 100644 --- a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test +++ b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test @@ -91,4 +91,33 @@ nextflow_process { } + test("sarscov2_bed_tbi_stub") { + config "./tabix_tbi.config" + + options "-stub" + + when { + 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() }, + { assert snapshot( + file(process.out.gz_tbi[0][1]).name + ).match("tbi_stub") + } + ) + } + + } + } diff --git a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap index c166ea7288..fb87799b20 100644 --- a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap +++ b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap @@ -91,6 +91,47 @@ }, "timestamp": "2024-02-19T14:51:00.548801" }, + "sarscov2_bed_tbi_stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.bed.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" + ], + "gz_csi": [ + + ], + "gz_tbi": [ + [ + { + "id": "test" + }, + "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.bed.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-25T14:45:18.533169949" + }, "csi_stub": { "content": [ "test.bed.gz" @@ -101,6 +142,16 @@ }, "timestamp": "2024-02-19T14:51:09.218454" }, + "tbi_stub": { + "content": [ + "test.bed.gz" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-25T14:45:18.550930179" + }, "tbi_test": { "content": [ "tbi_test.bed.gz" @@ -115,13 +166,7 @@ "content": [ { "0": [ - [ - { - "id": "test" - }, - "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.bed.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "1": [ [ @@ -145,13 +190,7 @@ ] ], "gz_tbi": [ - [ - { - "id": "test" - }, - "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.bed.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "versions": [ "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" @@ -159,9 +198,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-07-19T11:29:45.105209991" + "timestamp": "2024-09-25T14:44:19.786135972" } } \ No newline at end of file diff --git a/nextflow.config b/nextflow.config index 681d1b3411..f01ed136d2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -393,6 +393,7 @@ plugins { validation { defaultIgnoreParams = ["genomes"] + lenientMode = true help { enabled = true command = "nextflow run $manifest.name -profile --input samplesheet.csv --outdir " diff --git a/subworkflows/local/bam_variant_calling_somatic_tiddit/main.nf b/subworkflows/local/bam_variant_calling_somatic_tiddit/main.nf index 259520fce1..8c17df041b 100644 --- a/subworkflows/local/bam_variant_calling_somatic_tiddit/main.nf +++ b/subworkflows/local/bam_variant_calling_somatic_tiddit/main.nf @@ -22,7 +22,7 @@ workflow BAM_VARIANT_CALLING_SOMATIC_TIDDIT { TIDDIT_NORMAL(cram_normal, fasta, bwa) TIDDIT_TUMOR(cram_tumor, fasta, bwa) - SVDB_MERGE(TIDDIT_NORMAL.out.vcf.join(TIDDIT_TUMOR.out.vcf, failOnDuplicate: true, failOnMismatch: true).map{ meta, vcf_normal, vcf_tumor -> [ meta, [vcf_normal, vcf_tumor] ] }, false) + SVDB_MERGE(TIDDIT_NORMAL.out.vcf.join(TIDDIT_TUMOR.out.vcf, failOnDuplicate: true, failOnMismatch: true).map{ meta, vcf_normal, vcf_tumor -> [ meta, [vcf_normal, vcf_tumor] ] }, false, true) vcf = SVDB_MERGE.out.vcf