From 42ff0b143c551f906b7b74663b380e4330f4ced3 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 Sep 2024 17:19:35 +0200 Subject: [PATCH 01/28] first steps --- .nf-core.yml | 6 +- CITATIONS.md | 1 + modules.json | 78 +-- .../bcftools/concat/bcftools-concat.diff | 40 -- .../nf-core/bcftools/concat/environment.yml | 2 +- modules/nf-core/bcftools/concat/main.nf | 31 +- modules/nf-core/bcftools/concat/meta.yml | 8 + .../bcftools/concat/tests/main.nf.test | 254 ++++++- .../bcftools/concat/tests/main.nf.test.snap | 370 ++++++++++- .../bcftools/concat/tests/vcf_gz_index.config | 4 + .../concat/tests/vcf_gz_index_csi.config | 4 + .../concat/tests/vcf_gz_index_tbi.config | 4 + .../bcftools/pluginscatter/environment.yml | 2 +- .../nf-core/bcftools/pluginscatter/main.nf | 24 +- .../nf-core/bcftools/pluginscatter/meta.yml | 8 + .../bcftools/pluginscatter/tests/main.nf.test | 415 ++++++++++++ .../pluginscatter/tests/main.nf.test.snap | 623 ++++++++++++++++++ .../pluginscatter/tests/nextflow.config | 3 + .../bcftools/pluginscatter/tests/tags.yml | 2 + .../pluginscatter/tests/vcf_gz_index.config | 4 + .../tests/vcf_gz_index_csi.config | 4 + .../tests/vcf_gz_index_tbi.config | 4 + modules/nf-core/bcftools/sort/environment.yml | 2 +- modules/nf-core/bcftools/sort/main.nf | 19 +- modules/nf-core/bcftools/sort/meta.yml | 8 + .../nf-core/bcftools/sort/tests/main.nf.test | 222 +++++++ .../bcftools/sort/tests/main.nf.test.snap | 350 ++++++++++ modules/nf-core/bcftools/sort/tests/tags.yml | 2 + .../bcftools/sort/tests/vcf_gz_index.config | 4 + .../sort/tests/vcf_gz_index_csi.config | 4 + .../sort/tests/vcf_gz_index_tbi.config | 4 + .../ensemblvep/vep/ensemblvep-vep.diff | 38 -- .../nf-core/ensemblvep/vep/environment.yml | 4 +- modules/nf-core/ensemblvep/vep/main.nf | 18 +- modules/nf-core/ensemblvep/vep/meta.yml | 6 +- .../nf-core/ensemblvep/vep/tests/main.nf.test | 114 ++++ .../ensemblvep/vep/tests/main.nf.test.snap | 26 + .../ensemblvep/vep/tests/nextflow.config | 12 + .../ensemblvep/vep/tests/tab.gz.config | 5 + modules/nf-core/ensemblvep/vep/tests/tags.yml | 2 + .../nf-core/ensemblvep/vep/tests/vcf.config | 5 + modules/nf-core/happy/happy/environment.yml | 7 - modules/nf-core/happy/happy/main.nf | 84 --- modules/nf-core/happy/happy/meta.yml | 114 ---- modules/nf-core/snpeff/snpeff/main.nf | 10 +- .../nf-core/snpeff/snpeff/tests/main.nf.test | 51 ++ .../snpeff/snpeff/tests/main.nf.test.snap | 31 + .../snpeff/snpeff/tests/nextflow.config | 4 + modules/nf-core/snpeff/snpeff/tests/tags.yml | 2 + modules/nf-core/tabix/tabix/environment.yml | 3 + modules/nf-core/tabix/tabix/main.nf | 13 +- .../nf-core/tabix/tabix/tests/main.nf.test | 136 ++++ .../tabix/tabix/tests/main.nf.test.snap | 212 ++++++ .../tabix/tabix/tests/tabix_bed.config | 5 + .../tabix/tabix/tests/tabix_gff.config | 5 + .../tabix/tabix/tests/tabix_vcf_csi.config | 5 + .../tabix/tabix/tests/tabix_vcf_tbi.config | 5 + modules/nf-core/tabix/tabix/tests/tags.yml | 2 + modules/nf-core/vcf2db/vcf2db.diff | 143 ---- 59 files changed, 3010 insertions(+), 558 deletions(-) create mode 120000 CITATIONS.md delete mode 100644 modules/nf-core/bcftools/concat/bcftools-concat.diff create mode 100644 modules/nf-core/bcftools/concat/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/concat/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/concat/tests/vcf_gz_index_tbi.config create mode 100644 modules/nf-core/bcftools/pluginscatter/tests/main.nf.test create mode 100644 modules/nf-core/bcftools/pluginscatter/tests/main.nf.test.snap create mode 100644 modules/nf-core/bcftools/pluginscatter/tests/nextflow.config create mode 100644 modules/nf-core/bcftools/pluginscatter/tests/tags.yml create mode 100644 modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index_tbi.config create mode 100644 modules/nf-core/bcftools/sort/tests/main.nf.test create mode 100644 modules/nf-core/bcftools/sort/tests/main.nf.test.snap create mode 100644 modules/nf-core/bcftools/sort/tests/tags.yml create mode 100644 modules/nf-core/bcftools/sort/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/sort/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/sort/tests/vcf_gz_index_tbi.config delete mode 100644 modules/nf-core/ensemblvep/vep/ensemblvep-vep.diff create mode 100644 modules/nf-core/ensemblvep/vep/tests/main.nf.test create mode 100644 modules/nf-core/ensemblvep/vep/tests/main.nf.test.snap create mode 100644 modules/nf-core/ensemblvep/vep/tests/nextflow.config create mode 100644 modules/nf-core/ensemblvep/vep/tests/tab.gz.config create mode 100644 modules/nf-core/ensemblvep/vep/tests/tags.yml create mode 100644 modules/nf-core/ensemblvep/vep/tests/vcf.config delete mode 100644 modules/nf-core/happy/happy/environment.yml delete mode 100644 modules/nf-core/happy/happy/main.nf delete mode 100644 modules/nf-core/happy/happy/meta.yml create mode 100644 modules/nf-core/snpeff/snpeff/tests/main.nf.test create mode 100644 modules/nf-core/snpeff/snpeff/tests/main.nf.test.snap create mode 100644 modules/nf-core/snpeff/snpeff/tests/nextflow.config create mode 100644 modules/nf-core/snpeff/snpeff/tests/tags.yml create mode 100644 modules/nf-core/tabix/tabix/tests/main.nf.test create mode 100644 modules/nf-core/tabix/tabix/tests/main.nf.test.snap create mode 100644 modules/nf-core/tabix/tabix/tests/tabix_bed.config create mode 100644 modules/nf-core/tabix/tabix/tests/tabix_gff.config create mode 100644 modules/nf-core/tabix/tabix/tests/tabix_vcf_csi.config create mode 100644 modules/nf-core/tabix/tabix/tests/tabix_vcf_tbi.config create mode 100644 modules/nf-core/tabix/tabix/tests/tags.yml delete mode 100644 modules/nf-core/vcf2db/vcf2db.diff diff --git a/.nf-core.yml b/.nf-core.yml index f9c0a042..70105d4f 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -7,17 +7,15 @@ lint: - .github/ISSUE_TEMPLATE/config.yml - .github/workflows/awstest.yml - .github/workflows/awsfulltest.yml + - docs/README.md files_unchanged: - CODE_OF_CONDUCT.md - assets/nf-core-germline_logo_light.png - docs/images/nf-core-germline_logo_light.png - docs/images/nf-core-germline_logo_dark.png - .github/ISSUE_TEMPLATE/bug_report.yml - multiqc_config: - - report_comment nextflow_config: - - manifest.name - - manifest.homePage + - "custom_config" nf_core_version: 2.14.1 repository_type: pipeline template: diff --git a/CITATIONS.md b/CITATIONS.md new file mode 120000 index 00000000..35cfd9f8 --- /dev/null +++ b/CITATIONS.md @@ -0,0 +1 @@ +docs/CITATIONS.md \ No newline at end of file diff --git a/modules.json b/modules.json index 1e2993d5..830e32fa 100644 --- a/modules.json +++ b/modules.json @@ -12,9 +12,8 @@ }, "bcftools/concat": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", - "installed_by": ["modules", "vcf_annotate_ensemblvep_snpeff"], - "patch": "modules/nf-core/bcftools/concat/bcftools-concat.diff" + "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", + "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/filter": { "branch": "master", @@ -28,7 +27,7 @@ }, "bcftools/pluginscatter": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/query": { @@ -39,17 +38,16 @@ "bcftools/reheader": { "branch": "master", "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", - "installed_by": ["modules"], - "patch": "modules/nf-core/bcftools/reheader/bcftools-reheader.diff" + "installed_by": ["modules"] }, "bcftools/sort": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/stats": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "618364f55cb88f6c283f6c6c45c24d5f9f08f998", "installed_by": ["modules"] }, "bedtools/intersect": { @@ -59,66 +57,57 @@ }, "bedtools/merge": { "branch": "master", - "git_sha": "575e1bc54b083fb15e7dd8b5fcc40bea60e8ce83", + "git_sha": "a3d614e4a7b8691a259bcfe33ad80903217d6215", "installed_by": ["modules"] }, "bedtools/split": { "branch": "master", - "git_sha": "3b248b84694d1939ac4bb33df84bf6233a34d668", + "git_sha": "6dc8a32e32158bb4d3f9af92c802233b5d4f8e4d", "installed_by": ["modules"] }, "ensemblvep/download": { "branch": "master", - "git_sha": "214d575774c172062924ad3564b4f66655600730", - "installed_by": ["modules"], - "patch": "modules/nf-core/ensemblvep/download/ensemblvep-download.diff" + "git_sha": "54c183cba37cac58860d9967feaae54acf9cc3e0", + "installed_by": ["modules"] }, "ensemblvep/vep": { "branch": "master", - "git_sha": "1b5ffd7aa6e3c21b702957c808cbd1c351dd1809", - "installed_by": ["vcf_annotate_ensemblvep_snpeff"], - "patch": "modules/nf-core/ensemblvep/vep/ensemblvep-vep.diff" + "git_sha": "54c183cba37cac58860d9967feaae54acf9cc3e0", + "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "gatk4/calibratedragstrmodel": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "3f42e07a1133064c569b0dbe182979527bca9e59", "installed_by": ["modules"] }, "gatk4/composestrtablefile": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "926e2f394d01c71d3abbdbca9c588630bfe51abf", "installed_by": ["modules"] }, "gatk4/createsequencedictionary": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "e6fe277739f5894711405af3e717b2470bd956b5", "installed_by": ["modules"] }, "gatk4/genomicsdbimport": { "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", "installed_by": ["modules"] }, "gatk4/genotypegvcfs": { "branch": "master", "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", - "installed_by": ["modules"], - "patch": "modules/nf-core/gatk4/genotypegvcfs/gatk4-genotypegvcfs.diff" + "installed_by": ["modules"] }, "gatk4/haplotypecaller": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", - "installed_by": ["modules"], - "patch": "modules/nf-core/gatk4/haplotypecaller/gatk4-haplotypecaller.diff" - }, - "gawk": { - "branch": "master", - "git_sha": "dc3527855e7358c6d8400828754c0caa5f11698f", + "git_sha": "e53d091a6de1ae9fd681351c085d8abe076ba1ec", "installed_by": ["modules"] }, - "happy/happy": { + "gawk": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "da4d05d04e65227d4307e87940842f1a14de62c7", "installed_by": ["modules"] }, "mosdepth": { @@ -138,9 +127,8 @@ }, "rtgtools/pedfilter": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"], - "patch": "modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff" + "git_sha": "1a4ab76618a2269ee653aefff8a5ee1f855e5f83", + "installed_by": ["modules"] }, "rtgtools/rocplot": { "branch": "master", @@ -170,12 +158,11 @@ "samtools/merge": { "branch": "master", "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["modules"], - "patch": "modules/nf-core/samtools/merge/samtools-merge.diff" + "installed_by": ["modules"] }, "snpeff/snpeff": { "branch": "master", - "git_sha": "214d575774c172062924ad3564b4f66655600730", + "git_sha": "3ad7292d9b8da881386e9d5b58364d7da489b38b", "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "somalier/extract": { @@ -185,9 +172,8 @@ }, "somalier/relate": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"], - "patch": "modules/nf-core/somalier/relate/somalier-relate.diff" + "git_sha": "d8ba32c6b54a01f8efa7b51a1f3978f003f8873b", + "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", @@ -201,7 +187,7 @@ }, "tabix/tabix": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", "installed_by": ["modules", "vcf_annotate_ensemblvep_snpeff"] }, "untar": { @@ -212,18 +198,16 @@ "vardictjava": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"], - "patch": "modules/nf-core/vardictjava/vardictjava.diff" + "installed_by": ["modules"] }, "vcf2db": { "branch": "master", - "git_sha": "527a80a28d9a54e5fd3626168ab72b063c11fbb2", - "installed_by": ["modules"], - "patch": "modules/nf-core/vcf2db/vcf2db.diff" + "git_sha": "233fa70811a03a4cecb2ece483b5c8396e2cee1d", + "installed_by": ["modules"] }, "vcfanno": { "branch": "master", - "git_sha": "b558cd24f8751dcda51f957391f5f9cb83e28586", + "git_sha": "9a8bba5910982ae637dedb8664e3121db77e173f", "installed_by": ["modules"] } } diff --git a/modules/nf-core/bcftools/concat/bcftools-concat.diff b/modules/nf-core/bcftools/concat/bcftools-concat.diff deleted file mode 100644 index 980df77a..00000000 --- a/modules/nf-core/bcftools/concat/bcftools-concat.diff +++ /dev/null @@ -1,40 +0,0 @@ -Changes in module 'nf-core/bcftools/concat' ---- modules/nf-core/bcftools/concat/main.nf -+++ modules/nf-core/bcftools/concat/main.nf -@@ -8,7 +8,7 @@ - 'biocontainers/bcftools:1.18--h8b25389_0' }" - - input: -- tuple val(meta), path(vcfs), path(tbi) -+ tuple val(meta), path(vcfs), path(tbis) - - output: - tuple val(meta), path("*.gz"), emit: vcf -@@ -19,8 +19,11 @@ - - script: - def args = task.ext.args ?: '' -- prefix = task.ext.prefix ?: "${meta.id}" -+ def prefix = task.ext.prefix ?: "${meta.id}" -+ def create_tbis = vcfs.collect { it.extension == 'gz' && !tbis ? " tabix ${it}" : "" } -+ - """ -+ ${create_tbis.join("\n")} - bcftools concat \\ - --output ${prefix}.vcf.gz \\ - $args \\ -@@ -34,8 +37,11 @@ - """ - - stub: -- prefix = task.ext.prefix ?: "${meta.id}" -+ def prefix = task.ext.prefix ?: "${meta.id}" -+ def create_tbis = vcfs.collect { it.extension == 'gz' && !tbis ? " touch ${it}.tbi" : "" } -+ - """ -+ ${create_tbis.join("\n")} - touch ${prefix}.vcf.gz - - cat <<-END_VERSIONS > versions.yml - -************************************************************ diff --git a/modules/nf-core/bcftools/concat/environment.yml b/modules/nf-core/bcftools/concat/environment.yml index ff0200df..6544e949 100644 --- a/modules/nf-core/bcftools/concat/environment.yml +++ b/modules/nf-core/bcftools/concat/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/concat/main.nf b/modules/nf-core/bcftools/concat/main.nf index eaefbe73..e2337eff 100644 --- a/modules/nf-core/bcftools/concat/main.nf +++ b/modules/nf-core/bcftools/concat/main.nf @@ -4,26 +4,25 @@ process BCFTOOLS_CONCAT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: - tuple val(meta), path(vcfs), path(tbis) + tuple val(meta), path(vcfs), path(tbi) output: - tuple val(meta), path("*.gz"), emit: vcf - path "versions.yml" , emit: versions + 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 when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def create_tbis = vcfs.collect { it.extension == 'gz' && !tbis ? " tabix ${it}" : "" } - + def prefix = task.ext.prefix ?: "${meta.id}" """ - ${create_tbis.join("\n")} bcftools concat \\ --output ${prefix}.vcf.gz \\ $args \\ @@ -37,12 +36,16 @@ process BCFTOOLS_CONCAT { """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" - def create_tbis = vcfs.collect { it.extension == 'gz' && !tbis ? " touch ${it}.tbi" : "" } - + def args = task.ext.args ?: '' + def 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" : + "" + def create_index = index.matches("csi|tbi") ? "touch ${prefix}.vcf.gz.${index}" : "" """ - ${create_tbis.join("\n")} - touch ${prefix}.vcf.gz + echo "" | gzip > ${prefix}.vcf.gz + ${create_index} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/concat/meta.yml b/modules/nf-core/bcftools/concat/meta.yml index 91cb54d5..eeeb2071 100644 --- a/modules/nf-core/bcftools/concat/meta.yml +++ b/modules/nf-core/bcftools/concat/meta.yml @@ -39,6 +39,14 @@ output: type: file description: VCF concatenated output file pattern: "*.{vcf.gz}" + - csi: + type: file + description: Default VCF file index + pattern: "*.csi" + - tbi: + type: file + description: Alternative VCF file index + pattern: "*.tbi" - versions: type: file description: File containing software versions diff --git a/modules/nf-core/bcftools/concat/tests/main.nf.test b/modules/nf-core/bcftools/concat/tests/main.nf.test index bf1a5f3f..cea386e3 100644 --- a/modules/nf-core/bcftools/concat/tests/main.nf.test +++ b/modules/nf-core/bcftools/concat/tests/main.nf.test @@ -9,22 +9,54 @@ nextflow_process { tag "bcftools" tag "bcftools/concat" - config "./nextflow.config" test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]") { + config "./nextflow.config" + when { process { """ - input[0] = [ + input[0] = [ [ id:'test3' ], // meta map [ - file(params.test_data['homo_sapiens']['illumina']['test_haplotc_cnn_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) ], [ - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_haplotc_cnn_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index") { + + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true) ] ] """ @@ -36,25 +68,33 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, process.out.versions - ).match() } + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } ) } } - test("sarscov2 - [[vcf1, vcf2], []]") { + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi") { + + config "./vcf_gz_index_csi.config" when { process { """ - input[0] = [ + input[0] = [ [ id:'test3' ], // meta map [ - file(params.test_data['homo_sapiens']['illumina']['test_haplotc_cnn_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) ], - [] + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true) + ] ] """ } @@ -65,28 +105,32 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, process.out.versions - ).match() } + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } ) } } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub") { + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi") { + + config "./vcf_gz_index_tbi.config" - options "-stub" when { process { """ - input[0] = [ + input[0] = [ [ id:'test3' ], // meta map [ - file(params.test_data['homo_sapiens']['illumina']['test_haplotc_cnn_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) ], [ - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_haplotc_cnn_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true) ] ] """ @@ -97,12 +141,176 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.vcf[0][1]).name, + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, process.out.versions - ).match() } + ).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + + + test("sarscov2 - [[vcf1, vcf2], []]") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) + ], + [] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } ) } } -} + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub") { + + config "./nextflow.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index - stub") { + + config "./vcf_gz_index.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi - stub") { + + config "./vcf_gz_index_csi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi - stub") { + + config "./vcf_gz_index_tbi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + + +} \ No newline at end of file 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 7344e6e3..1182854f 100644 --- a/modules/nf-core/bcftools/concat/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/concat/tests/main.nf.test.snap @@ -1,43 +1,395 @@ { + "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T08:09:13.734103412" + }, "sarscov2 - [[vcf1, vcf2], []]": { "content": [ + { + "0": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + "versions": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T15:19:09.213249578" + }, + "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], [ [ { "id": "test3" }, - "test3.vcf.gz:md5,4bcd0afd89f56c5d433f6b6abc44d0a6" + "test3_vcf.vcf.gz.csi" ] ], [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + + ], + [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" ] ], - "timestamp": "2023-11-29T13:52:27.03724666" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T08:08:23.981388325" + }, + "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T14:01:24.419027693" }, "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]": { "content": [ + { + "0": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + "versions": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T15:19:03.597061078" + }, + "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], [ [ { "id": "test3" }, - "test3.vcf.gz:md5,4bcd0afd89f56c5d433f6b6abc44d0a6" + "test3_vcf.vcf.gz.csi" ] ], [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + + ], + [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" ] ], - "timestamp": "2023-11-29T13:52:21.468988293" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T14:00:10.868487669" }, "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub": { "content": [ - "test3.vcf.gz", + { + "0": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T15:19:14.836256897" + }, + "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi": { + "content": [ [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + [ + + ], + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" ] ], - "timestamp": "2023-11-29T13:41:04.716017811" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T14:00:31.061411617" + }, + "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T14:01:35.209746508" } } \ No newline at end of file diff --git a/modules/nf-core/bcftools/concat/tests/vcf_gz_index.config b/modules/nf-core/bcftools/concat/tests/vcf_gz_index.config new file mode 100644 index 00000000..7dd696ee --- /dev/null +++ b/modules/nf-core/bcftools/concat/tests/vcf_gz_index.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index --no-version" +} diff --git a/modules/nf-core/bcftools/concat/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/concat/tests/vcf_gz_index_csi.config new file mode 100644 index 00000000..aebffb6f --- /dev/null +++ b/modules/nf-core/bcftools/concat/tests/vcf_gz_index_csi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=csi --no-version" +} diff --git a/modules/nf-core/bcftools/concat/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/concat/tests/vcf_gz_index_tbi.config new file mode 100644 index 00000000..b192ae7d --- /dev/null +++ b/modules/nf-core/bcftools/concat/tests/vcf_gz_index_tbi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=tbi --no-version" +} diff --git a/modules/nf-core/bcftools/pluginscatter/environment.yml b/modules/nf-core/bcftools/pluginscatter/environment.yml index 42e97daa..51bce4d3 100644 --- a/modules/nf-core/bcftools/pluginscatter/environment.yml +++ b/modules/nf-core/bcftools/pluginscatter/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/pluginscatter/main.nf b/modules/nf-core/bcftools/pluginscatter/main.nf index 9f52e947..b3b6691d 100644 --- a/modules/nf-core/bcftools/pluginscatter/main.nf +++ b/modules/nf-core/bcftools/pluginscatter/main.nf @@ -4,8 +4,8 @@ process BCFTOOLS_PLUGINSCATTER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: tuple val(meta), path(vcf), path(tbi) @@ -17,6 +17,8 @@ process BCFTOOLS_PLUGINSCATTER { output: tuple val(meta), path("*{vcf,vcf.gz,bcf,bcf.gz}") , emit: scatter + tuple val(meta), path("*.tbi") , emit: tbi, optional: true + tuple val(meta), path("*.csi") , emit: csi, optional: true path "versions.yml" , emit: versions when: @@ -57,11 +59,23 @@ process BCFTOOLS_PLUGINSCATTER { 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 create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" + def create_index_1 = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}0.${extension}.${index}" : "" + def create_index_2 = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}1.${extension}.${index}" : "" + def create_index_3 = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}2.${extension}.${index}" : "" """ - touch ${prefix}1.${extension} - touch ${prefix}2.${extension} - touch ${prefix}3.${extension} + ${create_cmd} ${prefix}0.${extension} + ${create_cmd} ${prefix}1.${extension} + ${create_cmd} ${prefix}2.${extension} + + ${create_index_1} + ${create_index_2} + ${create_index_3} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/pluginscatter/meta.yml b/modules/nf-core/bcftools/pluginscatter/meta.yml index 1a716ead..71805c03 100644 --- a/modules/nf-core/bcftools/pluginscatter/meta.yml +++ b/modules/nf-core/bcftools/pluginscatter/meta.yml @@ -66,6 +66,14 @@ output: type: file description: The resulting files of the scattering pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - csi: + type: file + description: Default VCF file index + pattern: "*.csi" + - tbi: + type: file + description: Alternative VCF file index + pattern: "*.tbi" authors: - "@nvnieuwk" maintainers: diff --git a/modules/nf-core/bcftools/pluginscatter/tests/main.nf.test b/modules/nf-core/bcftools/pluginscatter/tests/main.nf.test new file mode 100644 index 00000000..ce66336e --- /dev/null +++ b/modules/nf-core/bcftools/pluginscatter/tests/main.nf.test @@ -0,0 +1,415 @@ +nextflow_process { + + name "Test Process BCFTOOLS_PLUGINSCATTER" + script "../main.nf" + process "BCFTOOLS_PLUGINSCATTER" + + tag "modules" + tag "modules_nfcore" + tag "bcftools" + tag "bcftools/pluginscatter" + + test("homo_sapiens - sites per chunk") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = 100 + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() + } + ) + } + + } + + test("homo_sapiens - sites per chunk - vcf_gz_index") { + + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = 100 + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.csi.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match("vcf_gz_index") }, + { assert process.out.csi[0][1][0] =~ ".*/test_vcf0.vcf.gz.csi" } + ) + } + + } + + test("homo_sapiens - sites per chunk - vcf_gz_index_csi") { + + config "./vcf_gz_index_csi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = 100 + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.csi.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match("vcf_gz_index_csi") }, + { assert process.out.csi[0][1][0] =~ ".*/test_vcf0.vcf.gz.csi" } + ) + } + + } + + test("homo_sapiens - sites per chunk - vcf_gz_index_tbi") { + + config "./vcf_gz_index_tbi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = 100 + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.csi.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { meta, files -> files.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match("vcf_gz_index_tbi") }, + { assert process.out.tbi[0][1][0] =~ ".*/test_vcf0.vcf.gz.tbi" } + ) + } + + } + + test("homo_sapiens - scatter") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + input[2] = "chr21" + input[3] = [] + input[4] = [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + ] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() + } + ) + } + + } + + test("homo_sapiens - scatter file") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + input[2] = [] + input[3] = Channel.of("chr21:6000000-41743940\tfile1", "chr21:41743941-46661900\tfile2") + .collectFile(name:"scatter.tsv", newLine:true) + input[4] = [] + input[5] = [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() + } + ) + } + + } + + test("homo_sapiens - sites per chunk - stub") { + + config "./nextflow.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = 100 + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() + } + ) + } + + } + + test("homo_sapiens - scatter - stub") { + + config "./nextflow.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + input[2] = "chr21" + input[3] = [] + input[4] = [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + ] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() + } + ) + } + + } + + test("homo_sapiens - scatter file - stub") { + + config "./nextflow.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + input[2] = [] + input[3] = Channel.of("chr21:6000000-41743940\tfile1", "chr21:41743941-46661900\tfile2") + .collectFile(name:"scatter.tsv", newLine:true) + input[4] = [] + input[5] = [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() + } + ) + } + + } + + test("homo_sapiens - sites per chunk - vcf_gz_index - stub") { + + config "./vcf_gz_index.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = 100 + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1][0] =~ ".*/test_vcf0.vcf.gz.csi" } + ) + } + + } + + test("homo_sapiens - sites per chunk - vcf_gz_index_csi - stub") { + + config "./vcf_gz_index_csi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = 100 + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1][0] =~ ".*/test_vcf0.vcf.gz.csi" } + ) + } + + } + + test("homo_sapiens - sites per chunk - vcf_gz_index_tbi - stub") { + + config "./vcf_gz_index_tbi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = 100 + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.tbi[0][1][0] =~ ".*/test_vcf0.vcf.gz.tbi" } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/pluginscatter/tests/main.nf.test.snap b/modules/nf-core/bcftools/pluginscatter/tests/main.nf.test.snap new file mode 100644 index 00000000..3168f91b --- /dev/null +++ b/modules/nf-core/bcftools/pluginscatter/tests/main.nf.test.snap @@ -0,0 +1,623 @@ +{ + "homo_sapiens - scatter - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test0.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test1.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test2.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + + ], + "scatter": [ + [ + { + "id": "test" + }, + [ + "test0.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test1.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test2.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T15:09:19.199443051" + }, + "homo_sapiens - sites per chunk": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test0.vcf:md5,76902851e1f21970f1058b4bb85920d0", + "test1.vcf:md5,b9543cf27b400282ea8adff014059c4c", + "test2.vcf:md5,538495f9a2677643e41fb7a055fbb5fd", + "test3.vcf:md5,4d2bc1976824600842c95c3e65297ae1", + "test4.vcf:md5,698bf729950ef599a457c575fa28edc2", + "test5.vcf:md5,ef26c9040b1f1612dc2b6b4124781ab5", + "test6.vcf:md5,90267dd755c7e4b440ca4bac9e2a6151", + "test7.vcf:md5,695850092383eed031ba09b67afd7633" + ] + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + + ], + "scatter": [ + [ + { + "id": "test" + }, + [ + "test0.vcf:md5,76902851e1f21970f1058b4bb85920d0", + "test1.vcf:md5,b9543cf27b400282ea8adff014059c4c", + "test2.vcf:md5,538495f9a2677643e41fb7a055fbb5fd", + "test3.vcf:md5,4d2bc1976824600842c95c3e65297ae1", + "test4.vcf:md5,698bf729950ef599a457c575fa28edc2", + "test5.vcf:md5,ef26c9040b1f1612dc2b6b4124781ab5", + "test6.vcf:md5,90267dd755c7e4b440ca4bac9e2a6151", + "test7.vcf:md5,695850092383eed031ba09b67afd7633" + ] + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:39:46.012676995" + }, + "homo_sapiens - sites per chunk - vcf_gz_index_csi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf1.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf2.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf1.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf2.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf1.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf2.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "scatter": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf1.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf2.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T15:10:12.470969127" + }, + "homo_sapiens - scatter file": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "testfile1.vcf:md5,68e3660b6d619163692edad8ba7dd179", + "testfile2.vcf:md5,68e3660b6d619163692edad8ba7dd179" + ] + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + + ], + "scatter": [ + [ + { + "id": "test" + }, + [ + "testfile1.vcf:md5,68e3660b6d619163692edad8ba7dd179", + "testfile2.vcf:md5,68e3660b6d619163692edad8ba7dd179" + ] + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:40:25.33705743" + }, + "homo_sapiens - scatter file - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test0.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test1.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test2.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + + ], + "scatter": [ + [ + { + "id": "test" + }, + [ + "test0.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test1.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test2.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T15:09:41.478631999" + }, + "homo_sapiens - sites per chunk - vcf_gz_index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf1.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf2.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf1.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf2.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf1.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf2.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "scatter": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf1.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf2.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T15:09:59.976006697" + }, + "vcf_gz_index_tbi": { + "content": [ + [ + + ], + [ + + ], + [ + [ + "test_vcf0.vcf.gz.tbi", + "test_vcf1.vcf.gz.tbi", + "test_vcf2.vcf.gz.tbi", + "test_vcf3.vcf.gz.tbi", + "test_vcf4.vcf.gz.tbi", + "test_vcf5.vcf.gz.tbi", + "test_vcf6.vcf.gz.tbi", + "test_vcf7.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-06T10:27:48.127273006" + }, + "homo_sapiens - sites per chunk - vcf_gz_index_tbi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf1.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf2.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf1.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf2.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + + ], + "scatter": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf1.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_vcf2.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "tbi": [ + [ + { + "id": "test" + }, + [ + "test_vcf0.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf1.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e", + "test_vcf2.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T15:10:37.027506409" + }, + "vcf_gz_index": { + "content": [ + [ + + ], + [ + [ + "test_vcf0.vcf.gz.csi", + "test_vcf1.vcf.gz.csi", + "test_vcf2.vcf.gz.csi", + "test_vcf3.vcf.gz.csi", + "test_vcf4.vcf.gz.csi", + "test_vcf5.vcf.gz.csi", + "test_vcf6.vcf.gz.csi", + "test_vcf7.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-06T10:24:46.201810185" + }, + "vcf_gz_index_csi": { + "content": [ + [ + + ], + [ + [ + "test_vcf0.vcf.gz.csi", + "test_vcf1.vcf.gz.csi", + "test_vcf2.vcf.gz.csi", + "test_vcf3.vcf.gz.csi", + "test_vcf4.vcf.gz.csi", + "test_vcf5.vcf.gz.csi", + "test_vcf6.vcf.gz.csi", + "test_vcf7.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-06T10:27:20.636624541" + }, + "homo_sapiens - scatter": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "testchr21.vcf:md5,68e3660b6d619163692edad8ba7dd179" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + + ], + "scatter": [ + [ + { + "id": "test" + }, + "testchr21.vcf:md5,68e3660b6d619163692edad8ba7dd179" + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:40:12.621284696" + }, + "homo_sapiens - sites per chunk - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test0.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test1.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test2.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ], + "csi": [ + + ], + "scatter": [ + [ + { + "id": "test" + }, + [ + "test0.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test1.vcf:md5,d41d8cd98f00b204e9800998ecf8427e", + "test2.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,9a7bd26da80241e2116a237c7704eabf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T15:08:56.987822348" + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/pluginscatter/tests/nextflow.config b/modules/nf-core/bcftools/pluginscatter/tests/nextflow.config new file mode 100644 index 00000000..aa8d093b --- /dev/null +++ b/modules/nf-core/bcftools/pluginscatter/tests/nextflow.config @@ -0,0 +1,3 @@ +process { + ext.args = '--no-version' +} diff --git a/modules/nf-core/bcftools/pluginscatter/tests/tags.yml b/modules/nf-core/bcftools/pluginscatter/tests/tags.yml new file mode 100644 index 00000000..60cebd43 --- /dev/null +++ b/modules/nf-core/bcftools/pluginscatter/tests/tags.yml @@ -0,0 +1,2 @@ +bcftools/pluginscatter: + - "modules/nf-core/bcftools/pluginscatter/**" diff --git a/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index.config b/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index.config new file mode 100644 index 00000000..7dd696ee --- /dev/null +++ b/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index --no-version" +} diff --git a/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index_csi.config new file mode 100644 index 00000000..aebffb6f --- /dev/null +++ b/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index_csi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=csi --no-version" +} diff --git a/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index_tbi.config new file mode 100644 index 00000000..b192ae7d --- /dev/null +++ b/modules/nf-core/bcftools/pluginscatter/tests/vcf_gz_index_tbi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=tbi --no-version" +} diff --git a/modules/nf-core/bcftools/sort/environment.yml b/modules/nf-core/bcftools/sort/environment.yml index 89cf911d..2295ecfd 100644 --- a/modules/nf-core/bcftools/sort/environment.yml +++ b/modules/nf-core/bcftools/sort/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/sort/main.nf b/modules/nf-core/bcftools/sort/main.nf index c982944c..7d4c9b8e 100644 --- a/modules/nf-core/bcftools/sort/main.nf +++ b/modules/nf-core/bcftools/sort/main.nf @@ -4,15 +4,17 @@ process BCFTOOLS_SORT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: tuple val(meta), path(vcf) output: - tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.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 @@ -49,9 +51,16 @@ process BCFTOOLS_SORT { 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 create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" + def create_index = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index}" : "" """ - touch ${prefix}.${extension} + ${create_cmd} ${prefix}.${extension} + ${create_index} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/sort/meta.yml b/modules/nf-core/bcftools/sort/meta.yml index 84747c6d..dfbddcba 100644 --- a/modules/nf-core/bcftools/sort/meta.yml +++ b/modules/nf-core/bcftools/sort/meta.yml @@ -36,6 +36,14 @@ output: type: file description: Sorted VCF file pattern: "*.{vcf.gz}" + - csi: + type: file + description: Default VCF file index + pattern: "*.csi" + - tbi: + type: file + description: Alternative VCF file index + pattern: "*.tbi" authors: - "@Gwennid" maintainers: diff --git a/modules/nf-core/bcftools/sort/tests/main.nf.test b/modules/nf-core/bcftools/sort/tests/main.nf.test new file mode 100644 index 00000000..b9bdd76a --- /dev/null +++ b/modules/nf-core/bcftools/sort/tests/main.nf.test @@ -0,0 +1,222 @@ +nextflow_process { + + name "Test Process BCFTOOLS_SORT" + script "../main.nf" + process "BCFTOOLS_SORT" + + tag "modules" + tag "modules_nfcore" + tag "bcftools" + tag "bcftools/sort" + + test("sarscov2 - vcf") { + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("vcf") } + ) + } + + } + + test("sarscov2 - vcf_gz_index") { + + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - vcf_gz_index_csi") { + + config "./vcf_gz_index_csi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - vcf_gz_index_tbi") { + + config "./vcf_gz_index_tbi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + + test("sarscov2 - vcf - stub") { + options "-stub" + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - vcf_gz_index - stub") { + + config "./vcf_gz_index.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - vcf_gz_index_csi - stub") { + + config "./vcf_gz_index_csi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - vcf_gz_index_tbi - stub") { + + config "./vcf_gz_index_tbi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/sort/tests/main.nf.test.snap b/modules/nf-core/bcftools/sort/tests/main.nf.test.snap new file mode 100644 index 00000000..f38272cb --- /dev/null +++ b/modules/nf-core/bcftools/sort/tests/main.nf.test.snap @@ -0,0 +1,350 @@ +{ + "sarscov2 - vcf_gz_index_tbi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:06:05.201680777" + }, + "vcf": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "versions": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:04:43.889971134" + }, + "sarscov2 - vcf_gz_index": { + "content": [ + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:04:55.385964497" + }, + "sarscov2 - vcf_gz_index_csi": { + "content": [ + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:05:06.662818922" + }, + "sarscov2 - vcf_gz_index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ], + "csi": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:05:40.012912381" + }, + "sarscov2 - vcf_gz_index_csi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ], + "csi": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:05:52.405673587" + }, + "sarscov2 - vcf - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:05:29.117946461" + }, + "sarscov2 - vcf_gz_index_tbi": { + "content": [ + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + + ], + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:05:17.217274984" + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/sort/tests/tags.yml b/modules/nf-core/bcftools/sort/tests/tags.yml new file mode 100644 index 00000000..6e9520dd --- /dev/null +++ b/modules/nf-core/bcftools/sort/tests/tags.yml @@ -0,0 +1,2 @@ +bcftools/sort: + - "modules/nf-core/bcftools/sort/**" diff --git a/modules/nf-core/bcftools/sort/tests/vcf_gz_index.config b/modules/nf-core/bcftools/sort/tests/vcf_gz_index.config new file mode 100644 index 00000000..aacd1346 --- /dev/null +++ b/modules/nf-core/bcftools/sort/tests/vcf_gz_index.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index" +} diff --git a/modules/nf-core/bcftools/sort/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/sort/tests/vcf_gz_index_csi.config new file mode 100644 index 00000000..640eb0ba --- /dev/null +++ b/modules/nf-core/bcftools/sort/tests/vcf_gz_index_csi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=csi" +} diff --git a/modules/nf-core/bcftools/sort/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/sort/tests/vcf_gz_index_tbi.config new file mode 100644 index 00000000..589a50c6 --- /dev/null +++ b/modules/nf-core/bcftools/sort/tests/vcf_gz_index_tbi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=tbi" +} diff --git a/modules/nf-core/ensemblvep/vep/ensemblvep-vep.diff b/modules/nf-core/ensemblvep/vep/ensemblvep-vep.diff deleted file mode 100644 index 63309f0b..00000000 --- a/modules/nf-core/ensemblvep/vep/ensemblvep-vep.diff +++ /dev/null @@ -1,38 +0,0 @@ -Changes in module 'nf-core/ensemblvep/vep' ---- modules/nf-core/ensemblvep/vep/main.nf -+++ modules/nf-core/ensemblvep/vep/main.nf -@@ -2,10 +2,10 @@ - tag "$meta.id" - label 'process_medium' - -- conda "bioconda::ensembl-vep=109.3" -+ conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/ensembl-vep:109.3--pl5321h2a3209d_1' : -- 'biocontainers/ensembl-vep:109.3--pl5321h2a3209d_1' }" -+ 'https://depot.galaxyproject.org/singularity/ensembl-vep:105.0--pl5321h4a94de4_1' : -+ 'biocontainers/ensembl-vep:105.0--pl5321h4a94de4_1' }" - - input: - tuple val(meta), path(vcf), path(custom_extra_files) -@@ -48,7 +48,6 @@ - --fork $task.cpus \\ - --stats_file ${prefix}.summary.html \\ - -- - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ensemblvep: \$( echo \$(vep --help 2>&1) | sed 's/^.*Versions:.*ensembl-vep : //;s/ .*\$//') - ---- /dev/null -+++ modules/nf-core/ensemblvep/vep/environment.yml -@@ -0,0 +1,7 @@ -+name: ensemblvep_download -+channels: -+ - conda-forge -+ - bioconda -+ - defaults -+dependencies: -+ - bioconda::ensembl-vep=105.0 - -************************************************************ diff --git a/modules/nf-core/ensemblvep/vep/environment.yml b/modules/nf-core/ensemblvep/vep/environment.yml index adba76e8..3eae4fb1 100644 --- a/modules/nf-core/ensemblvep/vep/environment.yml +++ b/modules/nf-core/ensemblvep/vep/environment.yml @@ -1,7 +1,7 @@ -name: ensemblvep_download +name: ensemblvep_vep channels: - conda-forge - bioconda - defaults dependencies: - - bioconda::ensembl-vep=105.0 + - bioconda::ensembl-vep=112.0 diff --git a/modules/nf-core/ensemblvep/vep/main.nf b/modules/nf-core/ensemblvep/vep/main.nf index 65fbd53d..5f33265b 100644 --- a/modules/nf-core/ensemblvep/vep/main.nf +++ b/modules/nf-core/ensemblvep/vep/main.nf @@ -4,8 +4,8 @@ process ENSEMBLVEP_VEP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ensembl-vep:105.0--pl5321h4a94de4_1' : - 'biocontainers/ensembl-vep:105.0--pl5321h4a94de4_1' }" + 'https://depot.galaxyproject.org/singularity/ensembl-vep:112.0--pl5321h2a3209d_0' : + 'biocontainers/ensembl-vep:112.0--pl5321h2a3209d_0' }" input: tuple val(meta), path(vcf), path(custom_extra_files) @@ -20,7 +20,7 @@ process ENSEMBLVEP_VEP { tuple val(meta), path("*.vcf.gz") , optional:true, emit: vcf tuple val(meta), path("*.tab.gz") , optional:true, emit: tab tuple val(meta), path("*.json.gz") , optional:true, emit: json - path "*.summary.html" , emit: report + path "*.html" , optional:true, emit: report path "versions.yml" , emit: versions when: @@ -45,8 +45,8 @@ process ENSEMBLVEP_VEP { --cache \\ --cache_version $cache_version \\ --dir_cache $dir_cache \\ - --fork $task.cpus \\ - --stats_file ${prefix}.summary.html \\ + --fork $task.cpus + cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -57,10 +57,10 @@ process ENSEMBLVEP_VEP { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.vcf.gz - touch ${prefix}.tab.gz - touch ${prefix}.json.gz - touch ${prefix}.summary.html + echo "" | gzip > ${prefix}.vcf.gz + echo "" | gzip > ${prefix}.tab.gz + echo "" | gzip > ${prefix}.json.gz + touch ${prefix}_summary.html cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/ensemblvep/vep/meta.yml b/modules/nf-core/ensemblvep/vep/meta.yml index 7783847d..d8ff8d14 100644 --- a/modules/nf-core/ensemblvep/vep/meta.yml +++ b/modules/nf-core/ensemblvep/vep/meta.yml @@ -1,4 +1,4 @@ -name: ENSEMBLVEP_VEP +name: ensemblvep_vep description: Ensembl Variant Effect Predictor (VEP). The output-file-format is controlled through `task.ext.args`. keywords: - annotation @@ -86,3 +86,7 @@ authors: - "@maxulysse" - "@matthdsm" - "@nvnieuwk" +maintainers: + - "@maxulysse" + - "@matthdsm" + - "@nvnieuwk" diff --git a/modules/nf-core/ensemblvep/vep/tests/main.nf.test b/modules/nf-core/ensemblvep/vep/tests/main.nf.test new file mode 100644 index 00000000..e68fff3c --- /dev/null +++ b/modules/nf-core/ensemblvep/vep/tests/main.nf.test @@ -0,0 +1,114 @@ +nextflow_process { + + name "Test Process ENSEMBLVEP_VEP" + script "../main.nf" + process "ENSEMBLVEP_VEP" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "ensemblvep" + tag "ensemblvep/vep" + tag "ensemblvep/download" + + test("test_ensemblvep_vep_fasta_vcf") { + config "./vcf.config" + + setup { + run("ENSEMBLVEP_DOWNLOAD") { + script "../../download/main.nf" + + process { + """ + input[0] = Channel.of([ + [id:"112_WBcel235"], + params.vep_genome, + params.vep_species, + params.vep_cache_version + ]) + """ + } + } + } + + 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] = params.vep_genome + input[2] = params.vep_species + input[3] = params.vep_cache_version + input[4] = ENSEMBLVEP_DOWNLOAD.out.cache.map{ meta, cache -> [cache] } + input[5] = Channel.value([ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[6] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match() }, + { assert path(process.out.vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.2") } + ) + } + + } + + test("test_ensemblvep_vep_fasta_tab_gz") { + config "./tab.gz.config" + + setup { + run("ENSEMBLVEP_DOWNLOAD") { + script "../../download/main.nf" + + process { + """ + input[0] = Channel.of([ + [id:"112_WBcel235"], + params.vep_genome, + params.vep_species, + params.vep_cache_version + ]) + """ + } + } + } + + 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] = params.vep_genome + input[2] = params.vep_species + input[3] = params.vep_cache_version + input[4] = ENSEMBLVEP_DOWNLOAD.out.cache.map{ meta, cache -> [cache] } + input[5] = Channel.value([ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[6] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match() }, + { assert path(process.out.tab.get(0).get(1)).linesGzip.contains("## ENSEMBL VARIANT EFFECT PREDICTOR v112.0") } + ) + } + } +} diff --git a/modules/nf-core/ensemblvep/vep/tests/main.nf.test.snap b/modules/nf-core/ensemblvep/vep/tests/main.nf.test.snap new file mode 100644 index 00000000..1c4c0e4e --- /dev/null +++ b/modules/nf-core/ensemblvep/vep/tests/main.nf.test.snap @@ -0,0 +1,26 @@ +{ + "test_ensemblvep_vep_fasta_tab_gz": { + "content": [ + [ + "versions.yml:md5,d06f1eb60f534489026d682eb3aa5559" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-02T10:15:18.228927" + }, + "test_ensemblvep_vep_fasta_vcf": { + "content": [ + [ + "versions.yml:md5,d06f1eb60f534489026d682eb3aa5559" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-02T10:14:50.193861" + } +} \ No newline at end of file diff --git a/modules/nf-core/ensemblvep/vep/tests/nextflow.config b/modules/nf-core/ensemblvep/vep/tests/nextflow.config new file mode 100644 index 00000000..9aa48164 --- /dev/null +++ b/modules/nf-core/ensemblvep/vep/tests/nextflow.config @@ -0,0 +1,12 @@ +params { + vep_cache_version = "112" + vep_genome = "WBcel235" + vep_species = "caenorhabditis_elegans" +} + +process { + withName: ENSEMBLVEP_DOWNLOAD { + ext.args = '--AUTO c --CONVERT --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE' + ext.prefix = { "${params.vep_cache_version}_${params.vep_genome}" } + } +} diff --git a/modules/nf-core/ensemblvep/vep/tests/tab.gz.config b/modules/nf-core/ensemblvep/vep/tests/tab.gz.config new file mode 100644 index 00000000..40eb03e5 --- /dev/null +++ b/modules/nf-core/ensemblvep/vep/tests/tab.gz.config @@ -0,0 +1,5 @@ +process { + withName: ENSEMBLVEP_VEP { + ext.args = '--tab --compress_output bgzip' + } +} diff --git a/modules/nf-core/ensemblvep/vep/tests/tags.yml b/modules/nf-core/ensemblvep/vep/tests/tags.yml new file mode 100644 index 00000000..4aa4aa45 --- /dev/null +++ b/modules/nf-core/ensemblvep/vep/tests/tags.yml @@ -0,0 +1,2 @@ +ensemblvep/vep: + - "modules/nf-core/ensemblvep/vep/**" diff --git a/modules/nf-core/ensemblvep/vep/tests/vcf.config b/modules/nf-core/ensemblvep/vep/tests/vcf.config new file mode 100644 index 00000000..ad8955a3 --- /dev/null +++ b/modules/nf-core/ensemblvep/vep/tests/vcf.config @@ -0,0 +1,5 @@ +process { + withName: ENSEMBLVEP_VEP { + ext.args = '--vcf' + } +} diff --git a/modules/nf-core/happy/happy/environment.yml b/modules/nf-core/happy/happy/environment.yml deleted file mode 100644 index 3d29dcb2..00000000 --- a/modules/nf-core/happy/happy/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: happy_happy -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::hap.py=0.3.14 diff --git a/modules/nf-core/happy/happy/main.nf b/modules/nf-core/happy/happy/main.nf deleted file mode 100644 index b3cc12d5..00000000 --- a/modules/nf-core/happy/happy/main.nf +++ /dev/null @@ -1,84 +0,0 @@ -process HAPPY_HAPPY { - tag "$meta.id" - label 'process_medium' - - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': - 'biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" - - input: - tuple val(meta), path(query_vcf), path(truth_vcf), path(regions_bed), path(targets_bed) - tuple val(meta2), path(fasta) - tuple val(meta3), path(fasta_fai) - tuple val(meta4), path(false_positives_bed) - tuple val(meta5), path(stratification_tsv) - tuple val(meta6), path(stratification_beds) - - output: - tuple val(meta), path('*.summary.csv') , emit: summary_csv - tuple val(meta), path('*.roc.all.csv.gz') , emit: roc_all_csv - tuple val(meta), path('*.roc.Locations.INDEL.csv.gz') , emit: roc_indel_locations_csv - tuple val(meta), path('*.roc.Locations.INDEL.PASS.csv.gz') , emit: roc_indel_locations_pass_csv - tuple val(meta), path('*.roc.Locations.SNP.csv.gz') , emit: roc_snp_locations_csv - tuple val(meta), path('*.roc.Locations.SNP.PASS.csv.gz') , emit: roc_snp_locations_pass_csv - tuple val(meta), path('*.extended.csv') , emit: extended_csv - tuple val(meta), path('*.runinfo.json') , emit: runinfo - tuple val(meta), path('*.metrics.json.gz') , emit: metrics_json - tuple val(meta), path('*.vcf.gz') , emit: vcf, optional:true - tuple val(meta), path('*.tbi') , emit: tbi, 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}" - def regions = regions_bed ? "-R ${regions_bed}" : "" - def targets = targets_bed ? "-T ${targets_bed}" : "" - def false_positives = false_positives_bed ? "--false-positives ${false_positives_bed}" : "" - def stratification = stratification_tsv ? "--stratification ${stratification_tsv}" : "" - def VERSION = '0.3.14' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - """ - hap.py \\ - ${truth_vcf} \\ - ${query_vcf} \\ - ${args} \\ - --reference ${fasta} \\ - --threads ${task.cpus} \\ - ${regions} \\ - ${targets} \\ - ${false_positives} \\ - ${stratification} \\ - -o ${prefix} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - hap.py: $VERSION - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def VERSION = '0.3.14' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - """ - touch ${prefix}.summary.csv - touch ${prefix}.roc.all.csv.gz - touch ${prefix}.roc.Locations.INDEL.csv.gz - touch ${prefix}.roc.Locations.INDEL.PASS.csv.gz - touch ${prefix}.roc.Locations.SNP.csv.gz - touch ${prefix}.roc.Locations.SNP.PASS.csv.gz - touch ${prefix}.extended.csv - touch ${prefix}.runinfo.json - touch ${prefix}.metrics.json.gz - touch ${prefix}.vcf.gz - touch ${prefix}.vcf.gz.tbi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - hap.py: $VERSION - END_VERSIONS - """ -} diff --git a/modules/nf-core/happy/happy/meta.yml b/modules/nf-core/happy/happy/meta.yml deleted file mode 100644 index 85912cb5..00000000 --- a/modules/nf-core/happy/happy/meta.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: "happy_happy" -description: Hap.py is a tool to compare diploid genotypes at haplotype level. Rather than comparing VCF records row by row, hap.py will generate and match alternate sequences in a superlocus. A superlocus is a small region of the genome (sized between 1 and around 1000 bp) that contains one or more variants. -keywords: - - happy - - benchmark - - haplotype - - validation -tools: - - "happy": - description: "Haplotype VCF comparison tools" - homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" - documentation: "https://github.com/Illumina/hap.py" - tool_dev_url: "https://github.com/Illumina/hap.py" - licence: "['BSD-2-clause']" -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - query_vcf: - type: file - description: VCF/GVCF file to query - pattern: "*.{gvcf,vcf}.gz" - - truth_vcf: - type: file - description: gold standard VCF file - pattern: "*.{gvcf,vcf}.gz" - - regions_bed: - type: file - description: Sparse regions to restrict the analysis to - pattern: "*.bed" - - targets_bed: - type: file - description: Dense regions to restrict the analysis to - pattern: "*.bed" - - fasta: - type: file - description: FASTA file of the reference genome - pattern: "*.{fa,fasta}" - - fasta_fai: - type: file - description: The index of the reference FASTA - pattern: "*.fai" - - false_positives_bed: - type: file - description: False positive / confident call regions. Calls outside these regions will be labelled as UNK. - pattern: "*.{bed,bed.gz}" - - stratification_tsv: - type: file - description: Stratification file list in TSV format - pattern: "*.tsv" - - stratification_beds: - type: file(s) - description: One or more BED files used for stratification (these should be referenced in the stratification TSV) - pattern: "*.bed" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - summary_csv: - type: file - description: A CSV file containing the summary of the benchmarking - pattern: "*.summary.csv" - - roc_all_csv: - type: file - description: A CSV file containing ROC values for all variants - pattern: "*.roc.all.csv.gz" - - roc_indel_locations_csv: - type: file - description: A CSV file containing ROC values for all indels - pattern: "*.roc.Locations.INDEL.csv.gz" - - roc_indel_locations_pass_csv: - type: file - description: A CSV file containing ROC values for all indels that passed all filters - pattern: "*.roc.Locations.INDEL.PASS.csv.gz" - - roc_snp_locations_csv: - type: file - description: A CSV file containing ROC values for all SNPs - pattern: "*.roc.Locations.SNP.csv.gz" - - roc_snp_locations_pass_csv: - type: file - description: A CSV file containing ROC values for all SNPs that passed all filters - pattern: "*.roc.Locations.SNP.PASS.csv.gz" - - extended_csv: - type: file - description: A CSV file containing extended info of the benchmarking - pattern: "*.extended.csv" - - json: - type: file - description: A JSON file containing the run info - pattern: "*.runinfo.json" - - runinfo: - type: file - description: A JSON file containing the benchmarking metrics - pattern: "*.metrics.json.gz" - - vcf: - type: file - description: An annotated VCF - pattern: "*.vcf.gz" - - tbi: - type: file - description: The index of the annotated VCF - pattern: "*.tbi" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@nvnieuwk" -maintainers: - - "@nvnieuwk" diff --git a/modules/nf-core/snpeff/snpeff/main.nf b/modules/nf-core/snpeff/snpeff/main.nf index cc4f2ccb..28d13826 100644 --- a/modules/nf-core/snpeff/snpeff/main.nf +++ b/modules/nf-core/snpeff/snpeff/main.nf @@ -13,11 +13,11 @@ process SNPEFF_SNPEFF { tuple val(meta2), path(cache) output: - tuple val(meta), path("*.ann.vcf"), emit: vcf - path "*.csv" , emit: report - path "*.html" , emit: summary_html - path "*.genes.txt" , emit: genes_txt - path "versions.yml" , emit: versions + tuple val(meta), path("*.ann.vcf"), emit: vcf + tuple val(meta), path("*.csv"), emit: report + tuple val(meta), path("*.html"), emit: summary_html + tuple val(meta), path("*.genes.txt"), emit: genes_txt + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/snpeff/snpeff/tests/main.nf.test b/modules/nf-core/snpeff/snpeff/tests/main.nf.test new file mode 100644 index 00000000..803ff02c --- /dev/null +++ b/modules/nf-core/snpeff/snpeff/tests/main.nf.test @@ -0,0 +1,51 @@ +nextflow_process { + + name "Test Process SNPEFF_SNPEFF" + script "../main.nf" + process "SNPEFF_SNPEFF" + config "./nextflow.config" + tag "modules" + tag "modules_nfcore" + tag "modules_snpeff" + tag "snpeff" + tag "snpeff/download" + tag "snpeff/snpeff" + + test("test_SNPEFF_SNPEFF") { + + setup { + run("SNPEFF_DOWNLOAD") { + script "../../download/main.nf" + process { + """ + input[0] = Channel.of([[id:params.snpeff_genome + '.' + params.snpeff_cache_version], params.snpeff_genome, params.snpeff_cache_version]) + """ + } + } + } + + 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] = params.snpeff_genome + '.' + params.snpeff_cache_version + input[2] = SNPEFF_DOWNLOAD.out.cache + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.report[0][1]).exists() }, + { assert path(process.out.summary_html[0][1]).exists() }, + { assert path(process.out.vcf[0][1]).exists() }, + { assert snapshot(process.out.genes_txt).match("genes_txt") }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + } +} diff --git a/modules/nf-core/snpeff/snpeff/tests/main.nf.test.snap b/modules/nf-core/snpeff/snpeff/tests/main.nf.test.snap new file mode 100644 index 00000000..0891b844 --- /dev/null +++ b/modules/nf-core/snpeff/snpeff/tests/main.nf.test.snap @@ -0,0 +1,31 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,25d44a118d558b331d51ec00be0d997c" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.02.0" + }, + "timestamp": "2024-03-18T17:37:18.879477" + }, + "genes_txt": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.genes.txt:md5,130536bf0237d7f3f746d32aaa32840a" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.02.0" + }, + "timestamp": "2024-03-18T17:37:18.874822" + } +} \ No newline at end of file diff --git a/modules/nf-core/snpeff/snpeff/tests/nextflow.config b/modules/nf-core/snpeff/snpeff/tests/nextflow.config new file mode 100644 index 00000000..d31ebf6b --- /dev/null +++ b/modules/nf-core/snpeff/snpeff/tests/nextflow.config @@ -0,0 +1,4 @@ +params { + snpeff_cache_version = "105" + snpeff_genome = "WBcel235" +} diff --git a/modules/nf-core/snpeff/snpeff/tests/tags.yml b/modules/nf-core/snpeff/snpeff/tests/tags.yml new file mode 100644 index 00000000..427b588d --- /dev/null +++ b/modules/nf-core/snpeff/snpeff/tests/tags.yml @@ -0,0 +1,2 @@ +snpeff/snpeff: + - "modules/nf-core/snpeff/snpeff/**" diff --git a/modules/nf-core/tabix/tabix/environment.yml b/modules/nf-core/tabix/tabix/environment.yml index 7167fb87..4d1f9dd4 100644 --- a/modules/nf-core/tabix/tabix/environment.yml +++ b/modules/nf-core/tabix/tabix/environment.yml @@ -1,7 +1,10 @@ name: tabix_tabix + channels: - conda-forge - bioconda - defaults + dependencies: + - bioconda::htslib=1.20 - bioconda::tabix=1.11 diff --git a/modules/nf-core/tabix/tabix/main.nf b/modules/nf-core/tabix/tabix/main.nf index c304a8a3..13acd670 100644 --- a/modules/nf-core/tabix/tabix/main.nf +++ b/modules/nf-core/tabix/tabix/main.nf @@ -4,8 +4,8 @@ process TABIX_TABIX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0' : - 'biocontainers/tabix:1.11--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' : + 'biocontainers/htslib:1.20--h5efdd21_2' }" input: tuple val(meta), path(tab) @@ -21,7 +21,10 @@ process TABIX_TABIX { script: def args = task.ext.args ?: '' """ - tabix $args $tab + tabix \\ + --threads $task.cpus \\ + $args \\ + $tab cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -30,11 +33,11 @@ process TABIX_TABIX { """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${tab}.tbi - cat <<-END_VERSIONS > versions.yml + touch ${tab}.csi + cat <<-END_VERSIONS > versions.yml "${task.process}": tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS diff --git a/modules/nf-core/tabix/tabix/tests/main.nf.test b/modules/nf-core/tabix/tabix/tests/main.nf.test new file mode 100644 index 00000000..102b0d7b --- /dev/null +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test @@ -0,0 +1,136 @@ +nextflow_process { + + name "Test Process TABIX_TABIX" + script "modules/nf-core/tabix/tabix/main.nf" + process "TABIX_TABIX" + + tag "modules" + tag "modules_nfcore" + tag "tabix" + tag "tabix/tabix" + + test("sarscov2_bedgz_tbi") { + config "./tabix_bed.config" + when { + process { + """ + input[0] = [ + [ id:'tbi_bed' ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed.gz', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out, + file(process.out.tbi[0][1]).name + ).match() } + ) + } + } + + test("sarscov2_gff_tbi") { + config "./tabix_gff.config" + when { + process { + """ + input[0] = [ + [ id:'tbi_gff' ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out, + file(process.out.tbi[0][1]).name).match() } + ) + } + + } + + test("sarscov2_vcf_tbi") { + config "./tabix_vcf_tbi.config" + when { + process { + """ + input[0] = [ + [ id:'tbi_vcf' ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out, + file(process.out.tbi[0][1]).name + ).match() } + ) + } + + } + + test("sarscov2_vcf_csi") { + config "./tabix_vcf_csi.config" + when { + process { + """ + input[0] = [ + [ id:'vcf_csi' ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out, + file(process.out.csi[0][1]).name + ).match() } + ) + } + + } + + test("sarscov2_vcf_csi_stub") { + config "./tabix_vcf_csi.config" + options "-stub" + when { + process { + """ + input[0] = [ + [ id:'vcf_csi_stub' ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out, + file(process.out.csi[0][1]).name + ).match() } + ) + } + + } + +} diff --git a/modules/nf-core/tabix/tabix/tests/main.nf.test.snap b/modules/nf-core/tabix/tabix/tests/main.nf.test.snap new file mode 100644 index 00000000..c2b9ed0b --- /dev/null +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test.snap @@ -0,0 +1,212 @@ +{ + "sarscov2_gff_tbi": { + "content": [ + { + "0": [ + [ + { + "id": "tbi_gff" + }, + "genome.gff3.gz.tbi:md5,f79a67d95a98076e04fbe0455d825926" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "tbi_gff" + }, + "genome.gff3.gz.tbi:md5,f79a67d95a98076e04fbe0455d825926" + ] + ], + "versions": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ] + }, + "genome.gff3.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:25.653807564" + }, + "sarscov2_bedgz_tbi": { + "content": [ + { + "0": [ + [ + { + "id": "tbi_bed" + }, + "test.bed.gz.tbi:md5,9a761d51cc81835fd1199201fdbcdd5d" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "tbi_bed" + }, + "test.bed.gz.tbi:md5,9a761d51cc81835fd1199201fdbcdd5d" + ] + ], + "versions": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ] + }, + "test.bed.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:09.754082161" + }, + "sarscov2_vcf_tbi": { + "content": [ + { + "0": [ + [ + { + "id": "tbi_vcf" + }, + "test.vcf.gz.tbi:md5,d22e5b84e4fcd18792179f72e6da702e" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "tbi_vcf" + }, + "test.vcf.gz.tbi:md5,d22e5b84e4fcd18792179f72e6da702e" + ] + ], + "versions": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ] + }, + "test.vcf.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:40.042648294" + }, + "sarscov2_vcf_csi_stub": { + "content": [ + { + "0": [ + [ + { + "id": "vcf_csi_stub" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "vcf_csi_stub" + }, + "test.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ], + "csi": [ + [ + { + "id": "vcf_csi_stub" + }, + "test.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + [ + { + "id": "vcf_csi_stub" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ] + }, + "test.vcf.gz.csi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:07:08.700367261" + }, + "sarscov2_vcf_csi": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "vcf_csi" + }, + "test.vcf.gz.csi:md5,04b41c1efd9ab3c6b1e008a286e27d2b" + ] + ], + "2": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ], + "csi": [ + [ + { + "id": "vcf_csi" + }, + "test.vcf.gz.csi:md5,04b41c1efd9ab3c6b1e008a286e27d2b" + ] + ], + "tbi": [ + + ], + "versions": [ + "versions.yml:md5,07064637fb8a217174052be8e40234e2" + ] + }, + "test.vcf.gz.csi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:55.362067748" + } +} \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/tests/tabix_bed.config b/modules/nf-core/tabix/tabix/tests/tabix_bed.config new file mode 100644 index 00000000..7ff05905 --- /dev/null +++ b/modules/nf-core/tabix/tabix/tests/tabix_bed.config @@ -0,0 +1,5 @@ +process { + withName: TABIX_TABIX { + ext.args = '-p bed' + } +} \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/tests/tabix_gff.config b/modules/nf-core/tabix/tabix/tests/tabix_gff.config new file mode 100644 index 00000000..20c0a1e3 --- /dev/null +++ b/modules/nf-core/tabix/tabix/tests/tabix_gff.config @@ -0,0 +1,5 @@ +process { + withName: TABIX_TABIX { + ext.args = '-p gff' + } +} \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/tests/tabix_vcf_csi.config b/modules/nf-core/tabix/tabix/tests/tabix_vcf_csi.config new file mode 100644 index 00000000..eb4f2d7e --- /dev/null +++ b/modules/nf-core/tabix/tabix/tests/tabix_vcf_csi.config @@ -0,0 +1,5 @@ +process { + withName: TABIX_TABIX { + ext.args = '-p vcf --csi' + } +} diff --git a/modules/nf-core/tabix/tabix/tests/tabix_vcf_tbi.config b/modules/nf-core/tabix/tabix/tests/tabix_vcf_tbi.config new file mode 100644 index 00000000..2774c8a9 --- /dev/null +++ b/modules/nf-core/tabix/tabix/tests/tabix_vcf_tbi.config @@ -0,0 +1,5 @@ +process { + withName: TABIX_TABIX { + ext.args = '-p vcf' + } +} \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/tests/tags.yml b/modules/nf-core/tabix/tabix/tests/tags.yml new file mode 100644 index 00000000..6eda0653 --- /dev/null +++ b/modules/nf-core/tabix/tabix/tests/tags.yml @@ -0,0 +1,2 @@ +tabix/tabix: + - "modules/nf-core/tabix/tabix/**" diff --git a/modules/nf-core/vcf2db/vcf2db.diff b/modules/nf-core/vcf2db/vcf2db.diff deleted file mode 100644 index 00fc493f..00000000 --- a/modules/nf-core/vcf2db/vcf2db.diff +++ /dev/null @@ -1,143 +0,0 @@ -Changes in module 'nf-core/vcf2db' ---- modules/nf-core/vcf2db/main.nf -+++ modules/nf-core/vcf2db/main.nf -@@ -4,9 +4,7 @@ - - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - conda "${moduleDir}/environment.yml" -- container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/vcf2db:2020.02.24--pl5321hdfd78af_3': -- 'biocontainers/vcf2db:2020.02.24--pl5321hdfd78af_3' }" -+ container "cmgg/vcf2db:2020.02.24" - - input: - tuple val(meta), path(vcf), path(ped) -@@ -29,6 +27,12 @@ - ${prefix}.db \\ - $args - -+ sqlite3 ${prefix}.db 'CREATE INDEX idx_variant_impacts_id ON variant_impacts (variant_id)' && \\ -+ sqlite3 ${prefix}.db 'ALTER TABLE variants ADD COLUMN tags varchar(255)' && \\ -+ sqlite3 ${prefix}.db 'ALTER TABLE variants ADD COLUMN tags_user varchar(255)' && \\ -+ sqlite3 ${prefix}.db 'ALTER TABLE variants ADD COLUMN notes varchar(255)' && \\ -+ sqlite3 ${prefix}.db 'ALTER TABLE variants ADD COLUMN notes_user varchar(255)' -+ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - vcf2db: $VERSION - ---- /dev/null -+++ modules/nf-core/vcf2db/vcf2db_env.yaml -@@ -0,0 +1,96 @@ -+name: base -+channels: -+ - conda-forge -+ - bioconda -+ - defaults -+dependencies: -+ - _libgcc_mutex=0.1=conda_forge -+ - _openmp_mutex=4.5=1_llvm -+ - backports=1.0=py27_1 -+ - backports.functools_lru_cache=1.6.1=pyhd3eb1b0_0 -+ - backports.shutil_get_terminal_size=1.0.0=py27_2 -+ - backports_abc=0.5=py27_0 -+ - backports.functools_lru_cache=1.6.1=pyhd3eb1b0_0 -+ - backports_abc=0.5=py27_0 -+ - blas=2.17=openblas -+ - bzip2=1.0.8=h516909a_3 -+ - c-ares=1.17.1=h36c2ea0_0 -+ - ca-certificates=2020.11.8=ha878542_0 -+ - certifi=2016.9.26=py27_0 -+ - click=7.1.2=pyh9f0ad1d_0 -+ - coloredlogs=14.0=py27h8c360ce_1 -+ - cycler=0.10.0=py27_0 -+ - cyvcf2=0.20.9=py27h22a6d1c_0 -+ - decorator=4.4.2=py_0 -+ - freetype=2.10.4=he06d7ca_0 -+ - functools32=3.2.3.2=py27_2 -+ - futures=3.3.0=py27h8c360ce_1 -+ - geneimpacts=0.3.7=py27_0 -+ - htslib=1.10.2=hd3b49d5_1 -+ - humanfriendly=8.1=py27h8c360ce_1 -+ - icu=58.2=hf484d3e_1000 -+ - kiwisolver=1.1.0=py27h9e3301b_1 -+ - krb5=1.17.2=h926e7f8_0 -+ - libblas=3.8.0=17_openblas -+ - libcblas=3.8.0=17_openblas -+ - libcurl=7.71.1=hcdd3856_8 -+ - libdeflate=1.6=h516909a_0 -+ - libedit=3.1.20191231=he28a2e2_2 -+ - libev=4.33=h516909a_1 -+ - libffi=3.3=he6710b0_2 -+ - libgcc-ng=9.3.0=h5dbcf3e_17 -+ - libgfortran-ng=7.5.0=hae1eefd_17 -+ - libgfortran4=7.5.0=hae1eefd_17 -+ - liblapack=3.8.0=17_openblas -+ - liblapacke=3.8.0=17_openblas -+ - liblapacke=3.8.0=17_openblas -+ - libnghttp2=1.41.0=hf8bcb03_2 -+ - libopenblas=0.3.10=pthreads_hb3c22a3_5 -+ - libpng=1.6.37=hed695b0_2 -+ - libssh2=1.9.0=hab1572f_5 -+ - libstdcxx-ng=9.3.0=h2ae2ef3_17 -+ - llvm-openmp=11.0.0=hfc4b9b4_1 -+ - matplotlib-base=2.2.4=py27hfd891ef_0 -+ - monotonic=1.5=py_0 -+ - ncurses=6.2=h58526e2_4 -+ - networkx=2.2=py27_1 -+ - nomkl=3.0=0 -+ - numpy=1.16.6=py27h30dfecb_0 -+ - numpy-base=1.16.6=py27h2f8d375_0 -+ - numpy-base=1.16.6=py27h2f8d375_0 -+ - openssl=1.1.1h=h516909a_0 -+ - pandas=0.24.2=py27hf484d3e_0 -+ - pathlib2=2.3.5=py27h8c360ce_1 -+ - patsy=0.5.1=py27_0 -+ - peddy=0.4.7=pyh864c0ab_0 -+ - pip=20.1.1=pyh9f0ad1d_0 -+ - pyparsing=2.4.7=pyh9f0ad1d_0 -+ - python=2.7.18=h15b4118_1 -+ - python-dateutil=2.8.1=py_0 -+ - python-lzo=1.12=py27h42e1302_1001 -+ - python-snappy=0.5.4=py27hee44bf9_1 -+ - python_abi=2.7=1_cp27mu -+ - python-dateutil=2.8.1=py_0 -+ - python-snappy=0.5.4=py27hee44bf9_1 -+ - python_abi=2.7=1_cp27mu -+ - pytz=2020.1=pyh9f0ad1d_0 -+ - readline=8.0=he28a2e2_2 -+ - scandir=1.10.0=py27hdf8410d_1 -+ - scikit-learn=0.20.3=py27ha8026db_1 -+ - scipy=1.2.1=py27h921218d_2 -+ - seaborn=0.9.0=py27_0 -+ - setuptools=44.0.0=py27_0 -+ - singledispatch=3.4.0.3=py27_1000 -+ - six=1.15.0=pyh9f0ad1d_0 -+ - snappy=1.1.8=he1b5a44_3 -+ - sqlalchemy=1.3.15=py27hdf8410d_1 -+ - sqlite=3.33.0=h4cf870e_1 -+ - statsmodels=0.10.2=py27hc1659b7_0 -+ - subprocess32=3.5.4=py27h516909a_0 -+ - tk=8.6.10=hed695b0_1 -+ - toolshed=0.4.6=py27_0 -+ - tornado=5.1.1=py27h14c3975_1000 -+ - wheel=0.35.1=pyh9f0ad1d_0 -+ - xz=5.2.5=h516909a_1 -+ - zlib=1.2.11=h516909a_1010 -+ - zstd=1.4.5=h6597ccf_2 - ---- /dev/null -+++ modules/nf-core/vcf2db/Dockerfile -@@ -0,0 +1,11 @@ -+FROM mambaorg/micromamba:1.4-focal -+ -+COPY ./vcf2db_env.yaml . -+ -+RUN micromamba update --file ./vcf2db_env.yaml --yes -+RUN micromamba install --yes --name base --no-deps -c bioconda vcf2db==2020.02.24 -+RUN micromamba install --yes --name base --no-deps -c conda-forge coreutils -+RUN micromamba clean --all --yes -+ -+ARG MAMBA_DOCKERFILE_ACTIVATE=1 -+ENV PATH "$MAMBA_ROOT_PREFIX/bin:$PATH" -************************************************************ From 58e75ef92371a039447390213894d55f1d4d8f40 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 Sep 2024 17:52:19 +0200 Subject: [PATCH 02/28] resolve all non module linting issues --- .github/workflows/linting.yml | 14 +- .github/workflows/linting_comment.yml | 2 +- .nf-core.yml | 48 +++-- README.md | 2 +- conf/test_full.config | 4 +- main.nf | 2 +- nextflow.config | 3 +- nextflow_schema.json | 10 +- .../local/vcf_validate_small_variants/main.nf | 171 +++++++----------- workflows/germline.nf | 6 +- 10 files changed, 111 insertions(+), 151 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 49fb4340..7d4ad177 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,6 +1,6 @@ name: nf-core linting # This workflow is triggered on pushes and PRs to the repository. -# It runs the `nf-core lint` and markdown lint tests to ensure +# It runs the `nf-core pipelines lint` and markdown lint tests to ensure # that the code meets the nf-core guidelines. on: push: @@ -41,17 +41,23 @@ jobs: python-version: "3.12" architecture: "x64" + - name: read .nf-core.yml + uses: pietrobolcato/action-read-yaml@1.0.0 + id: read_yml + with: + config: ${{ github.workspace }}/.nf-core.yaml + - name: Install dependencies run: | python -m pip install --upgrade pip - pip install git+https://github.com/nf-core/tools@dev + pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} - - name: Run nf-core lint + - name: Run nf-core pipelines lint env: GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} - run: nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md + run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md - name: Save PR number if: ${{ always() }} diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index 40acc23f..42e519bf 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download lint results - uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3 + uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6 with: workflow: linting.yml workflow_conclusion: completed diff --git a/.nf-core.yml b/.nf-core.yml index 70105d4f..7c0e227a 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,22 +1,34 @@ lint: - files_exist: - - CODE_OF_CONDUCT.md - - assets/nf-core-germline_logo_light.png - - docs/images/nf-core-germline_logo_light.png - - docs/images/nf-core-germline_logo_dark.png - - .github/ISSUE_TEMPLATE/config.yml - - .github/workflows/awstest.yml - - .github/workflows/awsfulltest.yml - - docs/README.md - files_unchanged: - - CODE_OF_CONDUCT.md - - assets/nf-core-germline_logo_light.png - - docs/images/nf-core-germline_logo_light.png - - docs/images/nf-core-germline_logo_dark.png - - .github/ISSUE_TEMPLATE/bug_report.yml - nextflow_config: - - "custom_config" -nf_core_version: 2.14.1 + files_exist: + - "CODE_OF_CONDUCT.md" + - "assets/nf-core-germline_logo_light.png" + - "docs/images/nf-core-germline_logo_light.png" + - "docs/images/nf-core-germline_logo_dark.png" + - ".github/ISSUE_TEMPLATE/config.yml" + - ".github/workflows/awstest.yml" + - ".github/workflows/awsfulltest.yml" + - "docs/README.md" + files_unchanged: + - ".github/CONTRIBUTING.md" + - ".github/PULL_REQUEST_TEMPLATE.md" + - ".github/workflows/linting_comment.yml" + - ".github/linting.yml" + - "CODE_OF_CONDUCT.md" + - ".github/ISSUE_TEMPLATE/bug_report.yml" + - ".prettierignore" + nextflow_config: + - "custom_config" # TODO Remove this once the new methods are supported + - "manifest.name" + - "manifest.homePage" + - "params.genomes" + - "validation.help.beforeText" + - "validation.help.afterText" + - "validation.summary.beforeText" + - "validation.summary.afterText" + multiqc_config: + - "report_comment" + actions_ci: false # TODO readd this once the linting doesn't act up +nf_core_version: 3.0.0dev repository_type: pipeline template: author: nvnieuwk diff --git a/README.md b/README.md index ed28ef68..bd133931 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![GitHub Actions Linting Status](https://github.com/nf-cmgg/germline/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/germline/actions/workflows/linting.yml) [![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) -[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/) +[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.0-23aa62.svg)](https://www.nextflow.io/) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) [![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) [![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) diff --git a/conf/test_full.config b/conf/test_full.config index 9943a39d..37b1a6c0 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -15,9 +15,7 @@ params { config_profile_description = 'Full test dataset to check pipeline function' // Input data for full size test - // TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA) - // TODO nf-core: Give any required params for the test so that command line flags are not needed - input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' + // input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' // Genome references genome = 'R64-1-1' diff --git a/main.nf b/main.nf index b64b8d83..988afc56 100644 --- a/main.nf +++ b/main.nf @@ -194,7 +194,7 @@ workflow { def multiqc_logo = params.multiqc_logo ?: "$projectDir/assets/CMGG_logo.png" - + print(params.genomes) // // SUBWORKFLOW: Run initialisation tasks // diff --git a/nextflow.config b/nextflow.config index 12e7effa..46e627fa 100644 --- a/nextflow.config +++ b/nextflow.config @@ -78,9 +78,8 @@ params { // References cmgg_config_base = "/conf/" igenomes_base = null //'s3://ngi-igenomes/igenomes' - igenomes_ignore = true + igenomes_ignore = false genome = "GRCh38" - genomes = [:] genomes_base = "/references/" genomes_ignore = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 34ed7abd..0fc6f59f 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/nf-cmgg/germline/master/nextflow_schema.json", "title": "nf-cmgg/germline pipeline parameters", - "description": "A nextflow pipeline for calling and annotating variants", + "description": "A nextflow pipeline for calling and annotating small germline variants from short DNA reads for WES and WGS data", "type": "object", "$defs": { "input_output_options": { @@ -126,13 +126,7 @@ "description": "Do not load the iGenomes reference config.", "fa_icon": "fas fa-ban", "hidden": true, - "help_text": "Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`.", - "default": true - }, - "genomes": { - "type": "object", - "description": "A map structure containing the paths to all genome references", - "hidden": true + "help_text": "Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`." } }, "required": ["fasta"] diff --git a/subworkflows/local/vcf_validate_small_variants/main.nf b/subworkflows/local/vcf_validate_small_variants/main.nf index 71432d38..eaa17579 100644 --- a/subworkflows/local/vcf_validate_small_variants/main.nf +++ b/subworkflows/local/vcf_validate_small_variants/main.nf @@ -1,6 +1,5 @@ include { RTGTOOLS_VCFEVAL } from '../../../modules/nf-core/rtgtools/vcfeval/main' include { RTGTOOLS_ROCPLOT } from '../../../modules/nf-core/rtgtools/rocplot/main' -include { HAPPY_HAPPY } from '../../../modules/nf-core/happy/happy/main' workflow VCF_VALIDATE_SMALL_VARIANTS { @@ -10,10 +9,6 @@ workflow VCF_VALIDATE_SMALL_VARIANTS { ch_fasta // [happy only] channel: [ meta, fasta ] ch_fasta_fai // [happy only] channel: [ meta, fasta_fai ] ch_vcfeval_sdf // [vcfeval only] channel: [ meta, sdf ] - ch_happy_false_positive_regions // [optional] channel: [ meta, false_positives_bed ] - ch_happy_stratification_tsv // [optional] channel: [ meta, stratification_tsv ] - ch_happy_stratification_beds // [optional] channel: [ meta, [stratification_beds] ] - tools // [mandatory] value: A comma-delimited list of the tools to use for validation (happy,vcfeval,jaccard) main: @@ -51,116 +46,76 @@ workflow VCF_VALIDATE_SMALL_VARIANTS { rtgtools_non_snp_svg_rocplot = Channel.empty() rtgtools_weighted_svg_rocplot = Channel.empty() - val_list_tools = tools.tokenize(",") - ch_input = ch_vcf.join(ch_beds, failOnDuplicate: true, failOnMismatch: true) - if("happy" in val_list_tools){ - ch_happy_input = ch_input - .map { meta, vcf, tbi, truth_vcf, truth_tbi, regions_bed, targets_bed -> - [ meta, vcf, truth_vcf, regions_bed, targets_bed ] + RTGTOOLS_VCFEVAL( + ch_input, + ch_vcfeval_sdf + ) + ch_versions = ch_versions.mix(RTGTOOLS_VCFEVAL.out.versions.first()) + + ch_rocplot_input = RTGTOOLS_VCFEVAL.out.snp_roc + .map { meta, tsv -> + [ meta + [roc_type:'snp'], tsv ] + } + .mix( + RTGTOOLS_VCFEVAL.out.non_snp_roc.map { meta, tsv -> + [ meta + [roc_type:'non_snp'], tsv ] + }, + RTGTOOLS_VCFEVAL.out.weighted_roc.map { meta, tsv -> + [ meta + [roc_type:'weighted'], tsv ] } - HAPPY_HAPPY ( - ch_happy_input, - ch_fasta, - ch_fasta_fai, - ch_happy_false_positive_regions, - ch_happy_stratification_tsv, - ch_happy_stratification_beds - ) - ch_versions = ch_versions.mix(HAPPY_HAPPY.out.versions.first()) - - happy_vcf = HAPPY_HAPPY.out.vcf - happy_tbi = HAPPY_HAPPY.out.tbi - happy_indel_roc = HAPPY_HAPPY.out.roc_indel_locations_csv - happy_indel_roc_pass = HAPPY_HAPPY.out.roc_indel_locations_pass_csv - happy_snp_roc = HAPPY_HAPPY.out.roc_snp_locations_csv - happy_snp_roc_pass = HAPPY_HAPPY.out.roc_snp_locations_pass_csv - happy_roc = HAPPY_HAPPY.out.roc_all_csv - happy_summary = HAPPY_HAPPY.out.summary_csv - happy_extended_csv = HAPPY_HAPPY.out.extended_csv - } - - if("vcfeval" in val_list_tools){ - RTGTOOLS_VCFEVAL( - ch_input, - ch_vcfeval_sdf ) - ch_versions = ch_versions.mix(RTGTOOLS_VCFEVAL.out.versions.first()) - - ch_rocplot_input = RTGTOOLS_VCFEVAL.out.snp_roc - .map { meta, tsv -> - [ meta + [roc_type:'snp'], tsv ] - } - .mix( - RTGTOOLS_VCFEVAL.out.non_snp_roc.map { meta, tsv -> - [ meta + [roc_type:'non_snp'], tsv ] - }, - RTGTOOLS_VCFEVAL.out.weighted_roc.map { meta, tsv -> - [ meta + [roc_type:'weighted'], tsv ] - } - ) - - vcfeval_true_positive_vcf = RTGTOOLS_VCFEVAL.out.tp_vcf - vcfeval_true_positive_vcf_tbi = RTGTOOLS_VCFEVAL.out.tp_tbi - vcfeval_false_negative_vcf = RTGTOOLS_VCFEVAL.out.fn_vcf - vcfeval_false_negative_vcf_tbi = RTGTOOLS_VCFEVAL.out.fn_tbi - vcfeval_false_positive_vcf = RTGTOOLS_VCFEVAL.out.fp_vcf - vcfeval_false_positive_vcf_tbi = RTGTOOLS_VCFEVAL.out.fp_tbi - vcfeval_true_positive_baseline_vcf = RTGTOOLS_VCFEVAL.out.baseline_vcf - vcfeval_true_positive_baseline_vcf_tbi = RTGTOOLS_VCFEVAL.out.baseline_tbi - vcfeval_summary = RTGTOOLS_VCFEVAL.out.summary - vcfeval_phasing = RTGTOOLS_VCFEVAL.out.phasing - vcfeval_snp_roc = RTGTOOLS_VCFEVAL.out.snp_roc - vcfeval_non_snp_roc = RTGTOOLS_VCFEVAL.out.non_snp_roc - vcfeval_weighted_roc = RTGTOOLS_VCFEVAL.out.weighted_roc - - RTGTOOLS_ROCPLOT( - ch_rocplot_input - ) - - ch_versions = ch_versions.mix(RTGTOOLS_ROCPLOT.out.versions.first()) - - rocplot_out_png = RTGTOOLS_ROCPLOT.out.png - .branch { meta, png -> - roc_type = meta.roc_type - def new_meta = meta - meta.subMap("roc_type") - snp: roc_type == "snp" - non_snp: roc_type == "non_snp" - weighted: roc_type == "weighted" - } - - rocplot_out_svg = RTGTOOLS_ROCPLOT.out.svg - .branch { meta, svg -> - roc_type = meta.roc_type - def new_meta = meta - meta.subMap("roc_type") - - snp: roc_type == "snp" - non_snp: roc_type == "non_snp" - weighted: roc_type == "weighted" - } - - rtgtools_snp_png_rocplot = rocplot_out_png.snp - rtgtools_non_snp_png_rocplot = rocplot_out_png.non_snp - rtgtools_weighted_png_rocplot = rocplot_out_png.weighted - - rtgtools_snp_svg_rocplot = rocplot_out_svg.snp - rtgtools_non_snp_svg_rocplot = rocplot_out_svg.non_snp - rtgtools_weighted_svg_rocplot = rocplot_out_svg.weighted - } + vcfeval_true_positive_vcf = RTGTOOLS_VCFEVAL.out.tp_vcf + vcfeval_true_positive_vcf_tbi = RTGTOOLS_VCFEVAL.out.tp_tbi + vcfeval_false_negative_vcf = RTGTOOLS_VCFEVAL.out.fn_vcf + vcfeval_false_negative_vcf_tbi = RTGTOOLS_VCFEVAL.out.fn_tbi + vcfeval_false_positive_vcf = RTGTOOLS_VCFEVAL.out.fp_vcf + vcfeval_false_positive_vcf_tbi = RTGTOOLS_VCFEVAL.out.fp_tbi + vcfeval_true_positive_baseline_vcf = RTGTOOLS_VCFEVAL.out.baseline_vcf + vcfeval_true_positive_baseline_vcf_tbi = RTGTOOLS_VCFEVAL.out.baseline_tbi + vcfeval_summary = RTGTOOLS_VCFEVAL.out.summary + vcfeval_phasing = RTGTOOLS_VCFEVAL.out.phasing + vcfeval_snp_roc = RTGTOOLS_VCFEVAL.out.snp_roc + vcfeval_non_snp_roc = RTGTOOLS_VCFEVAL.out.non_snp_roc + vcfeval_weighted_roc = RTGTOOLS_VCFEVAL.out.weighted_roc + + RTGTOOLS_ROCPLOT( + ch_rocplot_input + ) + + ch_versions = ch_versions.mix(RTGTOOLS_ROCPLOT.out.versions.first()) + + rocplot_out_png = RTGTOOLS_ROCPLOT.out.png + .branch { meta, png -> + roc_type = meta.roc_type + def new_meta = meta - meta.subMap("roc_type") + + snp: roc_type == "snp" + non_snp: roc_type == "non_snp" + weighted: roc_type == "weighted" + } + + rocplot_out_svg = RTGTOOLS_ROCPLOT.out.svg + .branch { meta, svg -> + roc_type = meta.roc_type + def new_meta = meta - meta.subMap("roc_type") + + snp: roc_type == "snp" + non_snp: roc_type == "non_snp" + weighted: roc_type == "weighted" + } + + rtgtools_snp_png_rocplot = rocplot_out_png.snp + rtgtools_non_snp_png_rocplot = rocplot_out_png.non_snp + rtgtools_weighted_png_rocplot = rocplot_out_png.weighted + + rtgtools_snp_svg_rocplot = rocplot_out_svg.snp + rtgtools_non_snp_svg_rocplot = rocplot_out_svg.non_snp + rtgtools_weighted_svg_rocplot = rocplot_out_svg.weighted emit: - happy_vcf // channel: [ meta, vcf ] - happy_tbi // channel: [ meta, tbi ] - happy_indel_roc // channel: [ meta, csv ] - happy_indel_roc_pass // channel: [ meta, csv ] - happy_snp_roc // channel: [ meta, csv ] - happy_snp_roc_pass // channel: [ meta, csv ] - happy_roc // channel: [ meta, csv ] - happy_summary // channel: [ meta, csv ] - happy_extended_csv // channel: [ meta, csv ] - vcfeval_true_positive_vcf // channel: [ meta, vcf ] vcfeval_true_positive_vcf_tbi // channel: [ meta, tbi ] vcfeval_false_negative_vcf // channel: [ meta, vcf ] diff --git a/workflows/germline.nf b/workflows/germline.nf index 7b51d93a..28be6851 100644 --- a/workflows/germline.nf +++ b/workflows/germline.nf @@ -672,11 +672,7 @@ workflow GERMLINE { ch_validation_input.bed, ch_fasta_ready, ch_fai_ready, - ch_sdf_ready.collect(), - [[],[]], - [[],[]], - [[],[]], - "vcfeval" //Only VCFeval for now, awaiting the conda fix for happy (https://github.com/bioconda/bioconda-recipes/pull/39267) + ch_sdf_ready.collect() ) ch_versions = ch_versions.mix(VCF_VALIDATE_SMALL_VARIANTS.out.versions) } From e94291f70d41a94f7435724619bd3fac26b7be69 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 Sep 2024 17:00:41 +0200 Subject: [PATCH 03/28] update all modules --- modules.json | 50 +- .../bcftools/annotate/bcftools-annotate.diff | 26 + .../nf-core/bcftools/annotate/environment.yml | 2 +- modules/nf-core/bcftools/annotate/main.nf | 20 +- modules/nf-core/bcftools/annotate/meta.yml | 16 +- .../bcftools/annotate/tests/bcf.config | 4 + .../bcftools/annotate/tests/main.nf.test | 327 ++++++++ .../bcftools/annotate/tests/main.nf.test.snap | 388 +++++++++ .../nf-core/bcftools/annotate/tests/tags.yml | 2 + .../bcftools/annotate/tests/vcf.config | 4 + .../annotate/tests/vcf_gz_index.config | 4 + .../annotate/tests/vcf_gz_index_csi.config | 4 + .../annotate/tests/vcf_gz_index_tbi.config | 4 + .../nf-core/bcftools/filter/environment.yml | 2 +- modules/nf-core/bcftools/filter/main.nf | 18 +- modules/nf-core/bcftools/filter/meta.yml | 8 + .../bcftools/filter/tests/main.nf.test | 177 +++- .../bcftools/filter/tests/main.nf.test.snap | 318 +++++++- .../bcftools/filter/tests/vcf_gz_index.config | 4 + .../filter/tests/vcf_gz_index_csi.config | 4 + .../filter/tests/vcf_gz_index_tbi.config | 4 + modules/nf-core/bcftools/norm/environment.yml | 2 +- modules/nf-core/bcftools/norm/main.nf | 22 +- modules/nf-core/bcftools/norm/meta.yml | 8 + .../nf-core/bcftools/norm/tests/main.nf.test | 563 +++++++++++++ .../bcftools/norm/tests/main.nf.test.snap | 758 ++++++++++++++++++ .../bcftools/norm/tests/nextflow.bcf.config | 4 + .../norm/tests/nextflow.bcf_gz.config | 4 + .../bcftools/norm/tests/nextflow.config | 4 + .../bcftools/norm/tests/nextflow.vcf.config | 4 + .../norm/tests/nextflow.vcf_gz.config | 4 + modules/nf-core/bcftools/norm/tests/tags.yml | 2 + .../bcftools/norm/tests/vcf_gz_index.config | 4 + .../norm/tests/vcf_gz_index_csi.config | 4 + .../norm/tests/vcf_gz_index_tbi.config | 4 + .../nf-core/bcftools/query/environment.yml | 2 +- modules/nf-core/bcftools/query/main.nf | 4 +- .../nf-core/bcftools/query/tests/main.nf.test | 16 +- .../bcftools/query/tests/main.nf.test.snap | 24 +- .../bcftools/reheader/bcftools-reheader.diff | 19 - .../nf-core/bcftools/reheader/environment.yml | 2 +- modules/nf-core/bcftools/reheader/main.nf | 15 +- modules/nf-core/bcftools/reheader/meta.yml | 4 + .../bcftools/reheader/tests/main.nf.test | 233 +++++- .../bcftools/reheader/tests/main.nf.test.snap | 345 +++++++- .../reheader/tests/vcf_gz_index.config | 4 + .../reheader/tests/vcf_gz_index_csi.config | 4 + .../reheader/tests/vcf_gz_index_tbi.config | 5 + .../nf-core/bcftools/stats/environment.yml | 3 +- modules/nf-core/bcftools/stats/main.nf | 4 +- .../nf-core/bcftools/stats/tests/main.nf.test | 182 +++++ .../bcftools/stats/tests/main.nf.test.snap | 180 +++++ modules/nf-core/bcftools/stats/tests/tags.yml | 2 + .../download/ensemblvep-download.diff | 25 - .../ensemblvep/download/environment.yml | 2 +- modules/nf-core/ensemblvep/download/main.nf | 14 +- .../ensemblvep/download/tests/main.nf.test | 60 ++ .../download/tests/main.nf.test.snap | 322 ++++++++ .../ensemblvep/download/tests/nextflow.config | 12 + .../ensemblvep/download/tests/tags.yml | 2 + modules/nf-core/gatk4/genotypegvcfs/main.nf | 18 +- .../gatk4-haplotypecaller.diff | 16 - modules/nf-core/gatk4/haplotypecaller/main.nf | 4 +- .../gatk4/haplotypecaller/tests/main.nf.test | 86 +- .../haplotypecaller/tests/main.nf.test.snap | 88 +- modules/nf-core/gawk/environment.yml | 2 +- modules/nf-core/gawk/main.nf | 9 +- modules/nf-core/gawk/tests/main.nf.test | 56 ++ modules/nf-core/gawk/tests/main.nf.test.snap | 68 ++ modules/nf-core/gawk/tests/nextflow.config | 6 + .../tests/nextflow_with_program_file.config | 5 + modules/nf-core/gawk/tests/tags.yml | 2 + modules/nf-core/mosdepth/environment.yml | 2 +- modules/nf-core/mosdepth/main.nf | 12 +- modules/nf-core/mosdepth/tests/main.nf.test | 66 +- .../nf-core/mosdepth/tests/main.nf.test.snap | 423 +++++++--- modules/nf-core/rtgtools/pedfilter/main.nf | 11 +- modules/nf-core/rtgtools/pedfilter/meta.yml | 2 +- .../pedfilter/rtgtools-pedfilter.diff | 39 - .../rtgtools/pedfilter/tests/main.nf.test | 85 ++ .../pedfilter/tests/main.nf.test.snap | 91 +++ .../rtgtools/pedfilter/tests/nextflow.config | 5 + modules/nf-core/rtgtools/rocplot/meta.yml | 2 +- .../rtgtools/rocplot/tests/main.nf.test | 16 +- .../rtgtools/rocplot/tests/main.nf.test.snap | 6 +- .../nf-core/samtools/convert/environment.yml | 4 +- modules/nf-core/samtools/convert/main.nf | 26 +- modules/nf-core/samtools/convert/meta.yml | 19 +- .../samtools/convert/tests/main.nf.test | 44 +- .../samtools/convert/tests/main.nf.test.snap | 119 ++- .../nf-core/samtools/faidx/environment.yml | 6 +- modules/nf-core/samtools/faidx/main.nf | 4 +- modules/nf-core/samtools/faidx/meta.yml | 4 + .../nf-core/samtools/faidx/tests/main.nf.test | 122 +++ .../samtools/faidx/tests/main.nf.test.snap | 249 ++++++ .../samtools/faidx/tests/nextflow.config | 7 + .../samtools/faidx/tests/nextflow2.config | 6 + modules/nf-core/samtools/faidx/tests/tags.yml | 2 + .../nf-core/samtools/index/environment.yml | 4 +- modules/nf-core/samtools/index/main.nf | 11 +- .../nf-core/samtools/index/tests/main.nf.test | 87 +- .../samtools/index/tests/main.nf.test.snap | 264 +++++- .../nf-core/samtools/merge/environment.yml | 4 +- modules/nf-core/samtools/merge/main.nf | 4 +- .../samtools/merge/samtools-merge.diff | 13 - .../samtools/merge/tests/main.nf.test.snap | 24 +- .../nf-core/somalier/extract/environment.yml | 2 +- modules/nf-core/somalier/extract/main.nf | 10 +- modules/nf-core/somalier/extract/meta.yml | 17 +- .../somalier/extract/tests/main.nf.test | 84 ++ .../somalier/extract/tests/main.nf.test.snap | 72 ++ .../nf-core/somalier/extract/tests/tags.yml | 2 + .../nf-core/somalier/relate/environment.yml | 7 - modules/nf-core/somalier/relate/main.nf | 62 -- modules/nf-core/somalier/relate/meta.yml | 63 -- .../somalier/relate/somalier-relate.diff | 30 - modules/nf-core/tabix/bgzip/environment.yml | 1 + modules/nf-core/tabix/bgzip/main.nf | 7 +- .../tabix/bgzip/tests/bgzip_compress.config | 5 + .../nf-core/tabix/bgzip/tests/main.nf.test | 111 +++ .../tabix/bgzip/tests/main.nf.test.snap | 218 +++++ modules/nf-core/tabix/bgzip/tests/tags.yml | 2 + .../nf-core/tabix/bgzip/tests/vcf_none.config | 5 + .../nf-core/tabix/bgziptabix/environment.yml | 1 + modules/nf-core/tabix/bgziptabix/main.nf | 8 +- .../tabix/bgziptabix/tests/main.nf.test | 94 +++ .../tabix/bgziptabix/tests/main.nf.test.snap | 167 ++++ .../tabix/bgziptabix/tests/tabix_csi.config | 5 + .../tabix/bgziptabix/tests/tabix_tbi.config | 5 + .../nf-core/tabix/bgziptabix/tests/tags.yml | 2 + modules/nf-core/untar/environment.yml | 4 +- modules/nf-core/untar/main.nf | 29 +- modules/nf-core/untar/tests/main.nf.test | 44 +- modules/nf-core/untar/tests/main.nf.test.snap | 152 +++- modules/nf-core/vardictjava/environment.yml | 1 + modules/nf-core/vardictjava/main.nf | 15 +- modules/nf-core/vardictjava/meta.yml | 2 +- .../nf-core/vardictjava/tests/main.nf.test | 24 +- .../vardictjava/tests/main.nf.test.snap | 20 +- modules/nf-core/vardictjava/vardictjava.diff | 13 - modules/nf-core/vcf2db/Dockerfile | 11 - modules/nf-core/vcf2db/main.nf | 10 +- modules/nf-core/vcf2db/tests/main.nf.test | 14 +- .../nf-core/vcf2db/tests/main.nf.test.snap | 40 +- modules/nf-core/vcf2db/vcf2db_env.yaml | 96 --- .../local/gvcf_joint_genotype_gatk4/main.nf | 6 +- .../local/vcf_extract_relate_somalier/main.nf | 6 +- workflows/germline.nf | 18 +- 148 files changed, 6842 insertions(+), 1044 deletions(-) create mode 100644 modules/nf-core/bcftools/annotate/bcftools-annotate.diff create mode 100644 modules/nf-core/bcftools/annotate/tests/bcf.config create mode 100644 modules/nf-core/bcftools/annotate/tests/main.nf.test create mode 100644 modules/nf-core/bcftools/annotate/tests/main.nf.test.snap create mode 100644 modules/nf-core/bcftools/annotate/tests/tags.yml create mode 100644 modules/nf-core/bcftools/annotate/tests/vcf.config create mode 100644 modules/nf-core/bcftools/annotate/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/annotate/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/annotate/tests/vcf_gz_index_tbi.config create mode 100644 modules/nf-core/bcftools/filter/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/filter/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/filter/tests/vcf_gz_index_tbi.config create mode 100644 modules/nf-core/bcftools/norm/tests/main.nf.test create mode 100644 modules/nf-core/bcftools/norm/tests/main.nf.test.snap create mode 100644 modules/nf-core/bcftools/norm/tests/nextflow.bcf.config create mode 100644 modules/nf-core/bcftools/norm/tests/nextflow.bcf_gz.config create mode 100644 modules/nf-core/bcftools/norm/tests/nextflow.config create mode 100644 modules/nf-core/bcftools/norm/tests/nextflow.vcf.config create mode 100644 modules/nf-core/bcftools/norm/tests/nextflow.vcf_gz.config create mode 100644 modules/nf-core/bcftools/norm/tests/tags.yml create mode 100644 modules/nf-core/bcftools/norm/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/norm/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/norm/tests/vcf_gz_index_tbi.config delete mode 100644 modules/nf-core/bcftools/reheader/bcftools-reheader.diff create mode 100644 modules/nf-core/bcftools/reheader/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/reheader/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/reheader/tests/vcf_gz_index_tbi.config create mode 100644 modules/nf-core/bcftools/stats/tests/main.nf.test create mode 100644 modules/nf-core/bcftools/stats/tests/main.nf.test.snap create mode 100644 modules/nf-core/bcftools/stats/tests/tags.yml delete mode 100644 modules/nf-core/ensemblvep/download/ensemblvep-download.diff create mode 100644 modules/nf-core/ensemblvep/download/tests/main.nf.test create mode 100644 modules/nf-core/ensemblvep/download/tests/main.nf.test.snap create mode 100644 modules/nf-core/ensemblvep/download/tests/nextflow.config create mode 100644 modules/nf-core/ensemblvep/download/tests/tags.yml delete mode 100644 modules/nf-core/gatk4/haplotypecaller/gatk4-haplotypecaller.diff create mode 100644 modules/nf-core/gawk/tests/main.nf.test create mode 100644 modules/nf-core/gawk/tests/main.nf.test.snap create mode 100644 modules/nf-core/gawk/tests/nextflow.config create mode 100644 modules/nf-core/gawk/tests/nextflow_with_program_file.config create mode 100644 modules/nf-core/gawk/tests/tags.yml delete mode 100644 modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff create mode 100644 modules/nf-core/rtgtools/pedfilter/tests/main.nf.test create mode 100644 modules/nf-core/rtgtools/pedfilter/tests/main.nf.test.snap create mode 100644 modules/nf-core/rtgtools/pedfilter/tests/nextflow.config create mode 100644 modules/nf-core/samtools/faidx/tests/main.nf.test create mode 100644 modules/nf-core/samtools/faidx/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/faidx/tests/nextflow.config create mode 100644 modules/nf-core/samtools/faidx/tests/nextflow2.config create mode 100644 modules/nf-core/samtools/faidx/tests/tags.yml delete mode 100644 modules/nf-core/samtools/merge/samtools-merge.diff create mode 100644 modules/nf-core/somalier/extract/tests/main.nf.test create mode 100644 modules/nf-core/somalier/extract/tests/main.nf.test.snap create mode 100644 modules/nf-core/somalier/extract/tests/tags.yml delete mode 100644 modules/nf-core/somalier/relate/environment.yml delete mode 100644 modules/nf-core/somalier/relate/main.nf delete mode 100644 modules/nf-core/somalier/relate/meta.yml delete mode 100644 modules/nf-core/somalier/relate/somalier-relate.diff create mode 100644 modules/nf-core/tabix/bgzip/tests/bgzip_compress.config create mode 100644 modules/nf-core/tabix/bgzip/tests/main.nf.test create mode 100644 modules/nf-core/tabix/bgzip/tests/main.nf.test.snap create mode 100644 modules/nf-core/tabix/bgzip/tests/tags.yml create mode 100644 modules/nf-core/tabix/bgzip/tests/vcf_none.config create mode 100644 modules/nf-core/tabix/bgziptabix/tests/main.nf.test create mode 100644 modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap create mode 100644 modules/nf-core/tabix/bgziptabix/tests/tabix_csi.config create mode 100644 modules/nf-core/tabix/bgziptabix/tests/tabix_tbi.config create mode 100644 modules/nf-core/tabix/bgziptabix/tests/tags.yml delete mode 100644 modules/nf-core/vardictjava/vardictjava.diff delete mode 100644 modules/nf-core/vcf2db/Dockerfile delete mode 100644 modules/nf-core/vcf2db/vcf2db_env.yaml diff --git a/modules.json b/modules.json index 830e32fa..16f83c21 100644 --- a/modules.json +++ b/modules.json @@ -7,8 +7,9 @@ "nf-core": { "bcftools/annotate": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", - "installed_by": ["modules"] + "git_sha": "88ae68490e8f2478a1e1bbeedac970fd7cc73022", + "installed_by": ["modules"], + "patch": "modules/nf-core/bcftools/annotate/bcftools-annotate.diff" }, "bcftools/concat": { "branch": "master", @@ -17,12 +18,12 @@ }, "bcftools/filter": { "branch": "master", - "git_sha": "a3893076a76e91b3ff152faddf872f00778fb224", + "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", "installed_by": ["modules"] }, "bcftools/norm": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "f6cc00f107826cfaf1c933297b10ed1757b41479", "installed_by": ["modules"] }, "bcftools/pluginscatter": { @@ -32,12 +33,12 @@ }, "bcftools/query": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "34ac993e081b32d2170ab790d0386b74122f9d36", "installed_by": ["modules"] }, "bcftools/reheader": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "c32611ac6813055b9321d2827678e2f8aebcb394", "installed_by": ["modules"] }, "bcftools/sort": { @@ -47,7 +48,7 @@ }, "bcftools/stats": { "branch": "master", - "git_sha": "618364f55cb88f6c283f6c6c45c24d5f9f08f998", + "git_sha": "a5ba4d59c2b248c0379b0f8aeb4e7e754566cd1f", "installed_by": ["modules"] }, "bedtools/intersect": { @@ -102,17 +103,17 @@ }, "gatk4/haplotypecaller": { "branch": "master", - "git_sha": "e53d091a6de1ae9fd681351c085d8abe076ba1ec", + "git_sha": "c332ea831f95f750be962c4b5de655f7a1e6e245", "installed_by": ["modules"] }, "gawk": { "branch": "master", - "git_sha": "da4d05d04e65227d4307e87940842f1a14de62c7", + "git_sha": "cf3ed075695639b0a0924eb0901146df1996dc08", "installed_by": ["modules"] }, "mosdepth": { "branch": "master", - "git_sha": "69e3eb17fb31b772b18f134d6e8f8b93ee980e65", + "git_sha": "9bfc81874554e87740bcb3e5e07acf0a153c9ecb", "installed_by": ["modules"] }, "multiqc": { @@ -127,12 +128,12 @@ }, "rtgtools/pedfilter": { "branch": "master", - "git_sha": "1a4ab76618a2269ee653aefff8a5ee1f855e5f83", + "git_sha": "c1c2a770cfb0bfbf093a2434a27f091ebbc65987", "installed_by": ["modules"] }, "rtgtools/rocplot": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "64770369d851c45c364e410e052ef9a6c3a7d2bb", "installed_by": ["modules"] }, "rtgtools/vcfeval": { @@ -142,22 +143,22 @@ }, "samtools/convert": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", "installed_by": ["modules"] }, "samtools/index": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "46eca555142d6e597729fcb682adcc791796f514", "installed_by": ["modules"] }, "samtools/merge": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", "installed_by": ["modules"] }, "snpeff/snpeff": { @@ -167,22 +168,17 @@ }, "somalier/extract": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"] - }, - "somalier/relate": { - "branch": "master", - "git_sha": "d8ba32c6b54a01f8efa7b51a1f3978f003f8873b", + "git_sha": "458c882987320e27fc90723ec96c127a243a5497", "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "b20be35facfc5acdc1259f132ed79339d79e989f", "installed_by": ["modules"] }, "tabix/bgziptabix": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", "installed_by": ["modules"] }, "tabix/tabix": { @@ -192,17 +188,17 @@ }, "untar": { "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", "installed_by": ["modules"] }, "vardictjava": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "e61e5a13ef49c5595986bd31efb85c3f0709a282", "installed_by": ["modules"] }, "vcf2db": { "branch": "master", - "git_sha": "233fa70811a03a4cecb2ece483b5c8396e2cee1d", + "git_sha": "730f3aee80d5f8d0b5fc532202ac59361414d006", "installed_by": ["modules"] }, "vcfanno": { diff --git a/modules/nf-core/bcftools/annotate/bcftools-annotate.diff b/modules/nf-core/bcftools/annotate/bcftools-annotate.diff new file mode 100644 index 00000000..518cee56 --- /dev/null +++ b/modules/nf-core/bcftools/annotate/bcftools-annotate.diff @@ -0,0 +1,26 @@ +Changes in module 'nf-core/bcftools/annotate' +Changes in 'bcftools/annotate/main.nf': +--- modules/nf-core/bcftools/annotate/main.nf ++++ modules/nf-core/bcftools/annotate/main.nf +@@ -8,8 +8,7 @@ + 'biocontainers/bcftools:1.20--h8b25389_0' }" + + input: +- tuple val(meta), path(input), path(index), path(annotations), path(annotations_index) +- path(header_lines) ++ tuple val(meta), path(input), path(index), path(annotations), path(annotations_index), path(header_lines) + + output: + tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}"), emit: vcf + +'modules/nf-core/bcftools/annotate/environment.yml' is unchanged +'modules/nf-core/bcftools/annotate/meta.yml' is unchanged +'modules/nf-core/bcftools/annotate/tests/tags.yml' is unchanged +'modules/nf-core/bcftools/annotate/tests/vcf.config' is unchanged +'modules/nf-core/bcftools/annotate/tests/vcf_gz_index_csi.config' is unchanged +'modules/nf-core/bcftools/annotate/tests/vcf_gz_index_tbi.config' is unchanged +'modules/nf-core/bcftools/annotate/tests/main.nf.test' is unchanged +'modules/nf-core/bcftools/annotate/tests/bcf.config' is unchanged +'modules/nf-core/bcftools/annotate/tests/vcf_gz_index.config' is unchanged +'modules/nf-core/bcftools/annotate/tests/main.nf.test.snap' is unchanged +************************************************************ diff --git a/modules/nf-core/bcftools/annotate/environment.yml b/modules/nf-core/bcftools/annotate/environment.yml index e0abc8d2..3d4e3379 100644 --- a/modules/nf-core/bcftools/annotate/environment.yml +++ b/modules/nf-core/bcftools/annotate/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/annotate/main.nf b/modules/nf-core/bcftools/annotate/main.nf index 27ebfd4a..2cfe29a1 100644 --- a/modules/nf-core/bcftools/annotate/main.nf +++ b/modules/nf-core/bcftools/annotate/main.nf @@ -4,14 +4,16 @@ process BCFTOOLS_ANNOTATE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: tuple val(meta), path(input), path(index), path(annotations), path(annotations_index), path(header_lines) output: 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: @@ -27,8 +29,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_command = !index ? "bcftools index $input" : '' + if ("$input" == "${prefix}.${extension}") error "Input and output names are the same, set prefix in module configuration to disambiguate!" """ + $index_command + bcftools \\ annotate \\ $args \\ @@ -52,8 +58,16 @@ 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 create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" + def create_index = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index}" : "" + """ - touch ${prefix}.${extension} + ${create_cmd} ${prefix}.${extension} + ${create_index} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/annotate/meta.yml b/modules/nf-core/bcftools/annotate/meta.yml index f3aa463b..248eee0c 100644 --- a/modules/nf-core/bcftools/annotate/meta.yml +++ b/modules/nf-core/bcftools/annotate/meta.yml @@ -40,14 +40,22 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - vcf: type: file description: Compressed annotated VCF file pattern: "*{vcf,vcf.gz,bcf,bcf.gz}" + - csi: + type: file + description: Default VCF file index + pattern: "*.csi" + - tbi: + type: file + description: Alternative VCF file index + pattern: "*.tbi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@projectoriented" - "@ramprasadn" diff --git a/modules/nf-core/bcftools/annotate/tests/bcf.config b/modules/nf-core/bcftools/annotate/tests/bcf.config new file mode 100644 index 00000000..79d26779 --- /dev/null +++ b/modules/nf-core/bcftools/annotate/tests/bcf.config @@ -0,0 +1,4 @@ +process { + ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type u" + ext.prefix = { "${meta.id}_ann" } +} diff --git a/modules/nf-core/bcftools/annotate/tests/main.nf.test b/modules/nf-core/bcftools/annotate/tests/main.nf.test new file mode 100644 index 00000000..3a5c4933 --- /dev/null +++ b/modules/nf-core/bcftools/annotate/tests/main.nf.test @@ -0,0 +1,327 @@ +nextflow_process { + + name "Test Process BCFTOOLS_ANNOTATE" + script "../main.nf" + process "BCFTOOLS_ANNOTATE" + + tag "modules" + tag "modules_nfcore" + tag "bcftools" + tag "bcftools/annotate" + + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_output") { + + config "./vcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { it.collect { it instanceof Map ? it : file(it).name }}, + process.out.versions + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, [], annotation, annotation_tbi], [] - vcf_output") { + + config "./vcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { it.collect { it instanceof Map ? it : file(it).name }}, + process.out.versions + ).match() } + ) + } + + } + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index") { + + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index_csi") { + + config "./vcf_gz_index_csi.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index_tbi") { + + config "./vcf_gz_index_tbi.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + test("sarscov2 - [vcf, [], annotation, annotation_tbi], header - bcf_output") { + + config "./bcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = Channel.of( + '##INFO=', + '##INFO=' + ).collectFile(name:"headers.vcf", newLine:true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { it.collect { it instanceof Map ? it : file(it).name }}, + process.out.versions + ).match("bcf") } + ) + } + + } + + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - stub") { + + config "./vcf.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index - stub") { + + config "./vcf_gz_index.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match()}, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index_csi - stub") { + + config "./vcf_gz_index_csi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index_tbi - stub") { + + config "./vcf_gz_index_tbi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/annotate/tests/main.nf.test.snap b/modules/nf-core/bcftools/annotate/tests/main.nf.test.snap new file mode 100644 index 00000000..bac2224a --- /dev/null +++ b/modules/nf-core/bcftools/annotate/tests/main.nf.test.snap @@ -0,0 +1,388 @@ +{ + "bcf": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_ann.bcf" + ] + ], + [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-12T16:39:33.331888" + }, + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz" + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi" + ] + ], + [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:07:59.658031137" + }, + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index_csi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:09:05.096883418" + }, + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index_csi": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz" + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi" + ] + ], + [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:08:10.581301219" + }, + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:08:43.975017625" + }, + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index_tbi": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.tbi" + ] + ], + [ + + ], + [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:08:21.354059092" + }, + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_output": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz" + ] + ], + [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:07:37.788393317" + }, + "sarscov2 - [vcf, [], annotation, annotation_tbi], [] - vcf_output": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz" + ] + ], + [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:07:48.500746325" + }, + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index_tbi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:09:16.094918834" + }, + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-08-15T10:08:54.366358502" + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/annotate/tests/tags.yml b/modules/nf-core/bcftools/annotate/tests/tags.yml new file mode 100644 index 00000000..f97a1afc --- /dev/null +++ b/modules/nf-core/bcftools/annotate/tests/tags.yml @@ -0,0 +1,2 @@ +bcftools/annotate: + - "modules/nf-core/bcftools/annotate/**" diff --git a/modules/nf-core/bcftools/annotate/tests/vcf.config b/modules/nf-core/bcftools/annotate/tests/vcf.config new file mode 100644 index 00000000..611868d5 --- /dev/null +++ b/modules/nf-core/bcftools/annotate/tests/vcf.config @@ -0,0 +1,4 @@ +process { + ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type z" + ext.prefix = { "${meta.id}_vcf" } +} diff --git a/modules/nf-core/bcftools/annotate/tests/vcf_gz_index.config b/modules/nf-core/bcftools/annotate/tests/vcf_gz_index.config new file mode 100644 index 00000000..2fd9a225 --- /dev/null +++ b/modules/nf-core/bcftools/annotate/tests/vcf_gz_index.config @@ -0,0 +1,4 @@ +process { + ext.args = "--output-type z --write-index --no-version" + ext.prefix = { "${meta.id}_vcf" } +} diff --git a/modules/nf-core/bcftools/annotate/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/annotate/tests/vcf_gz_index_csi.config new file mode 100644 index 00000000..512c1dfb --- /dev/null +++ b/modules/nf-core/bcftools/annotate/tests/vcf_gz_index_csi.config @@ -0,0 +1,4 @@ +process { + ext.args = "--output-type z --write-index=csi --no-version" + ext.prefix = { "${meta.id}_vcf" } +} diff --git a/modules/nf-core/bcftools/annotate/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/annotate/tests/vcf_gz_index_tbi.config new file mode 100644 index 00000000..7feb5ebb --- /dev/null +++ b/modules/nf-core/bcftools/annotate/tests/vcf_gz_index_tbi.config @@ -0,0 +1,4 @@ +process { + ext.args = "--output-type z --write-index=tbi --no-version" + ext.prefix = { "${meta.id}_vcf" } +} diff --git a/modules/nf-core/bcftools/filter/environment.yml b/modules/nf-core/bcftools/filter/environment.yml index b2698757..854de139 100644 --- a/modules/nf-core/bcftools/filter/environment.yml +++ b/modules/nf-core/bcftools/filter/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/filter/main.nf b/modules/nf-core/bcftools/filter/main.nf index cc9a2361..8f92c51a 100644 --- a/modules/nf-core/bcftools/filter/main.nf +++ b/modules/nf-core/bcftools/filter/main.nf @@ -4,14 +4,16 @@ process BCFTOOLS_FILTER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: tuple val(meta), path(vcf) output: tuple val(meta), path("*.${extension}"), 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: @@ -45,19 +47,23 @@ process BCFTOOLS_FILTER { stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : 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 create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" + def create_index = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index}" : "" if ("$vcf" == "${prefix}.${extension}") error "Input and output names are the same, set prefix in module configuration to disambiguate!" - def create_file = extension.endsWith(".gz") ? "echo '' | gzip > ${prefix}.${extension}" : "touch ${prefix}.${extension}" - """ - ${create_file} + ${create_cmd} ${prefix}.${extension} + ${create_index} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/filter/meta.yml b/modules/nf-core/bcftools/filter/meta.yml index deb93b13..d67c0257 100644 --- a/modules/nf-core/bcftools/filter/meta.yml +++ b/modules/nf-core/bcftools/filter/meta.yml @@ -32,6 +32,14 @@ output: type: file description: VCF filtered output file pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" + - csi: + type: file + description: Default VCF file index + pattern: "*.csi" + - tbi: + type: file + description: Alternative VCF file index + pattern: "*.tbi" - versions: type: file description: File containing software versions diff --git a/modules/nf-core/bcftools/filter/tests/main.nf.test b/modules/nf-core/bcftools/filter/tests/main.nf.test index eaf100e8..646f37ad 100644 --- a/modules/nf-core/bcftools/filter/tests/main.nf.test +++ b/modules/nf-core/bcftools/filter/tests/main.nf.test @@ -9,10 +9,10 @@ nextflow_process { tag "bcftools" tag "bcftools/filter" - config "./nextflow.config" - test("sarscov2 - vcf") { + config "./nextflow.config" + when { process { """ @@ -33,8 +33,100 @@ nextflow_process { } + test("sarscov2 - vcf_gz_index") { + + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [id:"vcf_test"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - vcf_gz_index_csi") { + + config "./vcf_gz_index_csi.config" + + when { + process { + """ + input[0] = [ + [id:"vcf_test"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - vcf_gz_index_tbi") { + + config "./vcf_gz_index_tbi.config" + + when { + process { + """ + input[0] = [ + [id:"vcf_test"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + test("sarscov2 - vcf - bcf output") { + config "./nextflow.config" + when { process { """ @@ -57,6 +149,7 @@ nextflow_process { test("sarscov2 - vcf - stub") { + config "./nextflow.config" options "-stub" when { @@ -79,4 +172,82 @@ nextflow_process { } -} + test("sarscov2 - vcf_gz_index - stub") { + + config "./vcf_gz_index.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [id:"vcf_test"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - vcf_gz_index_csi - stub") { + + config "./vcf_gz_index_csi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [id:"vcf_test"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - vcf_gz_index_tbi - stub") { + + config "./vcf_gz_index_tbi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [id:"vcf_test"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/filter/tests/main.nf.test.snap b/modules/nf-core/bcftools/filter/tests/main.nf.test.snap index f8e17aa0..3d7605f2 100644 --- a/modules/nf-core/bcftools/filter/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/filter/tests/main.nf.test.snap @@ -1,4 +1,59 @@ { + "sarscov2 - vcf_gz_index_tbi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T13:59:08.235854993" + }, "vcf": { "content": [ { @@ -11,7 +66,19 @@ ] ], "1": [ - "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67" + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ], + "csi": [ + + ], + "tbi": [ + ], "vcf": [ [ @@ -22,15 +89,15 @@ ] ], "versions": [ - "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67" + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-27T16:57:32.940161987" + "timestamp": "2024-06-04T15:20:28.427974818" }, "bcf output": { "content": [ @@ -44,7 +111,19 @@ ] ], "1": [ - "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67" + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ], + "csi": [ + + ], + "tbi": [ + ], "vcf": [ [ @@ -55,15 +134,77 @@ ] ], "versions": [ - "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67" + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T15:20:34.049236749" + }, + "sarscov2 - vcf_gz_index": { + "content": [ + [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" }, - "timestamp": "2024-03-27T16:45:14.586866398" + "timestamp": "2024-06-05T08:09:49.837854646" + }, + "sarscov2 - vcf_gz_index_csi": { + "content": [ + [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T13:57:19.513365022" }, "vcf - stub": { "content": [ @@ -77,7 +218,19 @@ ] ], "1": [ - "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67" + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ], + "csi": [ + + ], + "tbi": [ + ], "vcf": [ [ @@ -88,14 +241,155 @@ ] ], "versions": [ - "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67" + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T15:29:55.846566153" + }, + "sarscov2 - vcf_gz_index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ], + "csi": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T15:59:37.636874258" + }, + "sarscov2 - vcf_gz_index_csi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ], + "csi": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T13:58:46.36278584" + }, + "sarscov2 - vcf_gz_index_tbi": { + "content": [ + [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + + ], + [ + [ + { + "id": "vcf_test" + }, + "vcf_test_vcf.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,9a336d1ee26b527d7a2bdbeead155f64" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" }, - "timestamp": "2024-03-27T17:05:52.80837892" + "timestamp": "2024-06-05T13:57:34.748836577" } } \ No newline at end of file diff --git a/modules/nf-core/bcftools/filter/tests/vcf_gz_index.config b/modules/nf-core/bcftools/filter/tests/vcf_gz_index.config new file mode 100644 index 00000000..7dd696ee --- /dev/null +++ b/modules/nf-core/bcftools/filter/tests/vcf_gz_index.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index --no-version" +} diff --git a/modules/nf-core/bcftools/filter/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/filter/tests/vcf_gz_index_csi.config new file mode 100644 index 00000000..aebffb6f --- /dev/null +++ b/modules/nf-core/bcftools/filter/tests/vcf_gz_index_csi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=csi --no-version" +} diff --git a/modules/nf-core/bcftools/filter/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/filter/tests/vcf_gz_index_tbi.config new file mode 100644 index 00000000..b192ae7d --- /dev/null +++ b/modules/nf-core/bcftools/filter/tests/vcf_gz_index_tbi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=tbi --no-version" +} diff --git a/modules/nf-core/bcftools/norm/environment.yml b/modules/nf-core/bcftools/norm/environment.yml index fe80e4e7..0c7dfa8f 100644 --- a/modules/nf-core/bcftools/norm/environment.yml +++ b/modules/nf-core/bcftools/norm/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/norm/main.nf b/modules/nf-core/bcftools/norm/main.nf index 47d3dab1..bd7a2501 100644 --- a/modules/nf-core/bcftools/norm/main.nf +++ b/modules/nf-core/bcftools/norm/main.nf @@ -4,16 +4,18 @@ process BCFTOOLS_NORM { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: tuple val(meta), path(vcf), path(tbi) tuple val(meta2), path(fasta) output: - tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.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 @@ -30,7 +32,7 @@ process BCFTOOLS_NORM { """ bcftools norm \\ --fasta-ref ${fasta} \\ - --output ${prefix}.${extension}\\ + --output ${prefix}.${extension} \\ $args \\ --threads $task.cpus \\ ${vcf} @@ -49,8 +51,16 @@ process BCFTOOLS_NORM { args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : "vcf.gz" + 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 create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" + def create_index = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index}" : "" + """ - touch ${prefix}.${extension} + ${create_cmd} ${prefix}.${extension} + ${create_index} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/norm/meta.yml b/modules/nf-core/bcftools/norm/meta.yml index 1f3e1b62..a0cdeaf1 100644 --- a/modules/nf-core/bcftools/norm/meta.yml +++ b/modules/nf-core/bcftools/norm/meta.yml @@ -49,6 +49,14 @@ output: type: file description: One of uncompressed VCF (.vcf), compressed VCF (.vcf.gz), compressed BCF (.bcf.gz) or uncompressed BCF (.bcf) normalized output file pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - csi: + type: file + description: Default VCF file index + pattern: "*.csi" + - tbi: + type: file + description: Alternative VCF file index + pattern: "*.tbi" - versions: type: file description: File containing software versions diff --git a/modules/nf-core/bcftools/norm/tests/main.nf.test b/modules/nf-core/bcftools/norm/tests/main.nf.test new file mode 100644 index 00000000..dbc41502 --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/main.nf.test @@ -0,0 +1,563 @@ +nextflow_process { + + name "Test Process BCFTOOLS_NORM" + script "../main.nf" + process "BCFTOOLS_NORM" + + tag "modules" + tag "modules_nfcore" + tag "bcftools" + tag "bcftools/norm" + + test("sarscov2 - [ vcf, [] ], fasta") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, [] ], fasta - vcf_gz_index") { + + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } } + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [ vcf, [] ], fasta - vcf_gz_index_csi") { + + config "./vcf_gz_index_csi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } } + ).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [ vcf, [] ], fasta - vcf_gz_index_tbi") { + + config "./vcf_gz_index_tbi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } } + ).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta - vcf output") { + + config "./nextflow.vcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta - vcf_gz output") { + + config "./nextflow.vcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta - bcf output") { + + config "./nextflow.bcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta - bcf_gz output") { + + config "./nextflow.bcf_gz.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, [] ], fasta - stub") { + + config "./nextflow.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta -stub") { + + config "./nextflow.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta - vcf output -stub") { + + config "./nextflow.vcf.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta - vcf_gz output - stub") { + + config "./nextflow.vcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta - bcf output - stub") { + + config "./nextflow.bcf.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, tbi ], fasta - bcf_gz output - stub") { + + config "./nextflow.bcf_gz.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ vcf, [] ], fasta - vcf_gz_index - stub") { + + config "./vcf_gz_index.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [ vcf, [] ], fasta - vcf_gz_index_csi - stub") { + + config "./vcf_gz_index_csi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [ vcf, [] ], fasta - vcf_gz_index_tbi - stub") { + + config "./vcf_gz_index_tbi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.tbi[0][1].endsWith(".tbi") } + ) + } + + } + + +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/norm/tests/main.nf.test.snap b/modules/nf-core/bcftools/norm/tests/main.nf.test.snap new file mode 100644 index 00000000..3be52116 --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/main.nf.test.snap @@ -0,0 +1,758 @@ +{ + "sarscov2 - [ vcf, tbi ], fasta - vcf_gz output - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.vcf:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.vcf:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:38:42.639095032" + }, + "sarscov2 - [ vcf, [] ], fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:38:05.448449893" + }, + "sarscov2 - [ vcf, tbi ], fasta - vcf output": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.vcf:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.vcf:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:37:12.741719961" + }, + "sarscov2 - [ vcf, [] ], fasta - vcf_gz_index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:39:22.875147941" + }, + "sarscov2 - [ vcf, tbi ], fasta - vcf_gz output": { + "content": [ + [ + [ + { + "id": "test" + }, + "test_norm.vcf:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + [ + + ], + [ + + ], + [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T08:15:23.38765384" + }, + "sarscov2 - [ vcf, [] ], fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.vcf.gz:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.vcf.gz:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:36:21.519977754" + }, + "sarscov2 - [ vcf, tbi ], fasta - vcf output -stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:38:27.8230994" + }, + "sarscov2 - [ vcf, tbi ], fasta - bcf_gz output": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.bcf:md5,f35545c26a788b5eb697d9c0490339d9" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.bcf:md5,f35545c26a788b5eb697d9c0490339d9" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:37:53.942403192" + }, + "sarscov2 - [ vcf, [] ], fasta - vcf_gz_index_csi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T13:56:05.3799488" + }, + "sarscov2 - [ vcf, [] ], fasta - vcf_gz_index_tbi": { + "content": [ + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + [ + + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T13:53:28.356741947" + }, + "sarscov2 - [ vcf, tbi ], fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.vcf.gz:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.vcf.gz:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:36:58.39445154" + }, + "sarscov2 - [ vcf, tbi ], fasta -stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:38:16.259516142" + }, + "sarscov2 - [ vcf, tbi ], fasta - bcf_gz output - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.bcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.bcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:39:10.503208929" + }, + "sarscov2 - [ vcf, [] ], fasta - vcf_gz_index": { + "content": [ + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T07:52:58.381931979" + }, + "sarscov2 - [ vcf, tbi ], fasta - bcf output - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.bcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.bcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:38:59.121377258" + }, + "sarscov2 - [ vcf, [] ], fasta - vcf_gz_index_tbi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T13:56:16.404380471" + }, + "sarscov2 - [ vcf, [] ], fasta - vcf_gz_index_csi": { + "content": [ + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz:md5,63e5adbaf3dd94550e9e3d7935dd28db" + ] + ], + [ + [ + { + "id": "test" + }, + "test_vcf.vcf.gz.csi" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T13:53:09.808834237" + }, + "sarscov2 - [ vcf, tbi ], fasta - bcf output": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test_norm.bcf.gz:md5,638c3c25bdd495c90ecbccb69ee77f07" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ], + "csi": [ + + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test_norm.bcf.gz:md5,638c3c25bdd495c90ecbccb69ee77f07" + ] + ], + "versions": [ + "versions.yml:md5,ff760495922469e56d0fc3372773000d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T14:37:42.141945244" + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/norm/tests/nextflow.bcf.config b/modules/nf-core/bcftools/norm/tests/nextflow.bcf.config new file mode 100644 index 00000000..b79af868 --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/nextflow.bcf.config @@ -0,0 +1,4 @@ +process { + ext.args = '-m -any --output-type b --no-version' + ext.prefix = "test_norm" +} diff --git a/modules/nf-core/bcftools/norm/tests/nextflow.bcf_gz.config b/modules/nf-core/bcftools/norm/tests/nextflow.bcf_gz.config new file mode 100644 index 00000000..f36f397c --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/nextflow.bcf_gz.config @@ -0,0 +1,4 @@ +process { + ext.args = '-m -any --output-type u --no-version' + ext.prefix = "test_norm" +} diff --git a/modules/nf-core/bcftools/norm/tests/nextflow.config b/modules/nf-core/bcftools/norm/tests/nextflow.config new file mode 100644 index 00000000..510803b4 --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/nextflow.config @@ -0,0 +1,4 @@ +process { + ext.args = '-m -any --no-version' + ext.prefix = "test_norm" +} diff --git a/modules/nf-core/bcftools/norm/tests/nextflow.vcf.config b/modules/nf-core/bcftools/norm/tests/nextflow.vcf.config new file mode 100644 index 00000000..10bf93e3 --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/nextflow.vcf.config @@ -0,0 +1,4 @@ +process { + ext.args = '-m -any --output-type v --no-version' + ext.prefix = "test_norm" +} diff --git a/modules/nf-core/bcftools/norm/tests/nextflow.vcf_gz.config b/modules/nf-core/bcftools/norm/tests/nextflow.vcf_gz.config new file mode 100644 index 00000000..b31dd2de --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/nextflow.vcf_gz.config @@ -0,0 +1,4 @@ +process { + ext.args = '-m -any --output-type z ---no-version' + ext.prefix = "test_norm" +} diff --git a/modules/nf-core/bcftools/norm/tests/tags.yml b/modules/nf-core/bcftools/norm/tests/tags.yml new file mode 100644 index 00000000..f6f5e356 --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/tags.yml @@ -0,0 +1,2 @@ +bcftools/norm: + - "modules/nf-core/bcftools/norm/**" diff --git a/modules/nf-core/bcftools/norm/tests/vcf_gz_index.config b/modules/nf-core/bcftools/norm/tests/vcf_gz_index.config new file mode 100644 index 00000000..7dd696ee --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/vcf_gz_index.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index --no-version" +} diff --git a/modules/nf-core/bcftools/norm/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/norm/tests/vcf_gz_index_csi.config new file mode 100644 index 00000000..aebffb6f --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/vcf_gz_index_csi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=csi --no-version" +} diff --git a/modules/nf-core/bcftools/norm/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/norm/tests/vcf_gz_index_tbi.config new file mode 100644 index 00000000..b192ae7d --- /dev/null +++ b/modules/nf-core/bcftools/norm/tests/vcf_gz_index_tbi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args = "--output-type z --write-index=tbi --no-version" +} diff --git a/modules/nf-core/bcftools/query/environment.yml b/modules/nf-core/bcftools/query/environment.yml index 4f9661ca..d8c4f4e4 100644 --- a/modules/nf-core/bcftools/query/environment.yml +++ b/modules/nf-core/bcftools/query/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/query/main.nf b/modules/nf-core/bcftools/query/main.nf index e9e73a6a..58019f4d 100644 --- a/modules/nf-core/bcftools/query/main.nf +++ b/modules/nf-core/bcftools/query/main.nf @@ -4,8 +4,8 @@ process BCFTOOLS_QUERY { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: tuple val(meta), path(vcf), path(tbi) diff --git a/modules/nf-core/bcftools/query/tests/main.nf.test b/modules/nf-core/bcftools/query/tests/main.nf.test index e9ea5a9d..39e67b35 100644 --- a/modules/nf-core/bcftools/query/tests/main.nf.test +++ b/modules/nf-core/bcftools/query/tests/main.nf.test @@ -18,8 +18,8 @@ nextflow_process { """ input[0] = [ [ id:'out' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] @@ -47,11 +47,11 @@ nextflow_process { """ input[0] = [ [ id:'out' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] - input[1] = file(params.test_data['sarscov2']['illumina']['test3_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_targets_tsv_gz'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.targets.tsv.gz', checkIfExists: true) input[3] = [] """ } @@ -76,8 +76,8 @@ nextflow_process { """ input[0] = [ [ id:'out' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] diff --git a/modules/nf-core/bcftools/query/tests/main.nf.test.snap b/modules/nf-core/bcftools/query/tests/main.nf.test.snap index a19f2053..3ead1f2c 100644 --- a/modules/nf-core/bcftools/query/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/query/tests/main.nf.test.snap @@ -10,19 +10,27 @@ ] ], [ - "versions.yml:md5,b40206d5437ce4b044d15c47ddd93d8e" + "versions.yml:md5,3d93ea9cd5d314743254618b49e4bd16" ] ], - "timestamp": "2023-11-29T14:21:05.191946862" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T15:15:44.916249758" }, "sarscov2 - [vcf, tbi], [], [], [] - stub": { "content": [ "out.txt", [ - "versions.yml:md5,b40206d5437ce4b044d15c47ddd93d8e" + "versions.yml:md5,3d93ea9cd5d314743254618b49e4bd16" ] ], - "timestamp": "2023-11-29T14:21:11.169603542" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T15:15:49.932359271" }, "sarscov2 - [vcf, tbi], [], [], []": { "content": [ @@ -35,9 +43,13 @@ ] ], [ - "versions.yml:md5,b40206d5437ce4b044d15c47ddd93d8e" + "versions.yml:md5,3d93ea9cd5d314743254618b49e4bd16" ] ], - "timestamp": "2023-11-29T14:20:59.335041418" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T15:15:39.930697926" } } \ No newline at end of file diff --git a/modules/nf-core/bcftools/reheader/bcftools-reheader.diff b/modules/nf-core/bcftools/reheader/bcftools-reheader.diff deleted file mode 100644 index 57637baa..00000000 --- a/modules/nf-core/bcftools/reheader/bcftools-reheader.diff +++ /dev/null @@ -1,19 +0,0 @@ -Changes in module 'nf-core/bcftools/reheader' ---- modules/nf-core/bcftools/reheader/main.nf -+++ modules/nf-core/bcftools/reheader/main.nf -@@ -31,10 +31,13 @@ - args2.contains("--output-type v") || args2.contains("-Ov") ? "vcf" : - "vcf" - """ -+ echo ${meta.sample} > sample.txt -+ - bcftools \\ - reheader \\ - $update_sequences \\ - $new_header \\ -+ --samples sample.txt \\ - $args \\ - --threads $task.cpus \\ - $vcf \\ - -************************************************************ diff --git a/modules/nf-core/bcftools/reheader/environment.yml b/modules/nf-core/bcftools/reheader/environment.yml index aab0dc92..48fd72c9 100644 --- a/modules/nf-core/bcftools/reheader/environment.yml +++ b/modules/nf-core/bcftools/reheader/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/reheader/main.nf b/modules/nf-core/bcftools/reheader/main.nf index 82527167..9cf6d0d3 100644 --- a/modules/nf-core/bcftools/reheader/main.nf +++ b/modules/nf-core/bcftools/reheader/main.nf @@ -4,8 +4,8 @@ process BCFTOOLS_REHEADER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: tuple val(meta), path(vcf), path(header), path(samples) @@ -13,6 +13,7 @@ process BCFTOOLS_REHEADER { output: tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}"), emit: vcf + tuple val(meta), path("*.{csi,tbi}") , emit: index, optional: true path "versions.yml" , emit: versions when: @@ -59,8 +60,16 @@ process BCFTOOLS_REHEADER { 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}.${extension} + ${create_cmd} ${prefix}.${extension} + ${create_index} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/reheader/meta.yml b/modules/nf-core/bcftools/reheader/meta.yml index 690d4ead..d903cc0f 100644 --- a/modules/nf-core/bcftools/reheader/meta.yml +++ b/modules/nf-core/bcftools/reheader/meta.yml @@ -53,6 +53,10 @@ output: type: file description: VCF with updated header, bgzipped per default pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - index: + type: file + description: Index of VCF with updated header + pattern: "*.{csi,tbi}" authors: - "@bjohnnyd" - "@jemten" diff --git a/modules/nf-core/bcftools/reheader/tests/main.nf.test b/modules/nf-core/bcftools/reheader/tests/main.nf.test index f3200cb3..96c1b7b0 100644 --- a/modules/nf-core/bcftools/reheader/tests/main.nf.test +++ b/modules/nf-core/bcftools/reheader/tests/main.nf.test @@ -17,13 +17,13 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), [], [] ] - input[1] = [ + input[1] = [ [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] """ } @@ -47,13 +47,13 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), [], [] ] - input[1] = [ + input[1] = [ [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] """ } @@ -68,6 +68,111 @@ nextflow_process { } + test("sarscov2 - [vcf, [], []], fai - vcf.gz output - index") { + + config "./vcf_gz_index.config" + when { + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.index.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.index[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [vcf, [], []], fai - vcf.gz output - csi index") { + + config "./vcf_gz_index_csi.config" + when { + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.index.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.index[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [vcf, [], []], fai - vcf.gz output - tbi index") { + + config "./vcf_gz_index_tbi.config" + when { + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf, + process.out.index.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match() }, + { assert process.out.index[0][1].endsWith(".tbi") } + ) + } + + } + test("sarscov2 - [vcf, [], []], fai - bcf output") { config "./bcf.config" @@ -77,13 +182,13 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), [], [] ] - input[1] = [ + input[1] = [ [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] """ } @@ -107,11 +212,11 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), [] ] - input[1] = [ + input[1] = [ [ id:'genome' ], // meta map [] ] @@ -137,15 +242,15 @@ nextflow_process { """ ch_no_samples = Channel.of([ [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), [] ]) ch_samples = Channel.of(["samples.txt", "new_name"]) .collectFile(newLine:true) input[0] = ch_no_samples.combine(ch_samples) - input[1] = [ + input[1] = [ [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] """ } @@ -170,13 +275,13 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), [], [] ] - input[1] = [ + input[1] = [ [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] """ } @@ -193,5 +298,97 @@ nextflow_process { } } + test("sarscov2 - [vcf, [], []], fai - vcf.gz output - index -stub") { + + options "-stub" + config "./vcf_gz_index.config" + when { + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, [], []], fai - vcf.gz output - csi index -stub") { + + options "-stub" + config "./vcf_gz_index_csi.config" + when { + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, [], []], fai - vcf.gz output - tbi index -stub") { + + options "-stub" + config "./vcf_gz_index_tbi.config" + when { + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [], + [] + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } } diff --git a/modules/nf-core/bcftools/reheader/tests/main.nf.test.snap b/modules/nf-core/bcftools/reheader/tests/main.nf.test.snap index 112736a1..87a3654a 100644 --- a/modules/nf-core/bcftools/reheader/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/reheader/tests/main.nf.test.snap @@ -1,4 +1,140 @@ { + "sarscov2 - [vcf, [], []], fai - vcf.gz output - tbi index": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T10:09:05.955833763" + }, + "sarscov2 - [vcf, [], []], fai - vcf.gz output - index -stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ], + "index": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T09:52:41.444952182" + }, + "sarscov2 - [vcf, [], []], fai - vcf.gz output - tbi index -stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ], + "index": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T09:53:04.314827944" + }, "sarscov2 - [vcf, [], []], fai - vcf output": { "content": [ { @@ -12,7 +148,13 @@ ] ], "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + + ], + "2": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ], + "index": [ + ], "vcf": [ [ @@ -24,11 +166,15 @@ ] ], "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" ] } ], - "timestamp": "2023-11-29T13:05:44.058376693" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T09:50:41.983008108" }, "sarscov2 - [vcf, [], []], fai - bcf output": { "content": [ @@ -39,11 +185,17 @@ "id": "test", "single_end": false }, - "tested.bcf.gz:md5,c31d9afd8614832c2a46d9a55682c97a" + "tested.bcf.gz:md5,c8a304c8d2892039201154153c8cd536" ] ], "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + + ], + "2": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ], + "index": [ + ], "vcf": [ [ @@ -51,15 +203,19 @@ "id": "test", "single_end": false }, - "tested.bcf.gz:md5,c31d9afd8614832c2a46d9a55682c97a" + "tested.bcf.gz:md5,c8a304c8d2892039201154153c8cd536" ] ], "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" ] } ], - "timestamp": "2023-11-29T13:06:03.793372514" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T09:51:43.072513252" }, "sarscov2 - [vcf, [], []], fai - vcf.gz output": { "content": [ @@ -70,11 +226,17 @@ "id": "test", "single_end": false }, - "tested.vcf.gz:md5,a1e45fe6d2b386fc2611766e5d2937ee" + "tested.vcf.gz:md5,8e722884ffb75155212a3fc053918766" ] ], "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + + ], + "2": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ], + "index": [ + ], "vcf": [ [ @@ -82,24 +244,145 @@ "id": "test", "single_end": false }, - "tested.vcf.gz:md5,a1e45fe6d2b386fc2611766e5d2937ee" + "tested.vcf.gz:md5,8e722884ffb75155212a3fc053918766" ] ], "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" ] } ], - "timestamp": "2023-11-29T13:05:53.954090441" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T09:50:53.055630152" + }, + "sarscov2 - [vcf, [], []], fai - vcf.gz output - index": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi" + ] + ], + [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T10:08:37.999924355" + }, + "sarscov2 - [vcf, [], []], fai - vcf.gz output - csi index -stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ], + "index": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T09:52:52.512269206" }, "sarscov2 - [vcf, [], []], fai - stub": { "content": [ "tested.vcf", [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" ] ], - "timestamp": "2023-11-29T13:06:33.549685303" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T15:16:36.337112514" + }, + "sarscov2 - [vcf, [], []], fai - vcf.gz output - csi index": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test_vcf.vcf.gz.csi" + ] + ], + [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T10:08:55.434831174" }, "sarscov2 - [vcf, [], samples], fai": { "content": [ @@ -114,7 +397,13 @@ ] ], "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + + ], + "2": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ], + "index": [ + ], "vcf": [ [ @@ -126,11 +415,15 @@ ] ], "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" ] } ], - "timestamp": "2023-11-29T13:06:23.474745156" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T09:52:12.216002665" }, "sarscov2 - [vcf, header, []], []": { "content": [ @@ -145,7 +438,13 @@ ] ], "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + + ], + "2": [ + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" + ], + "index": [ + ], "vcf": [ [ @@ -157,10 +456,14 @@ ] ], "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" + "versions.yml:md5,486e3d4ebc1dbf5c0a4dfaebae12ea34" ] } ], - "timestamp": "2023-11-29T13:06:13.841648691" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-03T09:51:54.062386022" } } \ No newline at end of file diff --git a/modules/nf-core/bcftools/reheader/tests/vcf_gz_index.config b/modules/nf-core/bcftools/reheader/tests/vcf_gz_index.config new file mode 100644 index 00000000..1e050ec7 --- /dev/null +++ b/modules/nf-core/bcftools/reheader/tests/vcf_gz_index.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args2 = "--output-type z --write-index --no-version" +} diff --git a/modules/nf-core/bcftools/reheader/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/reheader/tests/vcf_gz_index_csi.config new file mode 100644 index 00000000..536e4b42 --- /dev/null +++ b/modules/nf-core/bcftools/reheader/tests/vcf_gz_index_csi.config @@ -0,0 +1,4 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args2 = "--output-type z --write-index=csi --no-version" +} diff --git a/modules/nf-core/bcftools/reheader/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/reheader/tests/vcf_gz_index_tbi.config new file mode 100644 index 00000000..91a80db7 --- /dev/null +++ b/modules/nf-core/bcftools/reheader/tests/vcf_gz_index_tbi.config @@ -0,0 +1,5 @@ +process { + ext.prefix = { "${meta.id}_vcf" } + ext.args2 = "--output-type z --write-index=tbi --no-version" + +} diff --git a/modules/nf-core/bcftools/stats/environment.yml b/modules/nf-core/bcftools/stats/environment.yml index 1a969528..128fe204 100644 --- a/modules/nf-core/bcftools/stats/environment.yml +++ b/modules/nf-core/bcftools/stats/environment.yml @@ -4,4 +4,5 @@ channels: - bioconda - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 + - bioconda::htslib=1.20 diff --git a/modules/nf-core/bcftools/stats/main.nf b/modules/nf-core/bcftools/stats/main.nf index ffa1df64..20e5da77 100644 --- a/modules/nf-core/bcftools/stats/main.nf +++ b/modules/nf-core/bcftools/stats/main.nf @@ -4,8 +4,8 @@ process BCFTOOLS_STATS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'biocontainers/bcftools:1.18--h8b25389_0' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" input: tuple val(meta), path(vcf), path(tbi) diff --git a/modules/nf-core/bcftools/stats/tests/main.nf.test b/modules/nf-core/bcftools/stats/tests/main.nf.test new file mode 100644 index 00000000..be618b0b --- /dev/null +++ b/modules/nf-core/bcftools/stats/tests/main.nf.test @@ -0,0 +1,182 @@ +nextflow_process { + + name "Test Process BCFTOOLS_STATS" + script "../main.nf" + process "BCFTOOLS_STATS" + + tag "modules" + tag "modules_nfcore" + tag "bcftools" + tag "bcftools/stats" + + test("sarscov2 - vcf_gz") { + + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + []] + input[1] = [ [], [] ] + input[2] = [ [], [] ] + input[3] = [ [], [] ] + input[4] = [ [], [] ] + input[5] = [ [], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions") }, + { assert snapshot(file(process.out.stats.get(0).get(1)).readLines()[0..5]).match() }, + ) + } + + } + + test("sarscov2 - vcf_gz - regions") { + + when { + process { + """ + input[0] = [ [ id:'regions_test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] + input[1] = [ [id:'regions_test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz', checkIfExists: true) ] + input[2] = [ [], [] ] + input[3] = [ [], [] ] + input[4] = [ [], [] ] + input[5] = [ [], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("regions_versions") }, + { assert snapshot(file(process.out.stats.get(0).get(1)).readLines()[0..5]).match() }, + ) + } + + } + + test("sarscov2 - vcf_gz - targets") { + + when { + process { + """ + input[0] = [ [ id:'targets_test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] ] + input[1] = [ [], [] ] + input[2] = [ [id:'targets_test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.targets.tsv.gz', checkIfExists: true) + ] + input[3] = [ [], [] ] + input[4] = [ [], [] ] + input[5] = [ [], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("targets_versions") }, + { assert snapshot(file(process.out.stats.get(0).get(1)).readLines()[0..5]).match() }, + ) + } + + } + + test("sarscov2 - vcf_gz - exons") { + + when { + process { + """ + input[0] = [ [ id:'exon_test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] ] + input[1] = [ [], [] ] + input[2] = [ [], [] ] + input[3] = [ [], [] ] + input[4] = [ [id: "exon_test"], + file(params.modules_testdata_base_path + 'delete_me/bcftools/stats/exons.tsv.gz', checkIfExists: true) ] + input[5] = [ [], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("exon_versions") }, + { assert snapshot(file(process.out.stats.get(0).get(1)).readLines()[0..5]).match() }, + ) + } + + } + + test("sarscov2 - vcf_gz - reference") { + + when { + process { + """ + input[0] = [ [ id:'ref_test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + [] ] + input[1] = [ [], [] ] + input[2] = [ [], [] ] + input[3] = [ [], [] ] + input[4] = [ [], [] ] + input[5] = [ [id: 'ref_test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("ref_versions") }, + { assert snapshot(file(process.out.stats.get(0).get(1)).readLines()[0..5]).match() }, + ) + } + + } + + + test("sarscov2 - vcf_gz - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + []] + input[1] = [ [], [] ] + input[2] = [ [], [] ] + input[3] = [ [], [] ] + input[4] = [ [], [] ] + input[5] = [ [], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/stats/tests/main.nf.test.snap b/modules/nf-core/bcftools/stats/tests/main.nf.test.snap new file mode 100644 index 00000000..cd8cff6d --- /dev/null +++ b/modules/nf-core/bcftools/stats/tests/main.nf.test.snap @@ -0,0 +1,180 @@ +{ + "sarscov2 - vcf_gz - reference": { + "content": [ + [ + "# This file was produced by bcftools stats (1.20+htslib-1.20) and can be plotted using plot-vcfstats.", + "# The command line was:\tbcftools stats --fasta-ref genome.fasta test.vcf.gz", + "#", + "# Definition of sets:", + "# ID\t[2]id\t[3]tab-separated file names", + "ID\t0\ttest.vcf.gz" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:14:35.506777837" + }, + "sarscov2 - vcf_gz - exons": { + "content": [ + [ + "# This file was produced by bcftools stats (1.20+htslib-1.20) and can be plotted using plot-vcfstats.", + "# The command line was:\tbcftools stats --exons exons.tsv.gz test.vcf.gz", + "#", + "# Definition of sets:", + "# ID\t[2]id\t[3]tab-separated file names", + "ID\t0\ttest.vcf.gz" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:14:30.57486244" + }, + "versions": { + "content": [ + [ + "versions.yml:md5,17cdf9d1ad31f6b1f5935dfcc9fe7b9a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:16:27.637515559" + }, + "sarscov2 - vcf_gz - targets": { + "content": [ + [ + "# This file was produced by bcftools stats (1.20+htslib-1.20) and can be plotted using plot-vcfstats.", + "# The command line was:\tbcftools stats --targets-file test2.targets.tsv.gz test.vcf.gz", + "#", + "# Definition of sets:", + "# ID\t[2]id\t[3]tab-separated file names", + "ID\t0\ttest.vcf.gz" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:14:25.732997442" + }, + "regions_versions": { + "content": [ + [ + "versions.yml:md5,17cdf9d1ad31f6b1f5935dfcc9fe7b9a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:16:32.559884458" + }, + "targets_versions": { + "content": [ + [ + "versions.yml:md5,17cdf9d1ad31f6b1f5935dfcc9fe7b9a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:16:37.512009805" + }, + "sarscov2 - vcf_gz - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bcftools_stats.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,17cdf9d1ad31f6b1f5935dfcc9fe7b9a" + ], + "stats": [ + [ + { + "id": "test" + }, + "test.bcftools_stats.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,17cdf9d1ad31f6b1f5935dfcc9fe7b9a" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-03T11:57:09.614976125" + }, + "exon_versions": { + "content": [ + [ + "versions.yml:md5,17cdf9d1ad31f6b1f5935dfcc9fe7b9a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:16:42.347397266" + }, + "ref_versions": { + "content": [ + [ + "versions.yml:md5,17cdf9d1ad31f6b1f5935dfcc9fe7b9a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:16:47.26823622" + }, + "sarscov2 - vcf_gz": { + "content": [ + [ + "# This file was produced by bcftools stats (1.20+htslib-1.20) and can be plotted using plot-vcfstats.", + "# The command line was:\tbcftools stats test.vcf.gz", + "#", + "# Definition of sets:", + "# ID\t[2]id\t[3]tab-separated file names", + "ID\t0\ttest.vcf.gz" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:16:27.670416598" + }, + "sarscov2 - vcf_gz - regions": { + "content": [ + [ + "# This file was produced by bcftools stats (1.20+htslib-1.20) and can be plotted using plot-vcfstats.", + "# The command line was:\tbcftools stats --regions-file test3.vcf.gz test.vcf.gz", + "#", + "# Definition of sets:", + "# ID\t[2]id\t[3]tab-separated file names", + "ID\t0\ttest.vcf.gz" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T18:14:20.759094062" + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/stats/tests/tags.yml b/modules/nf-core/bcftools/stats/tests/tags.yml new file mode 100644 index 00000000..53c12d92 --- /dev/null +++ b/modules/nf-core/bcftools/stats/tests/tags.yml @@ -0,0 +1,2 @@ +bcftools/stats: + - "modules/nf-core/bcftools/stats/**" diff --git a/modules/nf-core/ensemblvep/download/ensemblvep-download.diff b/modules/nf-core/ensemblvep/download/ensemblvep-download.diff deleted file mode 100644 index 954d28c3..00000000 --- a/modules/nf-core/ensemblvep/download/ensemblvep-download.diff +++ /dev/null @@ -1,25 +0,0 @@ -Changes in module 'nf-core/ensemblvep/download' ---- modules/nf-core/ensemblvep/download/main.nf -+++ modules/nf-core/ensemblvep/download/main.nf -@@ -4,8 +4,8 @@ - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/ensembl-vep:110.0--pl5321h2a3209d_0' : -- 'biocontainers/ensembl-vep:110.0--pl5321h2a3209d_0' }" -+ 'https://depot.galaxyproject.org/singularity/ensembl-vep:105.0--pl5321h4a94de4_1' : -+ 'biocontainers/ensembl-vep:105.0--pl5321h4a94de4_1' }" - - input: - tuple val(meta), val(assembly), val(species), val(cache_version) - ---- modules/nf-core/ensemblvep/download/environment.yml -+++ modules/nf-core/ensemblvep/download/environment.yml -@@ -4,4 +4,4 @@ - - bioconda - - defaults - dependencies: -- - bioconda::ensembl-vep=110.0 -+ - bioconda::ensembl-vep=105.0 - -************************************************************ diff --git a/modules/nf-core/ensemblvep/download/environment.yml b/modules/nf-core/ensemblvep/download/environment.yml index adba76e8..91564cce 100644 --- a/modules/nf-core/ensemblvep/download/environment.yml +++ b/modules/nf-core/ensemblvep/download/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::ensembl-vep=105.0 + - bioconda::ensembl-vep=112.0 diff --git a/modules/nf-core/ensemblvep/download/main.nf b/modules/nf-core/ensemblvep/download/main.nf index f6ed5872..555c3c66 100644 --- a/modules/nf-core/ensemblvep/download/main.nf +++ b/modules/nf-core/ensemblvep/download/main.nf @@ -4,24 +4,25 @@ process ENSEMBLVEP_DOWNLOAD { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ensembl-vep:105.0--pl5321h4a94de4_1' : - 'biocontainers/ensembl-vep:105.0--pl5321h4a94de4_1' }" + 'https://depot.galaxyproject.org/singularity/ensembl-vep:112.0--pl5321h2a3209d_0' : + 'biocontainers/ensembl-vep:112.0--pl5321h2a3209d_0' }" input: tuple val(meta), val(assembly), val(species), val(cache_version) output: - tuple val(meta), path("vep_cache"), emit: cache - path "versions.yml" , emit: versions + tuple val(meta), path(prefix), emit: cache + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: 'vep_cache' """ vep_install \\ - --CACHEDIR vep_cache \\ + --CACHEDIR $prefix \\ --SPECIES $species \\ --ASSEMBLY $assembly \\ --CACHE_VERSION $cache_version \\ @@ -34,8 +35,9 @@ process ENSEMBLVEP_DOWNLOAD { """ stub: + prefix = task.ext.prefix ?: 'vep_cache' """ - mkdir vep_cache + mkdir $prefix cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/ensemblvep/download/tests/main.nf.test b/modules/nf-core/ensemblvep/download/tests/main.nf.test new file mode 100644 index 00000000..ac41cc3f --- /dev/null +++ b/modules/nf-core/ensemblvep/download/tests/main.nf.test @@ -0,0 +1,60 @@ +nextflow_process { + + name "Test Process ENSEMBLVEP_DOWNLOAD" + script "../main.nf" + process "ENSEMBLVEP_DOWNLOAD" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "ensemblvep" + tag "ensemblvep/download" + + test("celegans - download") { + + when { + process { + """ + input[0] = Channel.of([ + [id:"112_WBcel235"], + params.vep_genome, + params.vep_species, + params.vep_cache_version + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("celegans - download - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [id:"112_WBcel235"], + params.vep_genome, + params.vep_species, + params.vep_cache_version + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/ensemblvep/download/tests/main.nf.test.snap b/modules/nf-core/ensemblvep/download/tests/main.nf.test.snap new file mode 100644 index 00000000..9e303c54 --- /dev/null +++ b/modules/nf-core/ensemblvep/download/tests/main.nf.test.snap @@ -0,0 +1,322 @@ +{ + "celegans - download": { + "content": [ + { + "0": [ + [ + { + "id": "112_WBcel235" + }, + [ + [ + [ + [ + "1-1000000.gz:md5,c7df2324c613caafe70024bb156b077c", + "10000001-11000000.gz:md5,baee612beb1fc7b931d1b4c34df9a366", + "1000001-2000000.gz:md5,4fefec2bbbcdc22022ba22e2b36fe118", + "11000001-12000000.gz:md5,e06df8391870440be75a3a0fed05ad29", + "12000001-13000000.gz:md5,3abd252ef8e0c79d7be07dfe7503c38b", + "13000001-14000000.gz:md5,9b20be645c68c1ef16f0aaadc9d1899d", + "14000001-15000000.gz:md5,c80817caa2a893c8059ad9a66e1c2c1a", + "15000001-16000000.gz:md5,595cf5694cba18c82cff8f0ab882c08a", + "2000001-3000000.gz:md5,b1e24d27d0ef74c85926c1fad795e07b", + "3000001-4000000.gz:md5,ec32b7b8263ee176c97269a34b77232d", + "4000001-5000000.gz:md5,017e3d44b66c6b343c6b9d2265f4a539", + "5000001-6000000.gz:md5,d0723825e78aceac2345548928e3c2b9", + "6000001-7000000.gz:md5,b73797333b2493592b4ebfe72c817c2d", + "7000001-8000000.gz:md5,665647b964cd5a66d8d02aa5104ca3be", + "8000001-9000000.gz:md5,d98e077bf36e071f651c9a5f7661f294", + "9000001-10000000.gz:md5,828987069dd14db0ecf1f18c05b83ea9" + ], + [ + "1-1000000.gz:md5,f9c71b88d2173861735f6bbb1628fb7b", + "10000001-11000000.gz:md5,caef13b68ca547ed551aef70c6d35045", + "1000001-2000000.gz:md5,493c2f368edeb6bbfe7ad237aff36c4b", + "11000001-12000000.gz:md5,65d6e583c532ac05033663d0fa52952c", + "12000001-13000000.gz:md5,fbba6aa2b41aa4d3e8a5bed643361d47", + "13000001-14000000.gz:md5,dcb85a41d106a9e34ed2835992aa8610", + "14000001-15000000.gz:md5,548e5bbf055f74d428538f1ce9a3c041", + "15000001-16000000.gz:md5,6f351d7bfac444405209c703671861f7", + "2000001-3000000.gz:md5,5fa9ad99eb57cabbbda8684df39f4e88", + "3000001-4000000.gz:md5,2cef090c5bb01f68155bb21bc694a323", + "4000001-5000000.gz:md5,beca6d18414146e139e27912458a8dbf", + "5000001-6000000.gz:md5,9d5d0f77c8057074063e59b40f9bea7c", + "6000001-7000000.gz:md5,41f6375102c67e2621f736f94998c037", + "7000001-8000000.gz:md5,926cd39b81e9c98b61afe5eaed6196da", + "8000001-9000000.gz:md5,a9d32d8678153eca5af93e0cc309568b", + "9000001-10000000.gz:md5,6eeb83014cd638a29d03c92dec5407dc" + ], + [ + "1-1000000.gz:md5,ea81b2b4955dd33fd770dc8ccc3f0af5", + "10000001-11000000.gz:md5,8c71450edf69cc9eb48aa832726cd986", + "1000001-2000000.gz:md5,3fc788203586e8f22f63b7655a4bcd2f", + "11000001-12000000.gz:md5,acaccb3801da9192cb211817c719c50c", + "12000001-13000000.gz:md5,0707f54bc90449303fa212e2389649b7", + "13000001-14000000.gz:md5,11701639fbdbf22fd0c795a23b995e10", + "2000001-3000000.gz:md5,d53ff5ffaa9bfb772edaf5affdb73beb", + "3000001-4000000.gz:md5,0de451e2296ac119319d0d3cedd4870f", + "4000001-5000000.gz:md5,37c248c0b8488a535bda18c318770dd4", + "5000001-6000000.gz:md5,3a4fb690e809c1fe9fe675bc5d8dc480", + "6000001-7000000.gz:md5,2ff968944165b45475799971da2b2715", + "7000001-8000000.gz:md5,d172ac8248f67a33f18a788c32cf02ab", + "8000001-9000000.gz:md5,a9ecda1e1cb3d81d43b0343169744d5a", + "9000001-10000000.gz:md5,ca8bd58fe35b597709a4de86dbe01c78" + ], + [ + "1-1000000.gz:md5,189037eb5ce432a41c198b69fa11dba1", + "10000001-11000000.gz:md5,8cbb19d243093b735f055a7e7d8506b4", + "1000001-2000000.gz:md5,f634365a563f459fd4a91e139a962620", + "11000001-12000000.gz:md5,3d05e3298731cfa83a0c8e7e14708fd5", + "12000001-13000000.gz:md5,2678ad4b5516f90af54e9460bfe9cdf8", + "13000001-14000000.gz:md5,a885dd1cb05d981ddc5f522e0ead4850", + "14000001-15000000.gz:md5,bc540a102a909b80c6e4b1374e1be69e", + "15000001-16000000.gz:md5,a49f32c55dc2dcb36dcdaffe061f6677", + "16000001-17000000.gz:md5,250ca77e8ec4f6c001c4797a8d09d1d5", + "17000001-18000000.gz:md5,4067d8d30595d4700f3eba5aee92b785", + "2000001-3000000.gz:md5,07ecf8c7e69931af567e94f48e51462e", + "3000001-4000000.gz:md5,e1cfaf343f111867baee5b01060f7e22", + "4000001-5000000.gz:md5,de905e75eb386d7a3dcbc76d69a6e439", + "5000001-6000000.gz:md5,36f2fd0fa37f36485dbc90054f3deeee", + "6000001-7000000.gz:md5,b0e1f3179f2a527c3187aa08942246ed", + "7000001-8000000.gz:md5,ea93a4d60f2a538d6e7335b14d09f0b6", + "8000001-9000000.gz:md5,8b0443d2833dacd4f82023b16be84da1", + "9000001-10000000.gz:md5,54eff9f655ae0f1c18ba6efeeefac5e8" + ], + [ + "1-1000000.gz:md5,64e3e539e8af16775cc4657c605cc585" + ], + [ + "1-1000000.gz:md5,0874a0bc852217ed68364921662e4b9b", + "10000001-11000000.gz:md5,46eb3254cf0452bcc8fed5d279bcef35", + "1000001-2000000.gz:md5,2d313518641f5efbe09d1ffd4e4523d5", + "11000001-12000000.gz:md5,2f6a28eb26832af84c9d5c40607ffa39", + "12000001-13000000.gz:md5,3dc37f2082fc45663a88aad0f67506e6", + "13000001-14000000.gz:md5,cd5185227b576640454922e060f00525", + "14000001-15000000.gz:md5,af9fe314326ae20b99a89a8aaa45d0d0", + "15000001-16000000.gz:md5,ff02629cfde390e7eed097296cea0ccb", + "16000001-17000000.gz:md5,7cb1e4babe5b867358bf4f49d9a3d58e", + "17000001-18000000.gz:md5,09588f85610505fdb95117932661a5b9", + "18000001-19000000.gz:md5,cba448de43edcee8d423c1278a76c61f", + "19000001-20000000.gz:md5,af1ee9201a78d537e6df555d3690277d", + "20000001-21000000.gz:md5,1a63895964ba6101c0109990213ec17e", + "2000001-3000000.gz:md5,02d0dc41894283e82ce2da023eb81663", + "3000001-4000000.gz:md5,64d9e97703894f5051349da978e0a3cf", + "4000001-5000000.gz:md5,1b69fdb6993a70e8f6688a03b4626a00", + "5000001-6000000.gz:md5,c4b0e3d33aa451e081ccef0dbbfcc1f5", + "6000001-7000000.gz:md5,26425e131cacb5ba8d68f6e9de39094c", + "7000001-8000000.gz:md5,1c0fcee419cccd5b4268329f7d001d2a", + "8000001-9000000.gz:md5,7515ee504db75bccbdd9d282429a999b", + "9000001-10000000.gz:md5,8647b733b4eba24aaf21b3d983461b1b" + ], + [ + "1-1000000.gz:md5,a252da6c7c69644ff29276d15796f457", + "10000001-11000000.gz:md5,e7376cbf07ee7fd1fb8214c9bc739e64", + "1000001-2000000.gz:md5,566d7342a45728a784af7ba5c2e630cb", + "11000001-12000000.gz:md5,bf44ab823c1d51cb7841958761a7cd4d", + "12000001-13000000.gz:md5,ec1494ff61067a130c05afabee046164", + "13000001-14000000.gz:md5,2b24e155be6ae36a62e7ea3b1a0a3118", + "14000001-15000000.gz:md5,3215b3d56cd19a305c8d8f2d1f517825", + "15000001-16000000.gz:md5,6fa2abd0ff33750387780798dc6bd821", + "16000001-17000000.gz:md5,c2a1e5012a895ab95662d83d387f641a", + "17000001-18000000.gz:md5,eb398d2f8bc90b519a82588b8dcbad60", + "2000001-3000000.gz:md5,b78320f16b4caafe9708f95b69668265", + "3000001-4000000.gz:md5,e04cd4871f53108aaa780dbb3718b7f7", + "4000001-5000000.gz:md5,47bd8029ef9fffb5ee2ebb0fa8b91110", + "5000001-6000000.gz:md5,a6c404381dab5da8453b265fb0f374c3", + "6000001-7000000.gz:md5,417b7a492977b76f823634128e3ea2da", + "7000001-8000000.gz:md5,d0f9d030f7f4ad834d1538c7aaace5cf", + "8000001-9000000.gz:md5,58b2eca4ddeea8d2746242b18be1dba4", + "9000001-10000000.gz:md5,62cf6898fa164616c36117472ec10ce9" + ], + "chr_synonyms.txt:md5,c7df2db509525b8ff0d95ef927882764", + "info.txt:md5,33ccb74a030a9a345051628c337cb8af" + ] + ] + ] + ] + ], + "1": [ + "versions.yml:md5,e32852e9cba2a298b7518ce610011b14" + ], + "cache": [ + [ + { + "id": "112_WBcel235" + }, + [ + [ + [ + [ + "1-1000000.gz:md5,c7df2324c613caafe70024bb156b077c", + "10000001-11000000.gz:md5,baee612beb1fc7b931d1b4c34df9a366", + "1000001-2000000.gz:md5,4fefec2bbbcdc22022ba22e2b36fe118", + "11000001-12000000.gz:md5,e06df8391870440be75a3a0fed05ad29", + "12000001-13000000.gz:md5,3abd252ef8e0c79d7be07dfe7503c38b", + "13000001-14000000.gz:md5,9b20be645c68c1ef16f0aaadc9d1899d", + "14000001-15000000.gz:md5,c80817caa2a893c8059ad9a66e1c2c1a", + "15000001-16000000.gz:md5,595cf5694cba18c82cff8f0ab882c08a", + "2000001-3000000.gz:md5,b1e24d27d0ef74c85926c1fad795e07b", + "3000001-4000000.gz:md5,ec32b7b8263ee176c97269a34b77232d", + "4000001-5000000.gz:md5,017e3d44b66c6b343c6b9d2265f4a539", + "5000001-6000000.gz:md5,d0723825e78aceac2345548928e3c2b9", + "6000001-7000000.gz:md5,b73797333b2493592b4ebfe72c817c2d", + "7000001-8000000.gz:md5,665647b964cd5a66d8d02aa5104ca3be", + "8000001-9000000.gz:md5,d98e077bf36e071f651c9a5f7661f294", + "9000001-10000000.gz:md5,828987069dd14db0ecf1f18c05b83ea9" + ], + [ + "1-1000000.gz:md5,f9c71b88d2173861735f6bbb1628fb7b", + "10000001-11000000.gz:md5,caef13b68ca547ed551aef70c6d35045", + "1000001-2000000.gz:md5,493c2f368edeb6bbfe7ad237aff36c4b", + "11000001-12000000.gz:md5,65d6e583c532ac05033663d0fa52952c", + "12000001-13000000.gz:md5,fbba6aa2b41aa4d3e8a5bed643361d47", + "13000001-14000000.gz:md5,dcb85a41d106a9e34ed2835992aa8610", + "14000001-15000000.gz:md5,548e5bbf055f74d428538f1ce9a3c041", + "15000001-16000000.gz:md5,6f351d7bfac444405209c703671861f7", + "2000001-3000000.gz:md5,5fa9ad99eb57cabbbda8684df39f4e88", + "3000001-4000000.gz:md5,2cef090c5bb01f68155bb21bc694a323", + "4000001-5000000.gz:md5,beca6d18414146e139e27912458a8dbf", + "5000001-6000000.gz:md5,9d5d0f77c8057074063e59b40f9bea7c", + "6000001-7000000.gz:md5,41f6375102c67e2621f736f94998c037", + "7000001-8000000.gz:md5,926cd39b81e9c98b61afe5eaed6196da", + "8000001-9000000.gz:md5,a9d32d8678153eca5af93e0cc309568b", + "9000001-10000000.gz:md5,6eeb83014cd638a29d03c92dec5407dc" + ], + [ + "1-1000000.gz:md5,ea81b2b4955dd33fd770dc8ccc3f0af5", + "10000001-11000000.gz:md5,8c71450edf69cc9eb48aa832726cd986", + "1000001-2000000.gz:md5,3fc788203586e8f22f63b7655a4bcd2f", + "11000001-12000000.gz:md5,acaccb3801da9192cb211817c719c50c", + "12000001-13000000.gz:md5,0707f54bc90449303fa212e2389649b7", + "13000001-14000000.gz:md5,11701639fbdbf22fd0c795a23b995e10", + "2000001-3000000.gz:md5,d53ff5ffaa9bfb772edaf5affdb73beb", + "3000001-4000000.gz:md5,0de451e2296ac119319d0d3cedd4870f", + "4000001-5000000.gz:md5,37c248c0b8488a535bda18c318770dd4", + "5000001-6000000.gz:md5,3a4fb690e809c1fe9fe675bc5d8dc480", + "6000001-7000000.gz:md5,2ff968944165b45475799971da2b2715", + "7000001-8000000.gz:md5,d172ac8248f67a33f18a788c32cf02ab", + "8000001-9000000.gz:md5,a9ecda1e1cb3d81d43b0343169744d5a", + "9000001-10000000.gz:md5,ca8bd58fe35b597709a4de86dbe01c78" + ], + [ + "1-1000000.gz:md5,189037eb5ce432a41c198b69fa11dba1", + "10000001-11000000.gz:md5,8cbb19d243093b735f055a7e7d8506b4", + "1000001-2000000.gz:md5,f634365a563f459fd4a91e139a962620", + "11000001-12000000.gz:md5,3d05e3298731cfa83a0c8e7e14708fd5", + "12000001-13000000.gz:md5,2678ad4b5516f90af54e9460bfe9cdf8", + "13000001-14000000.gz:md5,a885dd1cb05d981ddc5f522e0ead4850", + "14000001-15000000.gz:md5,bc540a102a909b80c6e4b1374e1be69e", + "15000001-16000000.gz:md5,a49f32c55dc2dcb36dcdaffe061f6677", + "16000001-17000000.gz:md5,250ca77e8ec4f6c001c4797a8d09d1d5", + "17000001-18000000.gz:md5,4067d8d30595d4700f3eba5aee92b785", + "2000001-3000000.gz:md5,07ecf8c7e69931af567e94f48e51462e", + "3000001-4000000.gz:md5,e1cfaf343f111867baee5b01060f7e22", + "4000001-5000000.gz:md5,de905e75eb386d7a3dcbc76d69a6e439", + "5000001-6000000.gz:md5,36f2fd0fa37f36485dbc90054f3deeee", + "6000001-7000000.gz:md5,b0e1f3179f2a527c3187aa08942246ed", + "7000001-8000000.gz:md5,ea93a4d60f2a538d6e7335b14d09f0b6", + "8000001-9000000.gz:md5,8b0443d2833dacd4f82023b16be84da1", + "9000001-10000000.gz:md5,54eff9f655ae0f1c18ba6efeeefac5e8" + ], + [ + "1-1000000.gz:md5,64e3e539e8af16775cc4657c605cc585" + ], + [ + "1-1000000.gz:md5,0874a0bc852217ed68364921662e4b9b", + "10000001-11000000.gz:md5,46eb3254cf0452bcc8fed5d279bcef35", + "1000001-2000000.gz:md5,2d313518641f5efbe09d1ffd4e4523d5", + "11000001-12000000.gz:md5,2f6a28eb26832af84c9d5c40607ffa39", + "12000001-13000000.gz:md5,3dc37f2082fc45663a88aad0f67506e6", + "13000001-14000000.gz:md5,cd5185227b576640454922e060f00525", + "14000001-15000000.gz:md5,af9fe314326ae20b99a89a8aaa45d0d0", + "15000001-16000000.gz:md5,ff02629cfde390e7eed097296cea0ccb", + "16000001-17000000.gz:md5,7cb1e4babe5b867358bf4f49d9a3d58e", + "17000001-18000000.gz:md5,09588f85610505fdb95117932661a5b9", + "18000001-19000000.gz:md5,cba448de43edcee8d423c1278a76c61f", + "19000001-20000000.gz:md5,af1ee9201a78d537e6df555d3690277d", + "20000001-21000000.gz:md5,1a63895964ba6101c0109990213ec17e", + "2000001-3000000.gz:md5,02d0dc41894283e82ce2da023eb81663", + "3000001-4000000.gz:md5,64d9e97703894f5051349da978e0a3cf", + "4000001-5000000.gz:md5,1b69fdb6993a70e8f6688a03b4626a00", + "5000001-6000000.gz:md5,c4b0e3d33aa451e081ccef0dbbfcc1f5", + "6000001-7000000.gz:md5,26425e131cacb5ba8d68f6e9de39094c", + "7000001-8000000.gz:md5,1c0fcee419cccd5b4268329f7d001d2a", + "8000001-9000000.gz:md5,7515ee504db75bccbdd9d282429a999b", + "9000001-10000000.gz:md5,8647b733b4eba24aaf21b3d983461b1b" + ], + [ + "1-1000000.gz:md5,a252da6c7c69644ff29276d15796f457", + "10000001-11000000.gz:md5,e7376cbf07ee7fd1fb8214c9bc739e64", + "1000001-2000000.gz:md5,566d7342a45728a784af7ba5c2e630cb", + "11000001-12000000.gz:md5,bf44ab823c1d51cb7841958761a7cd4d", + "12000001-13000000.gz:md5,ec1494ff61067a130c05afabee046164", + "13000001-14000000.gz:md5,2b24e155be6ae36a62e7ea3b1a0a3118", + "14000001-15000000.gz:md5,3215b3d56cd19a305c8d8f2d1f517825", + "15000001-16000000.gz:md5,6fa2abd0ff33750387780798dc6bd821", + "16000001-17000000.gz:md5,c2a1e5012a895ab95662d83d387f641a", + "17000001-18000000.gz:md5,eb398d2f8bc90b519a82588b8dcbad60", + "2000001-3000000.gz:md5,b78320f16b4caafe9708f95b69668265", + "3000001-4000000.gz:md5,e04cd4871f53108aaa780dbb3718b7f7", + "4000001-5000000.gz:md5,47bd8029ef9fffb5ee2ebb0fa8b91110", + "5000001-6000000.gz:md5,a6c404381dab5da8453b265fb0f374c3", + "6000001-7000000.gz:md5,417b7a492977b76f823634128e3ea2da", + "7000001-8000000.gz:md5,d0f9d030f7f4ad834d1538c7aaace5cf", + "8000001-9000000.gz:md5,58b2eca4ddeea8d2746242b18be1dba4", + "9000001-10000000.gz:md5,62cf6898fa164616c36117472ec10ce9" + ], + "chr_synonyms.txt:md5,c7df2db509525b8ff0d95ef927882764", + "info.txt:md5,33ccb74a030a9a345051628c337cb8af" + ] + ] + ] + ] + ], + "versions": [ + "versions.yml:md5,e32852e9cba2a298b7518ce610011b14" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-02T13:19:08.690863" + }, + "celegans - download - stub": { + "content": [ + { + "0": [ + [ + { + "id": "112_WBcel235" + }, + [ + + ] + ] + ], + "1": [ + "versions.yml:md5,e32852e9cba2a298b7518ce610011b14" + ], + "cache": [ + [ + { + "id": "112_WBcel235" + }, + [ + + ] + ] + ], + "versions": [ + "versions.yml:md5,e32852e9cba2a298b7518ce610011b14" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-02T13:19:23.308683" + } +} \ No newline at end of file diff --git a/modules/nf-core/ensemblvep/download/tests/nextflow.config b/modules/nf-core/ensemblvep/download/tests/nextflow.config new file mode 100644 index 00000000..9aa48164 --- /dev/null +++ b/modules/nf-core/ensemblvep/download/tests/nextflow.config @@ -0,0 +1,12 @@ +params { + vep_cache_version = "112" + vep_genome = "WBcel235" + vep_species = "caenorhabditis_elegans" +} + +process { + withName: ENSEMBLVEP_DOWNLOAD { + ext.args = '--AUTO c --CONVERT --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE' + ext.prefix = { "${params.vep_cache_version}_${params.vep_genome}" } + } +} diff --git a/modules/nf-core/ensemblvep/download/tests/tags.yml b/modules/nf-core/ensemblvep/download/tests/tags.yml new file mode 100644 index 00000000..26671f3d --- /dev/null +++ b/modules/nf-core/ensemblvep/download/tests/tags.yml @@ -0,0 +1,2 @@ +ensemblvep/download: + - "modules/nf-core/ensemblvep/download/**" diff --git a/modules/nf-core/gatk4/genotypegvcfs/main.nf b/modules/nf-core/gatk4/genotypegvcfs/main.nf index 3a9fbb4e..f180f749 100644 --- a/modules/nf-core/gatk4/genotypegvcfs/main.nf +++ b/modules/nf-core/gatk4/genotypegvcfs/main.nf @@ -8,12 +8,12 @@ process GATK4_GENOTYPEGVCFS { 'biocontainers/gatk4:4.5.0.0--py36hdfd78af_0' }" input: - tuple val(meta), path(gvcf), path(gvcf_index), path(intervals), path(intervals_index) - path fasta - path fai - path dict - path dbsnp - path dbsnp_tbi + tuple val(meta), path(input), path(gvcf_index), path(intervals), path(intervals_index) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(dict) + tuple val(meta5), path(dbsnp) + tuple val(meta6), path(dbsnp_tbi) output: tuple val(meta), path("*.vcf.gz"), emit: vcf @@ -26,7 +26,7 @@ process GATK4_GENOTYPEGVCFS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def gvcf_command = gvcf.name.endsWith(".vcf") || gvcf.name.endsWith(".vcf.gz") ? "$gvcf" : "gendb://$gvcf" + def input_command = input.name.endsWith(".vcf") || input.name.endsWith(".vcf.gz") ? "$input" : "gendb://$input" def dbsnp_command = dbsnp ? "--dbsnp $dbsnp" : "" def interval_command = intervals ? "--intervals $intervals" : "" @@ -39,7 +39,7 @@ process GATK4_GENOTYPEGVCFS { """ gatk --java-options "-Xmx${avail_mem}M -XX:-UsePerfData" \\ GenotypeGVCFs \\ - --variant $gvcf_command \\ + --variant $input_command \\ --output ${prefix}.vcf.gz \\ --reference $fasta \\ $interval_command \\ @@ -57,7 +57,7 @@ process GATK4_GENOTYPEGVCFS { def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.vcf.gz + echo | gzip > ${prefix}.vcf.gz touch ${prefix}.vcf.gz.tbi cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/gatk4/haplotypecaller/gatk4-haplotypecaller.diff b/modules/nf-core/gatk4/haplotypecaller/gatk4-haplotypecaller.diff deleted file mode 100644 index 275b0dd0..00000000 --- a/modules/nf-core/gatk4/haplotypecaller/gatk4-haplotypecaller.diff +++ /dev/null @@ -1,16 +0,0 @@ -Changes in module 'nf-core/gatk4/haplotypecaller' ---- modules/nf-core/gatk4/haplotypecaller/main.nf -+++ modules/nf-core/gatk4/haplotypecaller/main.nf -@@ -12,8 +12,8 @@ - tuple val(meta2), path(fasta) - tuple val(meta3), path(fai) - tuple val(meta4), path(dict) -- tuple val(meta5), path(dbsnp) -- tuple val(meta6), path(dbsnp_tbi) -+ path(dbsnp) -+ path(dbsnp_tbi) - - output: - tuple val(meta), path("*.vcf.gz") , emit: vcf - -************************************************************ diff --git a/modules/nf-core/gatk4/haplotypecaller/main.nf b/modules/nf-core/gatk4/haplotypecaller/main.nf index 7170169f..3043ee07 100644 --- a/modules/nf-core/gatk4/haplotypecaller/main.nf +++ b/modules/nf-core/gatk4/haplotypecaller/main.nf @@ -12,8 +12,8 @@ process GATK4_HAPLOTYPECALLER { tuple val(meta2), path(fasta) tuple val(meta3), path(fai) tuple val(meta4), path(dict) - path(dbsnp) - path(dbsnp_tbi) + tuple val(meta5), path(dbsnp) + tuple val(meta6), path(dbsnp_tbi) output: tuple val(meta), path("*.vcf.gz") , emit: vcf diff --git a/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test b/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test index a124bff5..18d35f49 100644 --- a/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test +++ b/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test @@ -17,14 +17,14 @@ nextflow_process { """ input[0] = [ [ id:'test_bam' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), [], [] ] - input[1] = [ [ id:'test_fa' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'test_fai' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'test_dict' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) ] + input[1] = [ [ id:'test_fa' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'test_dict' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] input[4] = [ [], [] ] input[5] = [ [], [] ] @@ -35,9 +35,12 @@ nextflow_process { then { assertAll( { assert process.success }, - // { assert snapshot(process.out).match() }, // Unstable hashes - { assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_bam_input") }, - { assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_bam_input") }, + { assert snapshot( + file(process.out.vcf[0][1]).name, + file(process.out.tbi[0][1]).name, + process.out.versions + ).match() + } ) } @@ -50,14 +53,14 @@ nextflow_process { """ input[0] = [ [ id:'test_cram' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + 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), [], [] ] - input[1] = [ [ id:'test_fa' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'test_fai' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'test_dict' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) ] + input[1] = [ [ id:'test_fa' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'test_dict' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] input[4] = [ [], [] ] input[5] = [ [], [] ] """ @@ -67,9 +70,12 @@ nextflow_process { then { assertAll( { assert process.success }, - // { assert snapshot(process.out).match() }, // Unstable hashes - { assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_input") }, - { assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_input") }, + { assert snapshot( + file(process.out.vcf[0][1]).name, + file(process.out.tbi[0][1]).name, + process.out.versions + ).match() + } ) } @@ -82,16 +88,16 @@ nextflow_process { """ input[0] = [ [ id:'test_cram_sites' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + 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), [], [] ] - input[1] = [ [ id:'test_fa' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'test_fai' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'test_dict' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) ] - input[4] = [ [ id:'test_sites' ], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) ] - input[5] = [ [ id:'test_sites_tbi' ], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) ] + input[1] = [ [ id:'test_fa' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'test_dict' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] + input[4] = [ [ id:'test_sites' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz', checkIfExists: true) ] + input[5] = [ [ id:'test_sites_tbi' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi', checkIfExists: true) ] """ } } @@ -99,9 +105,12 @@ nextflow_process { then { assertAll( { assert process.success }, - // { assert snapshot(process.out).match() }, // Unstable hashes - { assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_input_with_sites") }, - { assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_input_with_sites") }, + { assert snapshot( + file(process.out.vcf[0][1]).name, + file(process.out.tbi[0][1]).name, + process.out.versions + ).match() + } ) } @@ -114,16 +123,16 @@ nextflow_process { """ input[0] = [ [ id:'test_cram_sites_dragstr' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + 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.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_dragstrmodel'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_paired_end_sorted_dragstrmodel.txt', checkIfExists: true) ] - input[1] = [ [ id:'test_fa' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'test_fai' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'test_dict' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) ] - input[4] = [ [ id:'test_sites' ], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) ] - input[5] = [ [ id:'test_sites_tbi' ], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) ] + input[1] = [ [ id:'test_fa' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'test_dict' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] + input[4] = [ [ id:'test_sites' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz', checkIfExists: true) ] + input[5] = [ [ id:'test_sites_tbi' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi', checkIfExists: true) ] """ } } @@ -131,9 +140,12 @@ nextflow_process { then { assertAll( { assert process.success }, - // { assert snapshot(process.out).match() }, // Unstable hashes - { assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_dragstr_input_with_sites") }, - { assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_dragstr_input_with_sites") }, + { assert snapshot( + file(process.out.vcf[0][1]).name, + file(process.out.tbi[0][1]).name, + process.out.versions + ).match() + } ) } diff --git a/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap b/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap index 375025ee..0203fcfc 100644 --- a/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap +++ b/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap @@ -1,82 +1,58 @@ { - "gatk_hc_vcf_cram_dragstr_input_with_sites": { + "homo_sapiens - [cram, crai] - fasta - fai - dict": { "content": [ - "test_cram_sites_dragstr.vcf.gz" + "test_cram.vcf.gz", + "test_cram.vcf.gz.tbi", + [ + "versions.yml:md5,05431a0ab28c85412c8b3582e863a7ab" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T13:24:45.142682" + "timestamp": "2024-08-14T09:36:54.158605" }, - "gatk_hc_vcf_bam_input": { + "homo_sapiens - [cram, crai] - fasta - fai - dict - sites - sites_tbi": { "content": [ - "test_bam.vcf.gz" + "test_cram_sites.vcf.gz", + "test_cram_sites.vcf.gz.tbi", + [ + "versions.yml:md5,05431a0ab28c85412c8b3582e863a7ab" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T13:23:19.203837" + "timestamp": "2024-08-14T09:37:13.77024" }, - "gatk_hc_vcf_cram_input": { + "homo_sapiens - [bam, bai] - fasta - fai - dict": { "content": [ - "test_cram.vcf.gz" + "test_bam.vcf.gz", + "test_bam.vcf.gz.tbi", + [ + "versions.yml:md5,05431a0ab28c85412c8b3582e863a7ab" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T13:23:48.434615" + "timestamp": "2024-08-14T09:36:34.77631" }, - "gatk_hc_vcf_cram_input_with_sites": { + "homo_sapiens - [cram, crai, dragstr_model] - fasta - fai - dict - sites - sites_tbi": { "content": [ - "test_cram_sites.vcf.gz" + "test_cram_sites_dragstr.vcf.gz", + "test_cram_sites_dragstr.vcf.gz.tbi", + [ + "versions.yml:md5,05431a0ab28c85412c8b3582e863a7ab" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T13:24:17.147745" - }, - "gatk_hc_vcf_tbi_bam_input": { - "content": [ - "test_bam.vcf.gz.tbi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-20T13:23:19.23048" - }, - "gatk_hc_vcf_tbi_cram_input": { - "content": [ - "test_cram.vcf.gz.tbi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-20T13:23:48.45958" - }, - "gatk_hc_vcf_tbi_cram_dragstr_input_with_sites": { - "content": [ - "test_cram_sites_dragstr.vcf.gz.tbi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-20T13:24:45.154818" - }, - "gatk_hc_vcf_tbi_cram_input_with_sites": { - "content": [ - "test_cram_sites.vcf.gz.tbi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-20T13:24:17.158138" + "timestamp": "2024-08-14T09:37:32.967085" } } \ No newline at end of file diff --git a/modules/nf-core/gawk/environment.yml b/modules/nf-core/gawk/environment.yml index 34513c7f..3d98a08b 100644 --- a/modules/nf-core/gawk/environment.yml +++ b/modules/nf-core/gawk/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - anaconda::gawk=5.1.0 + - conda-forge::gawk=5.3.0 diff --git a/modules/nf-core/gawk/main.nf b/modules/nf-core/gawk/main.nf index f856a1f8..ca468929 100644 --- a/modules/nf-core/gawk/main.nf +++ b/modules/nf-core/gawk/main.nf @@ -4,8 +4,8 @@ process GAWK { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gawk:5.1.0' : - 'biocontainers/gawk:5.1.0' }" + 'https://depot.galaxyproject.org/singularity/gawk:5.3.0' : + 'biocontainers/gawk:5.3.0' }" input: tuple val(meta), path(input) @@ -41,10 +41,11 @@ process GAWK { stub: prefix = task.ext.prefix ?: "${meta.id}" - suffix = task.ext.suffix ?: "${input.getExtension}" + suffix = task.ext.suffix ?: "${input.getExtension()}" + def create_cmd = suffix.endsWith("gz") ? "echo '' | gzip >" : "touch" """ - touch ${prefix}.${suffix} + ${create_cmd} ${prefix}.${suffix} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/gawk/tests/main.nf.test b/modules/nf-core/gawk/tests/main.nf.test new file mode 100644 index 00000000..fce82ca9 --- /dev/null +++ b/modules/nf-core/gawk/tests/main.nf.test @@ -0,0 +1,56 @@ +nextflow_process { + + name "Test Process GAWK" + script "../main.nf" + process "GAWK" + + tag "modules" + tag "modules_nfcore" + tag "gawk" + + test("convert fasta to bed") { + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("convert fasta to bed with program file") { + config "./nextflow_with_program_file.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[1] = Channel.of('BEGIN {FS="\t"}; {print \$1 FS "0" FS \$2}').collectFile(name:"program.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 new file mode 100644 index 00000000..4f3a759c --- /dev/null +++ b/modules/nf-core/gawk/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "convert fasta to bed with program file": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed:md5,87a15eb9c2ff20ccd5cd8735a28708f7" + ] + ], + "1": [ + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" + ], + "output": [ + [ + { + "id": "test" + }, + "test.bed:md5,87a15eb9c2ff20ccd5cd8735a28708f7" + ] + ], + "versions": [ + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T15:20:02.495430346" + }, + "convert fasta to bed": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed:md5,87a15eb9c2ff20ccd5cd8735a28708f7" + ] + ], + "1": [ + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" + ], + "output": [ + [ + { + "id": "test" + }, + "test.bed:md5,87a15eb9c2ff20ccd5cd8735a28708f7" + ] + ], + "versions": [ + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T15:19:53.291809648" + } +} \ No newline at end of file diff --git a/modules/nf-core/gawk/tests/nextflow.config b/modules/nf-core/gawk/tests/nextflow.config new file mode 100644 index 00000000..6e5d43a3 --- /dev/null +++ b/modules/nf-core/gawk/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: GAWK { + ext.suffix = "bed" + ext.args2 = '\'BEGIN {FS="\t"}; {print \$1 FS "0" FS \$2}\'' + } +} diff --git a/modules/nf-core/gawk/tests/nextflow_with_program_file.config b/modules/nf-core/gawk/tests/nextflow_with_program_file.config new file mode 100644 index 00000000..693ad419 --- /dev/null +++ b/modules/nf-core/gawk/tests/nextflow_with_program_file.config @@ -0,0 +1,5 @@ +process { + withName: GAWK { + ext.suffix = "bed" + } +} diff --git a/modules/nf-core/gawk/tests/tags.yml b/modules/nf-core/gawk/tests/tags.yml new file mode 100644 index 00000000..72e4531d --- /dev/null +++ b/modules/nf-core/gawk/tests/tags.yml @@ -0,0 +1,2 @@ +gawk: + - "modules/nf-core/gawk/**" diff --git a/modules/nf-core/mosdepth/environment.yml b/modules/nf-core/mosdepth/environment.yml index 88c7126c..bcb9d64a 100644 --- a/modules/nf-core/mosdepth/environment.yml +++ b/modules/nf-core/mosdepth/environment.yml @@ -5,4 +5,4 @@ channels: - defaults dependencies: # renovate: datasource=conda depName=bioconda/mosdepth - - mosdepth=0.3.6 + - mosdepth=0.3.8 diff --git a/modules/nf-core/mosdepth/main.nf b/modules/nf-core/mosdepth/main.nf index c7e24303..6f4a8383 100644 --- a/modules/nf-core/mosdepth/main.nf +++ b/modules/nf-core/mosdepth/main.nf @@ -4,8 +4,8 @@ process MOSDEPTH { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mosdepth:0.3.6--hd299d5a_0' : - 'biocontainers/mosdepth:0.3.6--hd299d5a_0'}" + 'https://depot.galaxyproject.org/singularity/mosdepth:0.3.8--hd299d5a_0' : + 'biocontainers/mosdepth:0.3.8--hd299d5a_0'}" input: tuple val(meta), path(bam), path(bai), path(bed) @@ -63,13 +63,13 @@ process MOSDEPTH { touch ${prefix}.region.dist.txt touch ${prefix}.summary.txt touch ${prefix}.per-base.d4 - touch ${prefix}.per-base.bed.gz + echo "" | gzip > ${prefix}.per-base.bed.gz touch ${prefix}.per-base.bed.gz.csi - touch ${prefix}.regions.bed.gz + echo "" | gzip > ${prefix}.regions.bed.gz touch ${prefix}.regions.bed.gz.csi - touch ${prefix}.quantized.bed.gz + echo "" | gzip > ${prefix}.quantized.bed.gz touch ${prefix}.quantized.bed.gz.csi - touch ${prefix}.thresholds.bed.gz + echo "" | gzip > ${prefix}.thresholds.bed.gz touch ${prefix}.thresholds.bed.gz.csi cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/mosdepth/tests/main.nf.test b/modules/nf-core/mosdepth/tests/main.nf.test index d991f819..0b3c860d 100644 --- a/modules/nf-core/mosdepth/tests/main.nf.test +++ b/modules/nf-core/mosdepth/tests/main.nf.test @@ -15,8 +15,8 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), [] ] input[1] = [[],[]] @@ -40,9 +40,9 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ] input[1] = [[],[]] """ @@ -65,13 +65,13 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + 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), [] ] input[1] = [ [ id:'test' ], - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] """ } @@ -93,13 +93,13 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + 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/genome/genome.bed', checkIfExists: true) ] input[1] = [ [ id:'test' ], - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] """ } @@ -122,8 +122,8 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), [] ] input[1] = [[],[]] @@ -148,8 +148,8 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), [] ] input[1] = [[],[]] @@ -174,9 +174,9 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ] input[1] = [[],[]] """ @@ -200,9 +200,9 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ] input[1] = [[],[]] """ @@ -225,9 +225,9 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ] input[1] = [[],[]] """ @@ -237,21 +237,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.global_txt[0][1]).name, - file(process.out.summary_txt[0][1]).name, - file(process.out.regions_txt[0][1]).name, - file(process.out.per_base_d4[0][1]).name, - file(process.out.per_base_bed[0][1]).name, - file(process.out.per_base_csi[0][1]).name, - file(process.out.regions_bed[0][1]).name, - file(process.out.regions_csi[0][1]).name, - file(process.out.quantized_bed[0][1]).name, - file(process.out.quantized_csi[0][1]).name, - file(process.out.thresholds_bed[0][1]).name, - file(process.out.thresholds_csi[0][1]).name, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } ) } diff --git a/modules/nf-core/mosdepth/tests/main.nf.test.snap b/modules/nf-core/mosdepth/tests/main.nf.test.snap index dc4d9508..c604540b 100644 --- a/modules/nf-core/mosdepth/tests/main.nf.test.snap +++ b/modules/nf-core/mosdepth/tests/main.nf.test.snap @@ -1,23 +1,236 @@ { "homo_sapiens - bam, bai, [] - stub": { "content": [ - "test.global.dist.txt", - "test.summary.txt", - "test.region.dist.txt", - "test.per-base.d4", - "test.per-base.bed.gz", - "test.per-base.bed.gz.csi", - "test.regions.bed.gz", - "test.regions.bed.gz.csi", - "test.quantized.bed.gz", - "test.quantized.bed.gz.csi", - "test.thresholds.bed.gz", - "test.thresholds.bed.gz.csi", - [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.global.dist.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "10": [ + [ + { + "id": "test", + "single_end": true + }, + "test.thresholds.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": true + }, + "test.thresholds.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "12": [ + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.region.dist.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.per-base.d4:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": true + }, + "test.per-base.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "5": [ + [ + { + "id": "test", + "single_end": true + }, + "test.per-base.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "6": [ + [ + { + "id": "test", + "single_end": true + }, + "test.regions.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": true + }, + "test.regions.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + { + "id": "test", + "single_end": true + }, + "test.quantized.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "9": [ + [ + { + "id": "test", + "single_end": true + }, + "test.quantized.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "global_txt": [ + [ + { + "id": "test", + "single_end": true + }, + "test.global.dist.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "per_base_bed": [ + [ + { + "id": "test", + "single_end": true + }, + "test.per-base.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "per_base_csi": [ + [ + { + "id": "test", + "single_end": true + }, + "test.per-base.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "per_base_d4": [ + [ + { + "id": "test", + "single_end": true + }, + "test.per-base.d4:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "quantized_bed": [ + [ + { + "id": "test", + "single_end": true + }, + "test.quantized.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "quantized_csi": [ + [ + { + "id": "test", + "single_end": true + }, + "test.quantized.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "regions_bed": [ + [ + { + "id": "test", + "single_end": true + }, + "test.regions.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "regions_csi": [ + [ + { + "id": "test", + "single_end": true + }, + "test.regions.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "regions_txt": [ + [ + { + "id": "test", + "single_end": true + }, + "test.region.dist.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "summary_txt": [ + [ + { + "id": "test", + "single_end": true + }, + "test.summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "thresholds_bed": [ + [ + { + "id": "test", + "single_end": true + }, + "test.thresholds.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "thresholds_csi": [ + [ + { + "id": "test", + "single_end": true + }, + "test.thresholds.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + ] + } ], - "timestamp": "2023-11-27T15:14:34.897155161" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-29T13:33:16.953408231" }, "homo_sapiens - cram, crai, bed": { "content": [ @@ -47,7 +260,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -67,7 +280,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "5": [ @@ -76,7 +289,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -85,7 +298,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz:md5,5d398caf7171ec4406278e2add3009ae" + "test.regions.bed.gz:md5,9ded0397623fda26a6a3514d6a0e2a2c" ] ], "7": [ @@ -94,7 +307,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "8": [ @@ -118,7 +331,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "per_base_csi": [ @@ -127,7 +340,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -145,7 +358,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz:md5,5d398caf7171ec4406278e2add3009ae" + "test.regions.bed.gz:md5,9ded0397623fda26a6a3514d6a0e2a2c" ] ], "regions_csi": [ @@ -154,7 +367,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "regions_txt": [ @@ -182,11 +395,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], - "timestamp": "2023-11-27T14:47:18.171150781" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-29T13:32:50.160217828" }, "homo_sapiens - bam, bai, [] - quantized": { "content": [ @@ -216,7 +433,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ @@ -230,7 +447,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "5": [ @@ -239,7 +456,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -254,7 +471,7 @@ "id": "test", "single_end": true }, - "test.quantized.bed.gz:md5,3e434a8bafcf59a67841ae3d4d752838" + "test.quantized.bed.gz:md5,f037c215449d361112efc10108fcc17c" ] ], "9": [ @@ -263,7 +480,7 @@ "id": "test", "single_end": true }, - "test.quantized.bed.gz.csi:md5,be9617f551f19a33923f1e886eaefb93" + "test.quantized.bed.gz.csi:md5,4f69e6ace50206a2768be66ded3a56f0" ] ], "global_txt": [ @@ -281,7 +498,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "per_base_csi": [ @@ -290,7 +507,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -302,7 +519,7 @@ "id": "test", "single_end": true }, - "test.quantized.bed.gz:md5,3e434a8bafcf59a67841ae3d4d752838" + "test.quantized.bed.gz:md5,f037c215449d361112efc10108fcc17c" ] ], "quantized_csi": [ @@ -311,7 +528,7 @@ "id": "test", "single_end": true }, - "test.quantized.bed.gz.csi:md5,be9617f551f19a33923f1e886eaefb93" + "test.quantized.bed.gz.csi:md5,4f69e6ace50206a2768be66ded3a56f0" ] ], "regions_bed": [ @@ -339,11 +556,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], - "timestamp": "2023-11-27T14:47:29.228103864" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-29T13:33:01.164885111" }, "homo_sapiens - bam, bai, bed": { "content": [ @@ -373,7 +594,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -393,7 +614,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "5": [ @@ -402,7 +623,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -411,7 +632,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz:md5,5d398caf7171ec4406278e2add3009ae" + "test.regions.bed.gz:md5,9ded0397623fda26a6a3514d6a0e2a2c" ] ], "7": [ @@ -420,7 +641,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "8": [ @@ -444,7 +665,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "per_base_csi": [ @@ -453,7 +674,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -471,7 +692,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz:md5,5d398caf7171ec4406278e2add3009ae" + "test.regions.bed.gz:md5,9ded0397623fda26a6a3514d6a0e2a2c" ] ], "regions_csi": [ @@ -480,7 +701,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "regions_txt": [ @@ -508,11 +729,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], - "timestamp": "2023-11-27T14:47:04.537716314" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-29T13:32:39.071657456" }, "homo_sapiens - bam, bai, [] - window": { "content": [ @@ -542,7 +767,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -550,7 +775,7 @@ "id": "test", "single_end": true }, - "test.mosdepth.region.dist.txt:md5,39e0e707ec32feb5176fd20a95f1f468" + "test.mosdepth.region.dist.txt:md5,0b6ea9f0da1228252d9aef2d3b6f7f76" ] ], "3": [ @@ -562,7 +787,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "5": [ @@ -571,7 +796,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -580,7 +805,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz:md5,f02e2cb49cc050e13d76942d6960827a" + "test.regions.bed.gz:md5,34f48d16fcdd61e44d812e29e02c77b8" ] ], "7": [ @@ -589,7 +814,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,257d67678136963d9dd904330079609d" + "test.regions.bed.gz.csi:md5,2a30bcb7f5c7632136b3efce24723970" ] ], "8": [ @@ -613,7 +838,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "per_base_csi": [ @@ -622,7 +847,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -640,7 +865,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz:md5,f02e2cb49cc050e13d76942d6960827a" + "test.regions.bed.gz:md5,34f48d16fcdd61e44d812e29e02c77b8" ] ], "regions_csi": [ @@ -649,7 +874,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,257d67678136963d9dd904330079609d" + "test.regions.bed.gz.csi:md5,2a30bcb7f5c7632136b3efce24723970" ] ], "regions_txt": [ @@ -658,7 +883,7 @@ "id": "test", "single_end": true }, - "test.mosdepth.region.dist.txt:md5,39e0e707ec32feb5176fd20a95f1f468" + "test.mosdepth.region.dist.txt:md5,0b6ea9f0da1228252d9aef2d3b6f7f76" ] ], "summary_txt": [ @@ -677,11 +902,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], - "timestamp": "2023-11-27T14:47:23.708536171" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-29T13:32:55.631776118" }, "homo_sapiens - bam, bai, []": { "content": [ @@ -711,7 +940,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ @@ -725,7 +954,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "5": [ @@ -734,7 +963,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -764,7 +993,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "per_base_csi": [ @@ -773,7 +1002,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -810,11 +1039,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], - "timestamp": "2023-11-27T14:46:56.975710077" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-29T13:32:33.642125299" }, "homo_sapiens - cram, crai, []": { "content": [ @@ -844,7 +1077,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ @@ -858,7 +1091,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "5": [ @@ -867,7 +1100,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -897,7 +1130,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "per_base_csi": [ @@ -906,7 +1139,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -943,11 +1176,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], - "timestamp": "2023-11-27T14:47:12.09259995" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-29T13:32:44.704920941" }, "homo_sapiens - bam, bai, bed - thresholds": { "content": [ @@ -976,7 +1213,7 @@ "id": "test", "single_end": true }, - "test.thresholds.bed.gz:md5,13101e326eea3cbfa1d569b69f494f4c" + "test.thresholds.bed.gz:md5,fe70ae728cd10726c42a2bcd44adfc9d" ] ], "11": [ @@ -985,11 +1222,11 @@ "id": "test", "single_end": true }, - "test.thresholds.bed.gz.csi:md5,912055ee9452229439df6fae95644196" + "test.thresholds.bed.gz.csi:md5,219414a0751185adb98d2235d83ea055" ] ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -1009,7 +1246,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "5": [ @@ -1018,7 +1255,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -1027,7 +1264,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz:md5,5d398caf7171ec4406278e2add3009ae" + "test.regions.bed.gz:md5,9ded0397623fda26a6a3514d6a0e2a2c" ] ], "7": [ @@ -1036,7 +1273,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "8": [ @@ -1060,7 +1297,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz:md5,bc1df47d46f818fee5275975925d769a" + "test.per-base.bed.gz:md5,da6db0fb375a3053a89db8c935eebbaa" ] ], "per_base_csi": [ @@ -1069,7 +1306,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -1087,7 +1324,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz:md5,5d398caf7171ec4406278e2add3009ae" + "test.regions.bed.gz:md5,9ded0397623fda26a6a3514d6a0e2a2c" ] ], "regions_csi": [ @@ -1096,7 +1333,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "regions_txt": [ @@ -1123,7 +1360,7 @@ "id": "test", "single_end": true }, - "test.thresholds.bed.gz:md5,13101e326eea3cbfa1d569b69f494f4c" + "test.thresholds.bed.gz:md5,fe70ae728cd10726c42a2bcd44adfc9d" ] ], "thresholds_csi": [ @@ -1132,14 +1369,18 @@ "id": "test", "single_end": true }, - "test.thresholds.bed.gz.csi:md5,912055ee9452229439df6fae95644196" + "test.thresholds.bed.gz.csi:md5,219414a0751185adb98d2235d83ea055" ] ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], - "timestamp": "2023-11-27T14:49:44.311847326" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-29T13:33:06.737266831" } } \ No newline at end of file diff --git a/modules/nf-core/rtgtools/pedfilter/main.nf b/modules/nf-core/rtgtools/pedfilter/main.nf index bb36cf50..f6486e17 100644 --- a/modules/nf-core/rtgtools/pedfilter/main.nf +++ b/modules/nf-core/rtgtools/pedfilter/main.nf @@ -11,8 +11,8 @@ process RTGTOOLS_PEDFILTER { tuple val(meta), path(input) output: - tuple val(meta), path("*.vcf.gz") , emit: output - path "versions.yml" , emit: versions + tuple val(meta), path("*.{vcf.gz,ped}") , emit: output + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -31,12 +31,10 @@ process RTGTOOLS_PEDFILTER { def postprocess = extension == "vcf.gz" ? "| rtg bgzip ${args2} -" : "" """ - cut -f1-6 ${input} > ${prefix}.ped - rtg pedfilter \\ ${args} \\ - ${prefix}.ped \\ - | head -n -1 ${postprocess} > ${prefix}.${extension} + ${input} \\ + ${postprocess} > ${prefix}.${extension} cat <<-END_VERSIONS > versions.yml @@ -46,7 +44,6 @@ process RTGTOOLS_PEDFILTER { """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def extension = args.contains("--vcf") ? "vcf.gz" : "ped" diff --git a/modules/nf-core/rtgtools/pedfilter/meta.yml b/modules/nf-core/rtgtools/pedfilter/meta.yml index 785ac990..4e90fd7b 100644 --- a/modules/nf-core/rtgtools/pedfilter/meta.yml +++ b/modules/nf-core/rtgtools/pedfilter/meta.yml @@ -11,7 +11,7 @@ tools: homepage: "https://www.realtimegenomics.com/products/rtg-tools" documentation: "https://github.com/RealTimeGenomics/rtg-tools" tool_dev_url: "https://github.com/RealTimeGenomics/rtg-tools" - licence: "['BSD']" + licence: ["BSD"] input: - meta: type: map diff --git a/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff b/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff deleted file mode 100644 index 4463e941..00000000 --- a/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff +++ /dev/null @@ -1,39 +0,0 @@ -Changes in module 'nf-core/rtgtools/pedfilter' ---- modules/nf-core/rtgtools/pedfilter/main.nf -+++ modules/nf-core/rtgtools/pedfilter/main.nf -@@ -11,8 +11,8 @@ - tuple val(meta), path(input) - - output: -- tuple val(meta), path("*.{vcf.gz,ped}") , emit: output -- path "versions.yml" , emit: versions -+ tuple val(meta), path("*.vcf.gz") , emit: output -+ path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when -@@ -31,10 +31,12 @@ - def postprocess = extension == "vcf.gz" ? "| rtg bgzip ${args2} -" : "" - - """ -+ cut -f1-6 ${input} > ${prefix}.ped -+ - rtg pedfilter \\ - ${args} \\ -- ${input} \\ -- ${postprocess} > ${prefix}.${extension} -+ ${prefix}.ped \\ -+ | head -n -1 ${postprocess} > ${prefix}.${extension} - - - cat <<-END_VERSIONS > versions.yml -@@ -44,6 +46,7 @@ - """ - - stub: -+ def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - - def extension = args.contains("--vcf") ? "vcf.gz" : "ped" - -************************************************************ diff --git a/modules/nf-core/rtgtools/pedfilter/tests/main.nf.test b/modules/nf-core/rtgtools/pedfilter/tests/main.nf.test new file mode 100644 index 00000000..0ddcebdb --- /dev/null +++ b/modules/nf-core/rtgtools/pedfilter/tests/main.nf.test @@ -0,0 +1,85 @@ + +nextflow_process { + + name "Test Process RTGTOOLS_PEDFILTER" + script "../main.nf" + process "RTGTOOLS_PEDFILTER" + + tag "modules" + tag "modules_nfcore" + tag "rtgtools" + tag "rtgtools/pedfilter" + + test("test-rtgtools-pedfilter-ped") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky.ped', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-rtgtools-pedfilter-vcf") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-rtgtools-pedfilter-vcf-output") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky.ped', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.output[0][1]).linesGzip[3..7], + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/rtgtools/pedfilter/tests/main.nf.test.snap b/modules/nf-core/rtgtools/pedfilter/tests/main.nf.test.snap new file mode 100644 index 00000000..7475fa8b --- /dev/null +++ b/modules/nf-core/rtgtools/pedfilter/tests/main.nf.test.snap @@ -0,0 +1,91 @@ +{ + "test-rtgtools-pedfilter-vcf": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ped:md5,342135c8bf22e573367b75ef5e1c5e6b" + ] + ], + "1": [ + "versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d" + ], + "output": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ped:md5,342135c8bf22e573367b75ef5e1c5e6b" + ] + ], + "versions": [ + "versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T16:11:01.797205" + }, + "test-rtgtools-pedfilter-vcf-output": { + "content": [ + [ + "##CL=pedfilter --vcf justhusky.ped", + "##diseased=hugelymodelbat", + "##SAMPLE=", + "##SAMPLE=", + "##SAMPLE=" + ], + [ + "versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T20:46:00.069224" + }, + "test-rtgtools-pedfilter-ped": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ped:md5,a8b8f6538e1738d6e06fddfe15d36f09" + ] + ], + "1": [ + "versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d" + ], + "output": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ped:md5,a8b8f6538e1738d6e06fddfe15d36f09" + ] + ], + "versions": [ + "versions.yml:md5,036d97d5be26fce2e7d956034b9dc86d" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T16:10:53.473351" + } +} \ No newline at end of file diff --git a/modules/nf-core/rtgtools/pedfilter/tests/nextflow.config b/modules/nf-core/rtgtools/pedfilter/tests/nextflow.config new file mode 100644 index 00000000..a8a3ec54 --- /dev/null +++ b/modules/nf-core/rtgtools/pedfilter/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'RTGTOOLS_PEDFILTER' { + ext.args = "--vcf" + } +} diff --git a/modules/nf-core/rtgtools/rocplot/meta.yml b/modules/nf-core/rtgtools/rocplot/meta.yml index 927cff90..2b4d43d7 100644 --- a/modules/nf-core/rtgtools/rocplot/meta.yml +++ b/modules/nf-core/rtgtools/rocplot/meta.yml @@ -11,7 +11,7 @@ tools: homepage: "https://www.realtimegenomics.com/products/rtg-tools" documentation: "https://github.com/RealTimeGenomics/rtg-tools" tool_dev_url: "https://github.com/RealTimeGenomics/rtg-tools" - licence: "['BSD']" + licence: ["BSD"] input: - meta: type: map diff --git a/modules/nf-core/rtgtools/rocplot/tests/main.nf.test b/modules/nf-core/rtgtools/rocplot/tests/main.nf.test index 160eafcf..c7c37084 100644 --- a/modules/nf-core/rtgtools/rocplot/tests/main.nf.test +++ b/modules/nf-core/rtgtools/rocplot/tests/main.nf.test @@ -7,6 +7,8 @@ nextflow_process { tag "modules_nfcore" tag "rtgtools" tag "rtgtools/rocplot" + tag "rtgtools/vcfeval" + tag "untar" test("homo_sapiens - tsv") { @@ -17,7 +19,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome_sdf.tar.gz', checkIfExists: true) ] """ } @@ -29,12 +31,12 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ] input[1] = UNTAR.out.untar println(projectDir) diff --git a/modules/nf-core/rtgtools/rocplot/tests/main.nf.test.snap b/modules/nf-core/rtgtools/rocplot/tests/main.nf.test.snap index 389ffb5b..f4dee3a1 100644 --- a/modules/nf-core/rtgtools/rocplot/tests/main.nf.test.snap +++ b/modules/nf-core/rtgtools/rocplot/tests/main.nf.test.snap @@ -5,6 +5,10 @@ "test.svg", "versions.yml" ], - "timestamp": "2023-10-24T12:48:36.35343056" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-09T10:44:42.642303" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/convert/environment.yml b/modules/nf-core/samtools/convert/environment.yml index cd4ee8c3..7a95ca61 100644 --- a/modules/nf-core/samtools/convert/environment.yml +++ b/modules/nf-core/samtools/convert/environment.yml @@ -4,5 +4,5 @@ channels: - bioconda - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::samtools=1.20 + - bioconda::htslib=1.20 diff --git a/modules/nf-core/samtools/convert/main.nf b/modules/nf-core/samtools/convert/main.nf index e2d679f7..03b7b525 100644 --- a/modules/nf-core/samtools/convert/main.nf +++ b/modules/nf-core/samtools/convert/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_CONVERT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : - 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.20--h50ea8bc_0' : + 'biocontainers/samtools:1.20--h50ea8bc_0' }" input: tuple val(meta), path(input), path(index) @@ -13,8 +13,11 @@ process SAMTOOLS_CONVERT { tuple val(meta3), path(fai) output: - tuple val(meta), path("*.{cram,bam}"), path("*.{crai,bai}") , emit: alignment_index - path "versions.yml" , emit: versions + tuple val(meta), path("*.bam") , emit: bam , optional: true + tuple val(meta), path("*.cram") , emit: cram, optional: true + tuple val(meta), path("*.bai") , emit: bai , optional: true + tuple val(meta), path("*.crai") , emit: crai, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -39,4 +42,19 @@ process SAMTOOLS_CONVERT { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def output_extension = input.getExtension() == "bam" ? "cram" : "bam" + def index_extension = output_extension == "bam" ? "bai" : "crai" + + """ + touch ${prefix}.${output_extension} + touch ${prefix}.${index_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/nf-core/samtools/convert/meta.yml b/modules/nf-core/samtools/convert/meta.yml index f8a1612f..55828971 100644 --- a/modules/nf-core/samtools/convert/meta.yml +++ b/modules/nf-core/samtools/convert/meta.yml @@ -39,10 +39,22 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - alignment_index: + - bam: type: file - description: filtered/converted BAM/CRAM file + index - pattern: "*{.bam/cram,.bai/crai}" + description: filtered/converted BAM file + pattern: "*{.bam}" + - cram: + type: file + description: filtered/converted CRAM file + pattern: "*{cram}" + - bai: + type: file + description: filtered/converted BAM index + pattern: "*{.bai}" + - crai: + type: file + description: filtered/converted CRAM index + pattern: "*{.crai}" - version: type: file description: File containing software version @@ -53,3 +65,4 @@ authors: maintainers: - "@FriederikeHanssen" - "@maxulysse" + - "@matthdsm" diff --git a/modules/nf-core/samtools/convert/tests/main.nf.test b/modules/nf-core/samtools/convert/tests/main.nf.test index ee59532a..91a0c69e 100644 --- a/modules/nf-core/samtools/convert/tests/main.nf.test +++ b/modules/nf-core/samtools/convert/tests/main.nf.test @@ -34,9 +34,9 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.alignment_index[0][1]).name).match("bam_alignment_index_1") }, - { assert snapshot(file(process.out.alignment_index[0][2]).name).match("bam_alignment_index_2") }, - { assert snapshot(process.out.versions).match("bam_versions") } + { assert snapshot(file(process.out.cram[0][1]).name).match("bam_to_cram_alignment") }, + { assert snapshot(file(process.out.crai[0][1]).name).match("bam_to_cram_index") }, + { assert snapshot(process.out.versions).match("bam_to_cram_versions") } ) } } @@ -66,9 +66,41 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.alignment_index[0][1]).name).match("cram_alignment_index_1") }, - { assert snapshot(file(process.out.alignment_index[0][2]).name).match("cram_alignment_index_2") }, - { assert snapshot(process.out.versions).match("cram_versions") } + { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_alignment") }, + { assert snapshot(file(process.out.bai[0][1]).name).match("cram_to_bam_alignment_index") }, + { assert snapshot(process.out.versions).match("cram_to_bam_versions") } + ) + } + } + + test("sarscov2 - [bam, bai], fasta, fai - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + 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) + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [ id:'fai' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("stub") } ) } } diff --git a/modules/nf-core/samtools/convert/tests/main.nf.test.snap b/modules/nf-core/samtools/convert/tests/main.nf.test.snap index 96ec9f4e..51362902 100644 --- a/modules/nf-core/samtools/convert/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/convert/tests/main.nf.test.snap @@ -1,66 +1,131 @@ { - "cram_alignment_index_1": { + "cram_to_bam_alignment": { "content": [ "test.bam" ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-02T17:04:16.431159" + "timestamp": "2024-03-06T11:14:51.300147176" }, - "cram_alignment_index_2": { + "bam_to_cram_alignment": { "content": [ - "test.bam.bai" + "test.cram" ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-02T17:04:16.43428" + "timestamp": "2024-03-06T11:14:36.625470184" }, - "bam_alignment_index_2": { + "cram_to_bam_versions": { "content": [ - "test.cram.crai" + [ + "versions.yml:md5,b1040cd80ce16abb9b2c2902b62d5fcd" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-02T17:00:29.669534" + "timestamp": "2024-05-28T15:44:34.618037105" }, - "bam_alignment_index_1": { + "bam_to_cram_versions": { "content": [ - "test.cram" + [ + "versions.yml:md5,b1040cd80ce16abb9b2c2902b62d5fcd" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-02T17:00:29.666821" + "timestamp": "2024-05-28T15:44:29.165839679" }, - "cram_versions": { + "stub": { "content": [ - [ - "versions.yml:md5,dd0aaf61f39c9ce91c74090f3c7ce1d0" - ] + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,b1040cd80ce16abb9b2c2902b62d5fcd" + ], + "bai": [ + + ], + "bam": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,b1040cd80ce16abb9b2c2902b62d5fcd" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-13T16:14:38.224641326" + "timestamp": "2024-05-28T15:44:40.258233921" }, - "bam_versions": { + "bam_to_cram_index": { "content": [ - [ - "versions.yml:md5,dd0aaf61f39c9ce91c74090f3c7ce1d0" - ] + "test.cram.crai" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-06T11:14:36.640009334" + }, + "cram_to_bam_alignment_index": { + "content": [ + "test.bam.bai" ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-13T16:14:29.852388191" + "timestamp": "2024-03-06T11:14:51.304477426" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/faidx/environment.yml b/modules/nf-core/samtools/faidx/environment.yml index 3e95dd71..f8450fa5 100644 --- a/modules/nf-core/samtools/faidx/environment.yml +++ b/modules/nf-core/samtools/faidx/environment.yml @@ -1,8 +1,10 @@ name: samtools_faidx + channels: - conda-forge - bioconda - defaults + dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::htslib=1.20 + - bioconda::samtools=1.20 diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf index cfe7ad95..bdcdbc95 100644 --- a/modules/nf-core/samtools/faidx/main.nf +++ b/modules/nf-core/samtools/faidx/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_FAIDX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : - 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.20--h50ea8bc_0' : + 'biocontainers/samtools:1.20--h50ea8bc_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/nf-core/samtools/faidx/meta.yml b/modules/nf-core/samtools/faidx/meta.yml index e189af28..f3c25de2 100644 --- a/modules/nf-core/samtools/faidx/meta.yml +++ b/modules/nf-core/samtools/faidx/meta.yml @@ -39,6 +39,10 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - fa: + type: file + description: FASTA file + pattern: "*.{fa}" - fai: type: file description: FASTA index file diff --git a/modules/nf-core/samtools/faidx/tests/main.nf.test b/modules/nf-core/samtools/faidx/tests/main.nf.test new file mode 100644 index 00000000..17244ef2 --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/main.nf.test @@ -0,0 +1,122 @@ +nextflow_process { + + name "Test Process SAMTOOLS_FAIDX" + script "../main.nf" + process "SAMTOOLS_FAIDX" + + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/faidx" + + test("test_samtools_faidx") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + + input[1] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_bgzip") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true)] + + input[1] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_fasta") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + + input[1] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_stub_fasta") { + + config "./nextflow2.config" + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + + input[1] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_samtools_faidx_stub_fai") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + + input[1] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/faidx/tests/main.nf.test.snap b/modules/nf-core/samtools/faidx/tests/main.nf.test.snap new file mode 100644 index 00000000..3223b72b --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/main.nf.test.snap @@ -0,0 +1,249 @@ +{ + "test_samtools_faidx": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "gzi": [ + + ], + "versions": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-28T15:42:14.779784761" + }, + "test_samtools_faidx_bgzip": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474" + ] + ], + "3": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "gzi": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474" + ] + ], + "versions": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-28T15:42:20.256633877" + }, + "test_samtools_faidx_fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "extract.fa:md5,6a0774a0ad937ba0bfd2ac7457d90f36" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ], + "fa": [ + [ + { + "id": "test", + "single_end": false + }, + "extract.fa:md5,6a0774a0ad937ba0bfd2ac7457d90f36" + ] + ], + "fai": [ + + ], + "gzi": [ + + ], + "versions": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-28T15:42:25.632577273" + }, + "test_samtools_faidx_stub_fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "extract.fa:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ], + "fa": [ + [ + { + "id": "test", + "single_end": false + }, + "extract.fa:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "fai": [ + + ], + "gzi": [ + + ], + "versions": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-28T15:42:31.058424849" + }, + "test_samtools_faidx_stub_fai": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ], + "fa": [ + + ], + "fai": [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5" + ] + ], + "gzi": [ + + ], + "versions": [ + "versions.yml:md5,2db78952923a61e05d50b95518b21856" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-28T15:42:36.479929617" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/faidx/tests/nextflow.config b/modules/nf-core/samtools/faidx/tests/nextflow.config new file mode 100644 index 00000000..f76a3ba0 --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: SAMTOOLS_FAIDX { + ext.args = 'MT192765.1 -o extract.fa' + } + +} diff --git a/modules/nf-core/samtools/faidx/tests/nextflow2.config b/modules/nf-core/samtools/faidx/tests/nextflow2.config new file mode 100644 index 00000000..33ebbd5d --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/nextflow2.config @@ -0,0 +1,6 @@ +process { + + withName: SAMTOOLS_FAIDX { + ext.args = '-o extract.fa' + } +} diff --git a/modules/nf-core/samtools/faidx/tests/tags.yml b/modules/nf-core/samtools/faidx/tests/tags.yml new file mode 100644 index 00000000..e4a83948 --- /dev/null +++ b/modules/nf-core/samtools/faidx/tests/tags.yml @@ -0,0 +1,2 @@ +samtools/faidx: + - modules/nf-core/samtools/faidx/** diff --git a/modules/nf-core/samtools/index/environment.yml b/modules/nf-core/samtools/index/environment.yml index a5e50649..260d516b 100644 --- a/modules/nf-core/samtools/index/environment.yml +++ b/modules/nf-core/samtools/index/environment.yml @@ -4,5 +4,5 @@ channels: - bioconda - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::samtools=1.20 + - bioconda::htslib=1.20 diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index dc14f98d..e002585b 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_INDEX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : - 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.20--h50ea8bc_0' : + 'biocontainers/samtools:1.20--h50ea8bc_0' }" input: tuple val(meta), path(input) @@ -35,10 +35,11 @@ process SAMTOOLS_INDEX { """ stub: + def args = task.ext.args ?: '' + def extension = file(input).getExtension() == 'cram' ? + "crai" : args.contains("-c") ? "csi" : "bai" """ - touch ${input}.bai - touch ${input}.crai - touch ${input}.csi + touch ${input}.${extension} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/index/tests/main.nf.test b/modules/nf-core/samtools/index/tests/main.nf.test index bb7756d1..ca34fb5c 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test +++ b/modules/nf-core/samtools/index/tests/main.nf.test @@ -9,11 +9,7 @@ nextflow_process { tag "samtools/index" test("bai") { - when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -27,18 +23,13 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.bai).match("bai") }, - { assert snapshot(process.out.versions).match("bai_versions") } + { assert snapshot(process.out).match() } ) } } test("crai") { - when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -52,20 +43,83 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.crai).match("crai") }, - { assert snapshot(process.out.versions).match("crai_versions") } + { assert snapshot(process.out).match() } ) } } test("csi") { - config "./csi.nextflow.config" when { - params { - outdir = "$outputDir" + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + file(process.out.csi[0][1]).name, + process.out.versions + ).match() } + ) + } + } + + test("bai - stub") { + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("crai - stub") { + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram', checkIfExists: true) + ]) + """ } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("csi - stub") { + options "-stub" + config "./csi.nextflow.config" + + when { process { """ input[0] = Channel.of([ @@ -79,8 +133,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert path(process.out.csi.get(0).get(1)).exists() }, - { assert snapshot(process.out.versions).match("csi_versions") } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/samtools/index/tests/main.nf.test.snap b/modules/nf-core/samtools/index/tests/main.nf.test.snap index 3dc8e7de..799d199c 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/index/tests/main.nf.test.snap @@ -1,74 +1,250 @@ { - "crai_versions": { + "csi - stub": { "content": [ - [ - "versions.yml:md5,cc4370091670b64bba7c7206403ffb3e" - ] + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + + ], + "crai": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-13T16:12:00.324667957" + "timestamp": "2024-07-22T16:51:53.9057" }, - "csi_versions": { + "crai - stub": { "content": [ - [ - "versions.yml:md5,cc4370091670b64bba7c7206403ffb3e" - ] + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-13T16:12:07.885103162" + "timestamp": "2024-07-22T16:51:45.931558" }, - "crai": { + "bai - stub": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" ] - ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-12T18:41:38.446424" + "timestamp": "2024-07-22T16:51:34.807525" }, - "bai": { + "csi": { "content": [ + "test.paired_end.sorted.bam.csi", [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" - ] + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-12T18:40:46.579747" + "timestamp": "2024-07-22T16:52:55.688799" }, - "bai_versions": { + "crai": { "content": [ - [ - "versions.yml:md5,cc4370091670b64bba7c7206403ffb3e" - ] + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T16:51:17.609533" + }, + "bai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ], + "crai": [ + + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-13T16:11:51.641425452" + "timestamp": "2024-07-22T16:51:04.16585" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/merge/environment.yml b/modules/nf-core/samtools/merge/environment.yml index fc669b1b..cd366d6d 100644 --- a/modules/nf-core/samtools/merge/environment.yml +++ b/modules/nf-core/samtools/merge/environment.yml @@ -4,5 +4,5 @@ channels: - bioconda - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::samtools=1.20 + - bioconda::htslib=1.20 diff --git a/modules/nf-core/samtools/merge/main.nf b/modules/nf-core/samtools/merge/main.nf index a3048c28..693b1d80 100644 --- a/modules/nf-core/samtools/merge/main.nf +++ b/modules/nf-core/samtools/merge/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_MERGE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : - 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.20--h50ea8bc_0' : + 'biocontainers/samtools:1.20--h50ea8bc_0' }" input: tuple val(meta), path(input_files, stageAs: "?/*") diff --git a/modules/nf-core/samtools/merge/samtools-merge.diff b/modules/nf-core/samtools/merge/samtools-merge.diff deleted file mode 100644 index 59077e1f..00000000 --- a/modules/nf-core/samtools/merge/samtools-merge.diff +++ /dev/null @@ -1,13 +0,0 @@ -Changes in module 'nf-core/samtools/merge' ---- modules/nf-core/samtools/merge/main.nf -+++ modules/nf-core/samtools/merge/main.nf -@@ -1,6 +1,6 @@ - process SAMTOOLS_MERGE { - tag "$meta.id" -- label 'process_low' -+ label 'process_high' - - conda "bioconda::samtools=1.17" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - -************************************************************ diff --git a/modules/nf-core/samtools/merge/tests/main.nf.test.snap b/modules/nf-core/samtools/merge/tests/main.nf.test.snap index f7da7699..17bc846f 100644 --- a/modules/nf-core/samtools/merge/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/merge/tests/main.nf.test.snap @@ -80,14 +80,14 @@ "bam_versions": { "content": [ [ - "versions.yml:md5,52c62d4712f7af00eb962d090ca32fe4" + "versions.yml:md5,84dab54b9812780df48f5cecef690c34" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-13T16:16:33.782637377" + "timestamp": "2024-05-28T15:46:35.851936597" }, "bams_csi": { "content": [ @@ -124,14 +124,14 @@ "bams_stub_versions": { "content": [ [ - "versions.yml:md5,52c62d4712f7af00eb962d090ca32fe4" + "versions.yml:md5,84dab54b9812780df48f5cecef690c34" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-13T16:16:42.594476052" + "timestamp": "2024-05-28T15:46:41.405707643" }, "bam_cram": { "content": [ @@ -158,14 +158,14 @@ "bams_versions": { "content": [ [ - "versions.yml:md5,52c62d4712f7af00eb962d090ca32fe4" + "versions.yml:md5,84dab54b9812780df48f5cecef690c34" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-13T16:16:04.805335656" + "timestamp": "2024-05-28T15:45:51.695689923" }, "crams_bam": { "content": [ @@ -182,14 +182,14 @@ "crams_versions": { "content": [ [ - "versions.yml:md5,52c62d4712f7af00eb962d090ca32fe4" + "versions.yml:md5,84dab54b9812780df48f5cecef690c34" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-02-13T16:16:25.889394689" + "timestamp": "2024-05-28T15:46:30.185392319" }, "bam_csi": { "content": [ diff --git a/modules/nf-core/somalier/extract/environment.yml b/modules/nf-core/somalier/extract/environment.yml index e0dd11c9..72397774 100644 --- a/modules/nf-core/somalier/extract/environment.yml +++ b/modules/nf-core/somalier/extract/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::somalier=0.2.15 + - bioconda::somalier=0.2.19 diff --git a/modules/nf-core/somalier/extract/main.nf b/modules/nf-core/somalier/extract/main.nf index 8dc3c31c..703605d1 100644 --- a/modules/nf-core/somalier/extract/main.nf +++ b/modules/nf-core/somalier/extract/main.nf @@ -5,14 +5,14 @@ process SOMALIER_EXTRACT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/somalier:0.2.15--h37c5b7d_0': - 'biocontainers/somalier:0.2.15--h37c5b7d_0' }" + 'https://depot.galaxyproject.org/singularity/somalier:0.2.19--h0c29559_0': + 'biocontainers/somalier:0.2.19--h0c29559_0' }" input: tuple val(meta), path(input), path(input_index) - path(fasta) - path(fai) - path(sites) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(sites) output: tuple val(meta), path("*.somalier") , emit: extract diff --git a/modules/nf-core/somalier/extract/meta.yml b/modules/nf-core/somalier/extract/meta.yml index 7aa426ab..aabaf5d6 100644 --- a/modules/nf-core/somalier/extract/meta.yml +++ b/modules/nf-core/somalier/extract/meta.yml @@ -19,7 +19,7 @@ tools: documentation: "https://github.com/brentp/somalier/blob/master/README.md" tool_dev_url: "https://github.com/brentp/somalier" doi: "10.1186/s13073-020-00761-2" - licence: "MIT License" + licence: ["MIT"] input: - meta: type: map @@ -32,14 +32,29 @@ input: - input_index: type: file description: index file of the input data, e.g., bam.bai, cram.crai + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'hg38' ] - fasta: type: file description: The reference fasta file pattern: "*.{fasta,fna,fas,fa}" + - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'hg38' ] - fai: type: file description: FASTA index file pattern: "*.fai" + - meta4: + type: map + description: | + Groovy Map containing sites information + e.g. [ id:'hg38' ] - sites: type: file description: sites file in VCF format which can be taken from https://github.com/brentp/somalier diff --git a/modules/nf-core/somalier/extract/tests/main.nf.test b/modules/nf-core/somalier/extract/tests/main.nf.test new file mode 100644 index 00000000..dfc7e8a5 --- /dev/null +++ b/modules/nf-core/somalier/extract/tests/main.nf.test @@ -0,0 +1,84 @@ +nextflow_process { + + name "Test Process SOMALIER_EXTRACT" + script "../main.nf" + process "SOMALIER_EXTRACT" + + tag "modules" + tag "modules_nfcore" + tag "somalier" + tag "somalier/extract" + + test("homo_sapiens - [ bam, bai ], fasta, fai, sites") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'delete_me/somalier/sites_chr21.hg38.vcf.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("homo_sapiens - [ bam, bai ], fasta, fai, sites -stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'delete_me/somalier/sites_chr21.hg38.vcf.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/somalier/extract/tests/main.nf.test.snap b/modules/nf-core/somalier/extract/tests/main.nf.test.snap new file mode 100644 index 00000000..83df72a4 --- /dev/null +++ b/modules/nf-core/somalier/extract/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "homo_sapiens - [ bam, bai ], fasta, fai, sites": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "normal.somalier:md5,21f0b980edd42ddaa8ab964959c1de02" + ] + ], + "1": [ + "versions.yml:md5,df4e49e9520f49a862026da1aa81dde0" + ], + "extract": [ + [ + { + "id": "test", + "single_end": false + }, + "normal.somalier:md5,21f0b980edd42ddaa8ab964959c1de02" + ] + ], + "versions": [ + "versions.yml:md5,df4e49e9520f49a862026da1aa81dde0" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-01T13:25:23.384476049" + }, + "homo_sapiens - [ bam, bai ], fasta, fai, sites -stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.somalier:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,df4e49e9520f49a862026da1aa81dde0" + ], + "extract": [ + [ + { + "id": "test", + "single_end": false + }, + "test.somalier:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,df4e49e9520f49a862026da1aa81dde0" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-01T13:25:35.741711687" + } +} \ No newline at end of file diff --git a/modules/nf-core/somalier/extract/tests/tags.yml b/modules/nf-core/somalier/extract/tests/tags.yml new file mode 100644 index 00000000..836e3524 --- /dev/null +++ b/modules/nf-core/somalier/extract/tests/tags.yml @@ -0,0 +1,2 @@ +somalier/extract: + - "modules/nf-core/somalier/extract/**" diff --git a/modules/nf-core/somalier/relate/environment.yml b/modules/nf-core/somalier/relate/environment.yml deleted file mode 100644 index b8b70f67..00000000 --- a/modules/nf-core/somalier/relate/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: somalier_relate -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::somalier=0.2.15 diff --git a/modules/nf-core/somalier/relate/main.nf b/modules/nf-core/somalier/relate/main.nf deleted file mode 100644 index a8188b64..00000000 --- a/modules/nf-core/somalier/relate/main.nf +++ /dev/null @@ -1,62 +0,0 @@ - -process SOMALIER_RELATE { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/somalier:0.2.15--h37c5b7d_0': - 'biocontainers/somalier:0.2.15--h37c5b7d_0' }" - - input: - tuple val(meta), path(extract), path(ped) - path(sample_groups) - - output: - tuple val(meta), path("*.html"), emit: html - tuple val(meta), path("*.pairs.tsv"), emit: pairs_tsv - tuple val(meta), path("*.samples.tsv"), emit: samples_tsv - tuple val(meta), path("*.ped"), emit: ped - path "versions.yml", emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def input_list = extract.collect{"$it"}.join(' ') - def prefix = task.ext.prefix ?: "$meta.id" - def sample_groups_command = sample_groups ? "-g $sample_groups" : "" - def ped_command = ped ? "-p $ped" : "" - - """ - somalier relate \\ - -o ${prefix} \\ - ${input_list} \\ - ${args} \\ - ${sample_groups_command} \\ - ${ped_command} - - cut -f1-6 ${prefix}.samples.tsv | sed -e 's/-9/0/' > ${prefix}_somalier.ped - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - somalier: \$(echo \$(somalier 2>&1) | sed 's/^.*somalier version: //; s/Commands:.*\$//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "$meta.id" - - """ - touch ${prefix}.html - touch ${prefix}.pairs.tsv - touch ${prefix}.samples.tsv - touch ${prefix}_somalier.ped - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - somalier: \$(echo \$(somalier 2>&1) | sed 's/^.*somalier version: //; s/Commands:.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/somalier/relate/meta.yml b/modules/nf-core/somalier/relate/meta.yml deleted file mode 100644 index d1d81c87..00000000 --- a/modules/nf-core/somalier/relate/meta.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: "somalier_relate" -description: Somalier can extract informative sites, evaluate relatedness, and perform quality-control on BAM/CRAM/BCF/VCF/GVCF or from jointly-called VCFs -keywords: - - relatedness - - QC - - bam - - cram - - vcf - - gvcf - - ancestry - - identity - - kinship - - informative sites - - family -tools: - - "somalier": - description: "Somalier can extract informative sites, evaluate relatedness, and perform quality-control on BAM/CRAM/BCF/VCF/GVCF or from jointly-called VCFs" - homepage: "https://github.com/brentp/somalier" - documentation: "https://github.com/brentp/somalier/blob/master/README.md" - tool_dev_url: "https://github.com/brentp/somalier" - doi: "10.1186/s13073-020-00761-2" - licence: "MIT License" -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - extract: - type: file(s) - description: extract file(s) from Somalier extract - pattern: "*.somalier" - - ped: - type: file - description: optional path to a ped or fam file indicating the expected relationships among samples - pattern: "*.{ped,fam}" - - sample_groups: - type: file - description: optional path to expected groups of samples such as tumor normal pairs specified as comma-separated groups per line - pattern: "*.{txt,csv}" -output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - html: - type: file - description: html file - pattern: "*.html" - - pairs_tsv: - type: file - description: tsv file with output stats for pairs of samples - pattern: "*.pairs.tsv" - - samples_tsv: - type: file - description: tsv file with sample-level information - pattern: "*.samples.tsv" -authors: - - "@ashotmarg" - - "@nvnieuwk" -maintainers: - - "@ashotmarg" - - "@nvnieuwk" diff --git a/modules/nf-core/somalier/relate/somalier-relate.diff b/modules/nf-core/somalier/relate/somalier-relate.diff deleted file mode 100644 index 48dc50f3..00000000 --- a/modules/nf-core/somalier/relate/somalier-relate.diff +++ /dev/null @@ -1,30 +0,0 @@ -Changes in module 'nf-core/somalier/relate' ---- modules/nf-core/somalier/relate/main.nf -+++ modules/nf-core/somalier/relate/main.nf -@@ -16,6 +16,7 @@ - tuple val(meta), path("*.html"), emit: html - tuple val(meta), path("*.pairs.tsv"), emit: pairs_tsv - tuple val(meta), path("*.samples.tsv"), emit: samples_tsv -+ tuple val(meta), path("*.ped"), emit: ped - path "versions.yml", emit: versions - - when: -@@ -36,6 +37,8 @@ - ${sample_groups_command} \\ - ${ped_command} - -+ cut -f1-6 ${prefix}.samples.tsv | sed -e 's/-9/0/' > ${prefix}_somalier.ped -+ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - somalier: \$(echo \$(somalier 2>&1) | sed 's/^.*somalier version: //; s/Commands:.*\$//') -@@ -49,6 +52,7 @@ - touch ${prefix}.html - touch ${prefix}.pairs.tsv - touch ${prefix}.samples.tsv -+ touch ${prefix}_somalier.ped - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - -************************************************************ diff --git a/modules/nf-core/tabix/bgzip/environment.yml b/modules/nf-core/tabix/bgzip/environment.yml index 4fe40c56..56cc0fb1 100644 --- a/modules/nf-core/tabix/bgzip/environment.yml +++ b/modules/nf-core/tabix/bgzip/environment.yml @@ -5,3 +5,4 @@ channels: - defaults dependencies: - bioconda::tabix=1.11 + - bioconda::htslib=1.20 diff --git a/modules/nf-core/tabix/bgzip/main.nf b/modules/nf-core/tabix/bgzip/main.nf index 7772e9ad..67991c74 100644 --- a/modules/nf-core/tabix/bgzip/main.nf +++ b/modules/nf-core/tabix/bgzip/main.nf @@ -4,8 +4,8 @@ process TABIX_BGZIP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0' : - 'biocontainers/tabix:1.11--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' : + 'biocontainers/htslib:1.20--h5efdd21_2' }" input: tuple val(meta), path(input) @@ -44,7 +44,8 @@ process TABIX_BGZIP { output = in_bgzip ? input.getBaseName() : "${prefix}.${input.getExtension()}.gz" """ - touch ${output} + echo "" | gzip > ${output} + touch ${output}.gzi cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/tabix/bgzip/tests/bgzip_compress.config b/modules/nf-core/tabix/bgzip/tests/bgzip_compress.config new file mode 100644 index 00000000..6b6ff55f --- /dev/null +++ b/modules/nf-core/tabix/bgzip/tests/bgzip_compress.config @@ -0,0 +1,5 @@ +process { + withName: TABIX_BGZIP { + ext.args = ' -i' + } +} diff --git a/modules/nf-core/tabix/bgzip/tests/main.nf.test b/modules/nf-core/tabix/bgzip/tests/main.nf.test new file mode 100644 index 00000000..d784aa07 --- /dev/null +++ b/modules/nf-core/tabix/bgzip/tests/main.nf.test @@ -0,0 +1,111 @@ +nextflow_process { + + name "Test Process TABIX_BGZIP" + script "modules/nf-core/tabix/bgzip/main.nf" + process "TABIX_BGZIP" + + tag "modules" + tag "modules_nfcore" + tag "tabix" + tag "tabix/bgzip" + + test("sarscov2_vcf_bgzip_compress") { + when { + process { + """ + input[0] = [ + [ id:'bgzip_test' ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot( + file(process.out.output[0][1]).name + ).match("bgzip_test") + } + ) + } + } + + test("homo_genome_bedgz_compress") { + when { + process { + """ + input[0] = [ + [ id:'bedgz_test' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed.gz', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot( + file(process.out.output[0][1]).name + ).match("bedgz_test") + } + ) + } + } + + test("sarscov2_vcf_bgzip_compress_stub") { + options '-stub' + config "./bgzip_compress.config" + + when { + process { + """ + input[0] = [ + [ id:"test_stub" ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot( + file(process.out.output[0][1]).name + ).match("test_stub") + } + ) + } + } + + test("sarscov2_vcf_bgzip_compress_gzi") { + config "./bgzip_compress.config" + when { + process { + """ + input[0] = [ + [ id:"gzi_compress_test" ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot( + file(process.out.gzi[0][1]).name + ).match("gzi_compress_test") + } + ) + } + } +} diff --git a/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap b/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap new file mode 100644 index 00000000..0748143f --- /dev/null +++ b/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap @@ -0,0 +1,218 @@ +{ + "gzi_compress_test": { + "content": [ + "gzi_compress_test.vcf.gz.gzi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-02-19T14:52:29.328146" + }, + "homo_genome_bedgz_compress": { + "content": [ + { + "0": [ + [ + { + "id": "bedgz_test" + }, + "bedgz_test.bed:md5,87a15eb9c2ff20ccd5cd8735a28708f7" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + ], + "gzi": [ + + ], + "output": [ + [ + { + "id": "bedgz_test" + }, + "bedgz_test.bed:md5,87a15eb9c2ff20ccd5cd8735a28708f7" + ] + ], + "versions": [ + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:28:34.159992362" + }, + "test_stub": { + "content": [ + "test_stub.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-02-19T14:52:20.811489" + }, + "sarscov2_vcf_bgzip_compress": { + "content": [ + { + "0": [ + [ + { + "id": "bgzip_test" + }, + "bgzip_test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + ], + "gzi": [ + + ], + "output": [ + [ + { + "id": "bgzip_test" + }, + "bgzip_test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "versions": [ + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:28:22.087769106" + }, + "sarscov2_vcf_bgzip_compress_gzi": { + "content": [ + { + "0": [ + [ + { + "id": "gzi_compress_test" + }, + "gzi_compress_test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "1": [ + [ + { + "id": "gzi_compress_test" + }, + "gzi_compress_test.vcf.gz.gzi:md5,26fd00d4e26141cd11561f6e7d4a2ad0" + ] + ], + "2": [ + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + ], + "gzi": [ + [ + { + "id": "gzi_compress_test" + }, + "gzi_compress_test.vcf.gz.gzi:md5,26fd00d4e26141cd11561f6e7d4a2ad0" + ] + ], + "output": [ + [ + { + "id": "gzi_compress_test" + }, + "gzi_compress_test.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + "versions": [ + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:28:57.15091665" + }, + "bgzip_test": { + "content": [ + "bgzip_test.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-02-19T14:52:03.768295" + }, + "bedgz_test": { + "content": [ + "bedgz_test.bed" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-02-19T14:52:12.453855" + }, + "sarscov2_vcf_bgzip_compress_stub": { + "content": [ + { + "0": [ + [ + { + "id": "test_stub" + }, + "test_stub.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test_stub" + }, + "test_stub.vcf.gz.gzi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + ], + "gzi": [ + [ + { + "id": "test_stub" + }, + "test_stub.vcf.gz.gzi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "output": [ + [ + { + "id": "test_stub" + }, + "test_stub.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:28:45.219404786" + } +} \ No newline at end of file diff --git a/modules/nf-core/tabix/bgzip/tests/tags.yml b/modules/nf-core/tabix/bgzip/tests/tags.yml new file mode 100644 index 00000000..de0eec86 --- /dev/null +++ b/modules/nf-core/tabix/bgzip/tests/tags.yml @@ -0,0 +1,2 @@ +tabix/bgzip: + - "modules/nf-core/tabix/bgzip/**" diff --git a/modules/nf-core/tabix/bgzip/tests/vcf_none.config b/modules/nf-core/tabix/bgzip/tests/vcf_none.config new file mode 100644 index 00000000..f3a3c467 --- /dev/null +++ b/modules/nf-core/tabix/bgzip/tests/vcf_none.config @@ -0,0 +1,5 @@ +process { + withName: TABIX_BGZIP { + ext.args = '' + } +} diff --git a/modules/nf-core/tabix/bgziptabix/environment.yml b/modules/nf-core/tabix/bgziptabix/environment.yml index 028461c9..b9644de9 100644 --- a/modules/nf-core/tabix/bgziptabix/environment.yml +++ b/modules/nf-core/tabix/bgziptabix/environment.yml @@ -5,3 +5,4 @@ channels: - defaults dependencies: - bioconda::tabix=1.11 + - bioconda::htslib=1.20 diff --git a/modules/nf-core/tabix/bgziptabix/main.nf b/modules/nf-core/tabix/bgziptabix/main.nf index f9482690..05041f49 100644 --- a/modules/nf-core/tabix/bgziptabix/main.nf +++ b/modules/nf-core/tabix/bgziptabix/main.nf @@ -4,8 +4,8 @@ process TABIX_BGZIPTABIX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0' : - 'biocontainers/tabix:1.11--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' : + 'biocontainers/htslib:1.20--h5efdd21_2' }" input: tuple val(meta), path(input) @@ -24,7 +24,7 @@ process TABIX_BGZIPTABIX { def prefix = task.ext.prefix ?: "${meta.id}" """ bgzip --threads ${task.cpus} -c $args $input > ${prefix}.${input.getExtension()}.gz - tabix $args2 ${prefix}.${input.getExtension()}.gz + tabix --threads ${task.cpus} $args2 ${prefix}.${input.getExtension()}.gz cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -35,7 +35,7 @@ process TABIX_BGZIPTABIX { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.${input.getExtension()}.gz + echo "" | gzip > ${prefix}.${input.getExtension()}.gz touch ${prefix}.${input.getExtension()}.gz.tbi touch ${prefix}.${input.getExtension()}.gz.csi diff --git a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test new file mode 100644 index 00000000..1a84d74f --- /dev/null +++ b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test @@ -0,0 +1,94 @@ +nextflow_process { + + name "Test Process TABIX_BGZIPTABIX" + script "modules/nf-core/tabix/bgziptabix/main.nf" + process "TABIX_BGZIPTABIX" + + tag "modules" + tag "modules_nfcore" + tag "tabix" + tag "tabix/bgziptabix" + + test("sarscov2_bed_tbi") { + config "./tabix_tbi.config" + + when { + process { + """ + input[0] = [ + [ id:'tbi_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_test") + } + ) + } + } + + test("sarscov2_bed_csi") { + config "./tabix_csi.config" + + when { + process { + """ + input[0] = [ + [ id:'csi_test' ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot( + file(process.out.gz_csi[0][1]).name + ).match("csi_test") + } + ) + } + + } + + test("sarscov2_bed_csi_stub") { + config "./tabix_csi.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_csi[0][1]).name + ).match("csi_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 new file mode 100644 index 00000000..c166ea72 --- /dev/null +++ b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap @@ -0,0 +1,167 @@ +{ + "sarscov2_bed_tbi": { + "content": [ + { + "0": [ + [ + { + "id": "tbi_test" + }, + "tbi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74", + "tbi_test.bed.gz.tbi:md5,ca06caf88b1e3c67d5fcba0a1460b52c" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" + ], + "gz_csi": [ + + ], + "gz_tbi": [ + [ + { + "id": "tbi_test" + }, + "tbi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74", + "tbi_test.bed.gz.tbi:md5,ca06caf88b1e3c67d5fcba0a1460b52c" + ] + ], + "versions": [ + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:29:16.053817543" + }, + "sarscov2_bed_csi": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "csi_test" + }, + "csi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74", + "csi_test.bed.gz.csi:md5,c9c0377de58fdc89672bb3005a0d69f5" + ] + ], + "2": [ + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" + ], + "gz_csi": [ + [ + { + "id": "csi_test" + }, + "csi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74", + "csi_test.bed.gz.csi:md5,c9c0377de58fdc89672bb3005a0d69f5" + ] + ], + "gz_tbi": [ + + ], + "versions": [ + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:29:27.667745444" + }, + "csi_test": { + "content": [ + "csi_test.bed.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-02-19T14:51:00.548801" + }, + "csi_stub": { + "content": [ + "test.bed.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-02-19T14:51:09.218454" + }, + "tbi_test": { + "content": [ + "tbi_test.bed.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-02-19T14:50:51.579654" + }, + "sarscov2_bed_csi_stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.bed.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" + ], + "gz_csi": [ + [ + { + "id": "test" + }, + "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "gz_tbi": [ + [ + { + "id": "test" + }, + "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.bed.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:29:45.105209991" + } +} \ No newline at end of file diff --git a/modules/nf-core/tabix/bgziptabix/tests/tabix_csi.config b/modules/nf-core/tabix/bgziptabix/tests/tabix_csi.config new file mode 100644 index 00000000..fb41a314 --- /dev/null +++ b/modules/nf-core/tabix/bgziptabix/tests/tabix_csi.config @@ -0,0 +1,5 @@ +process { + withName: TABIX_BGZIPTABIX { + ext.args2 = '-p vcf --csi' + } +} diff --git a/modules/nf-core/tabix/bgziptabix/tests/tabix_tbi.config b/modules/nf-core/tabix/bgziptabix/tests/tabix_tbi.config new file mode 100644 index 00000000..c1915dc4 --- /dev/null +++ b/modules/nf-core/tabix/bgziptabix/tests/tabix_tbi.config @@ -0,0 +1,5 @@ +process { + withName: TABIX_BGZIPTABIX { + ext.args2 = '-p vcf' + } +} \ No newline at end of file diff --git a/modules/nf-core/tabix/bgziptabix/tests/tags.yml b/modules/nf-core/tabix/bgziptabix/tests/tags.yml new file mode 100644 index 00000000..5052b4d7 --- /dev/null +++ b/modules/nf-core/tabix/bgziptabix/tests/tags.yml @@ -0,0 +1,2 @@ +tabix/bgziptabix: + - "modules/nf-core/tabix/bgziptabix/**" diff --git a/modules/nf-core/untar/environment.yml b/modules/nf-core/untar/environment.yml index 0c9cbb10..4f498244 100644 --- a/modules/nf-core/untar/environment.yml +++ b/modules/nf-core/untar/environment.yml @@ -1,11 +1,9 @@ name: untar - channels: - conda-forge - bioconda - defaults - dependencies: - conda-forge::grep=3.11 - - conda-forge::sed=4.7 + - conda-forge::sed=4.8 - conda-forge::tar=1.34 diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf index 8a75bb95..9bd8f554 100644 --- a/modules/nf-core/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -4,8 +4,8 @@ process UNTAR { 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://depot.galaxyproject.org/singularity/ubuntu:22.04' : + 'nf-core/ubuntu:22.04' }" input: tuple val(meta), path(archive) @@ -52,8 +52,29 @@ process UNTAR { stub: prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.toString().replaceFirst(/\.[^\.]+(.gz)?$/, "")) """ - mkdir $prefix - touch ${prefix}/file.txt + mkdir ${prefix} + ## Dry-run untaring the archive to get the files and place all in prefix + if [[ \$(tar -taf ${archive} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then + for i in `tar -tf ${archive}`; + do + if [[ \$(echo "\${i}" | grep -E "/\$") == "" ]]; + then + touch \${i} + else + mkdir -p \${i} + fi + done + else + for i in `tar -tf ${archive}`; + do + if [[ \$(echo "\${i}" | grep -E "/\$") == "" ]]; + then + touch ${prefix}/\${i} + else + mkdir -p ${prefix}/\${i} + fi + done + fi cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/untar/tests/main.nf.test b/modules/nf-core/untar/tests/main.nf.test index 2a7c97bf..c957517a 100644 --- a/modules/nf-core/untar/tests/main.nf.test +++ b/modules/nf-core/untar/tests/main.nf.test @@ -6,6 +6,7 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "untar" + test("test_untar") { when { @@ -19,10 +20,9 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.untar).match("test_untar") }, + { assert snapshot(process.out).match() }, ) } - } test("test_untar_onlyfiles") { @@ -38,10 +38,48 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.untar).match("test_untar_onlyfiles") }, + { assert snapshot(process.out).match() }, ) } + } + + test("test_untar - stub") { + + options "-stub" + when { + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kraken2.tar.gz', checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } } + test("test_untar_onlyfiles - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'generic/tar/hello.tar.gz', checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } } diff --git a/modules/nf-core/untar/tests/main.nf.test.snap b/modules/nf-core/untar/tests/main.nf.test.snap index 64550292..ceb91b79 100644 --- a/modules/nf-core/untar/tests/main.nf.test.snap +++ b/modules/nf-core/untar/tests/main.nf.test.snap @@ -1,42 +1,158 @@ { "test_untar_onlyfiles": { "content": [ - [ - [ + { + "0": [ [ - - ], + [ + + ], + [ + "hello.txt:md5,e59ff97941044f85df5297e1c302d260" + ] + ] + ], + "1": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ], + "untar": [ + [ + [ + + ], + [ + "hello.txt:md5,e59ff97941044f85df5297e1c302d260" + ] + ] + ], + "versions": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-10T12:04:28.231047" + }, + "test_untar_onlyfiles - stub": { + "content": [ + { + "0": [ + [ + [ + + ], + [ + "hello.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ], + "untar": [ [ - "hello.txt:md5,e59ff97941044f85df5297e1c302d260" + [ + + ], + [ + "hello.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] + ], + "versions": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" ] - ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-02-28T11:49:41.320643" + "timestamp": "2024-07-10T12:04:45.773103" + }, + "test_untar - stub": { + "content": [ + { + "0": [ + [ + [ + + ], + [ + "hash.k2d:md5,d41d8cd98f00b204e9800998ecf8427e", + "opts.k2d:md5,d41d8cd98f00b204e9800998ecf8427e", + "taxo.k2d:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ], + "untar": [ + [ + [ + + ], + [ + "hash.k2d:md5,d41d8cd98f00b204e9800998ecf8427e", + "opts.k2d:md5,d41d8cd98f00b204e9800998ecf8427e", + "taxo.k2d:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-10T12:04:36.777441" }, "test_untar": { "content": [ - [ - [ + { + "0": [ [ - - ], + [ + + ], + [ + "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9", + "opts.k2d:md5,a033d00cf6759407010b21700938f543", + "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c" + ] + ] + ], + "1": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ], + "untar": [ [ - "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9", - "opts.k2d:md5,a033d00cf6759407010b21700938f543", - "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c" + [ + + ], + [ + "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9", + "opts.k2d:md5,a033d00cf6759407010b21700938f543", + "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c" + ] ] + ], + "versions": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" ] - ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-02-28T11:49:33.795172" + "timestamp": "2024-07-10T12:04:19.377674" } } \ No newline at end of file diff --git a/modules/nf-core/vardictjava/environment.yml b/modules/nf-core/vardictjava/environment.yml index 92d169fd..4e8905e5 100644 --- a/modules/nf-core/vardictjava/environment.yml +++ b/modules/nf-core/vardictjava/environment.yml @@ -4,4 +4,5 @@ channels: - bioconda - defaults dependencies: + - bioconda::htslib=1.20 - bioconda::vardict-java=1.8.3 diff --git a/modules/nf-core/vardictjava/main.nf b/modules/nf-core/vardictjava/main.nf index 50d7dfab..6329391c 100644 --- a/modules/nf-core/vardictjava/main.nf +++ b/modules/nf-core/vardictjava/main.nf @@ -4,8 +4,8 @@ process VARDICTJAVA { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0': - 'biocontainers/vardict-java:1.8.3--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-731b8c4cf44d76e9aa181af565b9eee448d82a8c:edd70e76f3529411a748168f6eb1a61f29702123-0' : + 'biocontainers/mulled-v2-731b8c4cf44d76e9aa181af565b9eee448d82a8c:edd70e76f3529411a748168f6eb1a61f29702123-0' }" input: tuple val(meta), path(bams), path(bais), path(bed) @@ -13,7 +13,7 @@ process VARDICTJAVA { tuple val(meta3), path(fasta_fai) output: - tuple val(meta), path("*.vcf"), emit: vcf + tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions when: @@ -22,9 +22,10 @@ process VARDICTJAVA { script: def args = task.ext.args ?: '-c 1 -S 2 -E 3' def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def somatic = bams instanceof ArrayList && bams.size() == 2 ? true : false + def somatic = bams instanceof List && bams.size() == 2 ? true : false def input = somatic ? "-b \"${bams[0]}|${bams[1]}\"" : "-b ${bams}" def filter = somatic ? "testsomatic.R" : "teststrandbias.R" def convert_to_vcf = somatic ? "var2vcf_paired.pl" : "var2vcf_valid.pl" @@ -39,8 +40,7 @@ process VARDICTJAVA { | ${filter} \\ | ${convert_to_vcf} \\ ${args2} \\ - | sed -e 's/##FORMAT= ${prefix}.vcf + | bgzip ${args3} --threads ${task.cpus} > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -52,10 +52,11 @@ process VARDICTJAVA { stub: def args = task.ext.args ?: '-c 1 -S 2 -E 3' def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.vcf + echo '' | gzip > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/vardictjava/meta.yml b/modules/nf-core/vardictjava/meta.yml index 657d1531..5c2fc921 100644 --- a/modules/nf-core/vardictjava/meta.yml +++ b/modules/nf-core/vardictjava/meta.yml @@ -13,7 +13,7 @@ tools: documentation: "https://github.com/AstraZeneca-NGS/VarDictJava" tool_dev_url: "https://github.com/AstraZeneca-NGS/VarDictJava" doi: "10.1093/nar/gkw227 " - licence: "['MIT']" + licence: ["MIT"] input: - meta: type: map diff --git a/modules/nf-core/vardictjava/tests/main.nf.test b/modules/nf-core/vardictjava/tests/main.nf.test index 483a753a..8e5fec10 100644 --- a/modules/nf-core/vardictjava/tests/main.nf.test +++ b/modules/nf-core/vardictjava/tests/main.nf.test @@ -17,17 +17,17 @@ nextflow_process { """ input[0] = Channel.value([ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ]) input[1] = [ [id:"ref"], - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] input[2] = [ [id:"ref"], - file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] """ } @@ -55,22 +55,22 @@ nextflow_process { input[0] = Channel.value([ [ id:'test' ], // meta map [ - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true) ], [ - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai', checkIfExists: true) ], - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ]) input[1] = [ [id:"ref"], - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] input[2] = [ [id:"ref"], - file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] """ } diff --git a/modules/nf-core/vardictjava/tests/main.nf.test.snap b/modules/nf-core/vardictjava/tests/main.nf.test.snap index 4ccb63ec..c32a68b7 100644 --- a/modules/nf-core/vardictjava/tests/main.nf.test.snap +++ b/modules/nf-core/vardictjava/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "test" }, - "test.vcf:md5,e8411ecae49b4f6afa6ea0b681ea506e" + "test.vcf.gz:md5,e8411ecae49b4f6afa6ea0b681ea506e" ] ], "1": [ @@ -18,7 +18,7 @@ { "id": "test" }, - "test.vcf:md5,e8411ecae49b4f6afa6ea0b681ea506e" + "test.vcf.gz:md5,e8411ecae49b4f6afa6ea0b681ea506e" ] ], "versions": [ @@ -26,7 +26,11 @@ ] } ], - "timestamp": "2023-10-24T09:24:20.923172332" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T19:08:38.328190023" }, "homo_sapiens - [[bam, bam], [bai, bai], bed] - fasta - fai": { "content": [ @@ -36,7 +40,7 @@ { "id": "test" }, - "test.vcf:md5,8acdd8ca041f024aab55d102fb6b0c38" + "test.vcf.gz:md5,b52c874c18be636d876d1e0df4a449c3" ] ], "1": [ @@ -47,7 +51,7 @@ { "id": "test" }, - "test.vcf:md5,8acdd8ca041f024aab55d102fb6b0c38" + "test.vcf.gz:md5,b52c874c18be636d876d1e0df4a449c3" ] ], "versions": [ @@ -55,6 +59,10 @@ ] } ], - "timestamp": "2023-10-24T09:24:29.462707023" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-04T19:08:54.416661915" } } \ No newline at end of file diff --git a/modules/nf-core/vardictjava/vardictjava.diff b/modules/nf-core/vardictjava/vardictjava.diff deleted file mode 100644 index 0efca40b..00000000 --- a/modules/nf-core/vardictjava/vardictjava.diff +++ /dev/null @@ -1,13 +0,0 @@ -Changes in module 'nf-core/vardictjava' ---- modules/nf-core/vardictjava/main.nf -+++ modules/nf-core/vardictjava/main.nf -@@ -39,6 +39,7 @@ - | ${filter} \\ - | ${convert_to_vcf} \\ - ${args2} \\ -+ | sed -e 's/##FORMAT= ${prefix}.vcf - - cat <<-END_VERSIONS > versions.yml - -************************************************************ diff --git a/modules/nf-core/vcf2db/Dockerfile b/modules/nf-core/vcf2db/Dockerfile deleted file mode 100644 index b271f667..00000000 --- a/modules/nf-core/vcf2db/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM mambaorg/micromamba:1.4-focal - -COPY ./vcf2db_env.yaml . - -RUN micromamba update --file ./vcf2db_env.yaml --yes -RUN micromamba install --yes --name base --no-deps -c bioconda vcf2db==2020.02.24 -RUN micromamba install --yes --name base --no-deps -c conda-forge coreutils -RUN micromamba clean --all --yes - -ARG MAMBA_DOCKERFILE_ACTIVATE=1 -ENV PATH "$MAMBA_ROOT_PREFIX/bin:$PATH" \ No newline at end of file diff --git a/modules/nf-core/vcf2db/main.nf b/modules/nf-core/vcf2db/main.nf index 85180a37..56c26bb6 100644 --- a/modules/nf-core/vcf2db/main.nf +++ b/modules/nf-core/vcf2db/main.nf @@ -4,7 +4,9 @@ process VCF2DB { // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. conda "${moduleDir}/environment.yml" - container "cmgg/vcf2db:2020.02.24" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/vcf2db:2020.02.24--pl5321hdfd78af_3': + 'biocontainers/vcf2db:2020.02.24--pl5321hdfd78af_3' }" input: tuple val(meta), path(vcf), path(ped) @@ -27,12 +29,6 @@ process VCF2DB { ${prefix}.db \\ $args - sqlite3 ${prefix}.db 'CREATE INDEX idx_variant_impacts_id ON variant_impacts (variant_id)' && \\ - sqlite3 ${prefix}.db 'ALTER TABLE variants ADD COLUMN tags varchar(255)' && \\ - sqlite3 ${prefix}.db 'ALTER TABLE variants ADD COLUMN tags_user varchar(255)' && \\ - sqlite3 ${prefix}.db 'ALTER TABLE variants ADD COLUMN notes varchar(255)' && \\ - sqlite3 ${prefix}.db 'ALTER TABLE variants ADD COLUMN notes_user varchar(255)' - cat <<-END_VERSIONS > versions.yml "${task.process}": vcf2db: $VERSION diff --git a/modules/nf-core/vcf2db/tests/main.nf.test b/modules/nf-core/vcf2db/tests/main.nf.test index 52742adf..9532b432 100644 --- a/modules/nf-core/vcf2db/tests/main.nf.test +++ b/modules/nf-core/vcf2db/tests/main.nf.test @@ -15,8 +15,8 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['genome']['justhusky_minimal_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['justhusky_ped'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky_minimal.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky.ped', checkIfExists: true) ] """ } @@ -25,7 +25,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + file(process.out.db[0][1]).name, // Conda test fails with content md5 + process.out.versions + ).match() + } ) } @@ -40,8 +44,8 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['genome']['justhusky_minimal_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['justhusky_ped'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky_minimal.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky.ped', checkIfExists: true) ] """ } diff --git a/modules/nf-core/vcf2db/tests/main.nf.test.snap b/modules/nf-core/vcf2db/tests/main.nf.test.snap index c51bea34..5e29c6ba 100644 --- a/modules/nf-core/vcf2db/tests/main.nf.test.snap +++ b/modules/nf-core/vcf2db/tests/main.nf.test.snap @@ -28,37 +28,23 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, "timestamp": "2024-01-10T16:13:32.293507403" }, "homo_sapiens - vcf, ped": { "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.db:md5,0766bacb306d642a8358b375c4c1836f" - ] - ], - "1": [ - "versions.yml:md5,3d9eedf7998cb77b614736659eb22b1d" - ], - "db": [ - [ - { - "id": "test", - "single_end": false - }, - "test.db:md5,0766bacb306d642a8358b375c4c1836f" - ] - ], - "versions": [ - "versions.yml:md5,3d9eedf7998cb77b614736659eb22b1d" - ] - } + "test.db", + [ + "versions.yml:md5,3d9eedf7998cb77b614736659eb22b1d" + ] ], - "timestamp": "2024-01-10T16:13:25.722991475" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-08-06T10:27:06.932652" } } \ No newline at end of file diff --git a/modules/nf-core/vcf2db/vcf2db_env.yaml b/modules/nf-core/vcf2db/vcf2db_env.yaml deleted file mode 100644 index 1cfa95f8..00000000 --- a/modules/nf-core/vcf2db/vcf2db_env.yaml +++ /dev/null @@ -1,96 +0,0 @@ -name: base -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - _libgcc_mutex=0.1=conda_forge - - _openmp_mutex=4.5=1_llvm - - backports=1.0=py27_1 - - backports.functools_lru_cache=1.6.1=pyhd3eb1b0_0 - - backports.shutil_get_terminal_size=1.0.0=py27_2 - - backports_abc=0.5=py27_0 - - backports.functools_lru_cache=1.6.1=pyhd3eb1b0_0 - - backports_abc=0.5=py27_0 - - blas=2.17=openblas - - bzip2=1.0.8=h516909a_3 - - c-ares=1.17.1=h36c2ea0_0 - - ca-certificates=2020.11.8=ha878542_0 - - certifi=2016.9.26=py27_0 - - click=7.1.2=pyh9f0ad1d_0 - - coloredlogs=14.0=py27h8c360ce_1 - - cycler=0.10.0=py27_0 - - cyvcf2=0.20.9=py27h22a6d1c_0 - - decorator=4.4.2=py_0 - - freetype=2.10.4=he06d7ca_0 - - functools32=3.2.3.2=py27_2 - - futures=3.3.0=py27h8c360ce_1 - - geneimpacts=0.3.7=py27_0 - - htslib=1.10.2=hd3b49d5_1 - - humanfriendly=8.1=py27h8c360ce_1 - - icu=58.2=hf484d3e_1000 - - kiwisolver=1.1.0=py27h9e3301b_1 - - krb5=1.17.2=h926e7f8_0 - - libblas=3.8.0=17_openblas - - libcblas=3.8.0=17_openblas - - libcurl=7.71.1=hcdd3856_8 - - libdeflate=1.6=h516909a_0 - - libedit=3.1.20191231=he28a2e2_2 - - libev=4.33=h516909a_1 - - libffi=3.3=he6710b0_2 - - libgcc-ng=9.3.0=h5dbcf3e_17 - - libgfortran-ng=7.5.0=hae1eefd_17 - - libgfortran4=7.5.0=hae1eefd_17 - - liblapack=3.8.0=17_openblas - - liblapacke=3.8.0=17_openblas - - liblapacke=3.8.0=17_openblas - - libnghttp2=1.41.0=hf8bcb03_2 - - libopenblas=0.3.10=pthreads_hb3c22a3_5 - - libpng=1.6.37=hed695b0_2 - - libssh2=1.9.0=hab1572f_5 - - libstdcxx-ng=9.3.0=h2ae2ef3_17 - - llvm-openmp=11.0.0=hfc4b9b4_1 - - matplotlib-base=2.2.4=py27hfd891ef_0 - - monotonic=1.5=py_0 - - ncurses=6.2=h58526e2_4 - - networkx=2.2=py27_1 - - nomkl=3.0=0 - - numpy=1.16.6=py27h30dfecb_0 - - numpy-base=1.16.6=py27h2f8d375_0 - - numpy-base=1.16.6=py27h2f8d375_0 - - openssl=1.1.1h=h516909a_0 - - pandas=0.24.2=py27hf484d3e_0 - - pathlib2=2.3.5=py27h8c360ce_1 - - patsy=0.5.1=py27_0 - - peddy=0.4.7=pyh864c0ab_0 - - pip=20.1.1=pyh9f0ad1d_0 - - pyparsing=2.4.7=pyh9f0ad1d_0 - - python=2.7.18=h15b4118_1 - - python-dateutil=2.8.1=py_0 - - python-lzo=1.12=py27h42e1302_1001 - - python-snappy=0.5.4=py27hee44bf9_1 - - python_abi=2.7=1_cp27mu - - python-dateutil=2.8.1=py_0 - - python-snappy=0.5.4=py27hee44bf9_1 - - python_abi=2.7=1_cp27mu - - pytz=2020.1=pyh9f0ad1d_0 - - readline=8.0=he28a2e2_2 - - scandir=1.10.0=py27hdf8410d_1 - - scikit-learn=0.20.3=py27ha8026db_1 - - scipy=1.2.1=py27h921218d_2 - - seaborn=0.9.0=py27_0 - - setuptools=44.0.0=py27_0 - - singledispatch=3.4.0.3=py27_1000 - - six=1.15.0=pyh9f0ad1d_0 - - snappy=1.1.8=he1b5a44_3 - - sqlalchemy=1.3.15=py27hdf8410d_1 - - sqlite=3.33.0=h4cf870e_1 - - statsmodels=0.10.2=py27hc1659b7_0 - - subprocess32=3.5.4=py27h516909a_0 - - tk=8.6.10=hed695b0_1 - - toolshed=0.4.6=py27_0 - - tornado=5.1.1=py27h14c3975_1000 - - wheel=0.35.1=pyh9f0ad1d_0 - - xz=5.2.5=h516909a_1 - - zlib=1.2.11=h516909a_1010 - - zstd=1.4.5=h6597ccf_2 diff --git a/subworkflows/local/gvcf_joint_genotype_gatk4/main.nf b/subworkflows/local/gvcf_joint_genotype_gatk4/main.nf index cf7934a4..8c2a2a41 100644 --- a/subworkflows/local/gvcf_joint_genotype_gatk4/main.nf +++ b/subworkflows/local/gvcf_joint_genotype_gatk4/main.nf @@ -134,9 +134,9 @@ workflow GVCF_JOINT_GENOTYPE_GATK4 { GATK4_GENOTYPEGVCFS( ch_genotypegvcfs_input, - ch_fasta.map { meta, fasta -> fasta }, - ch_fai.map { meta, fai -> fai }, - ch_dict.map { meta, dict -> dict }, + ch_fasta, + ch_fai, + ch_dict, ch_dbsnp, ch_dbsnp_tbi ) diff --git a/subworkflows/local/vcf_extract_relate_somalier/main.nf b/subworkflows/local/vcf_extract_relate_somalier/main.nf index 7b09bbfd..d78e4915 100644 --- a/subworkflows/local/vcf_extract_relate_somalier/main.nf +++ b/subworkflows/local/vcf_extract_relate_somalier/main.nf @@ -4,9 +4,9 @@ include { SOMALIER_RELATE } from '../../../modules/nf-core/somalier/relate/main workflow VCF_EXTRACT_RELATE_SOMALIER { take: ch_vcfs // channel: [mandatory] [ val(meta), path(vcf), path(tbi) ] - ch_fasta // channel: [mandatory] [ path(fasta) ] - ch_fasta_fai // channel: [mandatory] [ path(fai) ] - ch_somalier_sites // channel: [mandatory] [ path(somalier_sites_vcf) ] + ch_fasta // channel: [mandatory] [ val(meta), path(fasta) ] + ch_fasta_fai // channel: [mandatory] [ val(meta), path(fai) ] + ch_somalier_sites // channel: [mandatory] [ val(meta), path(somalier_sites_vcf) ] ch_peds // channel: [mandatory] [ val(meta), path(ped) ] main: diff --git a/workflows/germline.nf b/workflows/germline.nf index 28be6851..b527d130 100644 --- a/workflows/germline.nf +++ b/workflows/germline.nf @@ -136,17 +136,17 @@ workflow GERMLINE { // ch_fasta_ready = Channel.fromPath(fasta).map{ fasta_file -> [[id:"reference"], fasta_file] }.collect() - ch_fai = fai ? Channel.fromPath(fai).map{ fai_file -> [[id:"reference"], fai_file] }.collect() : null - ch_dict = dict ? Channel.fromPath(dict).map{ dict_file -> [[id:"reference"], dict_file] }.collect() : null - ch_strtablefile = strtablefile ? Channel.fromPath(strtablefile).map{ str_file -> [[id:"reference"], str_file] }.collect() : null - ch_sdf = sdf ? Channel.fromPath(sdf).map { sdf_file -> [[id:'reference'], sdf_file] }.collect() : null + ch_fai = fai ? Channel.fromPath(fai).map{ fai_file -> [[id:"reference"], fai_file] }.collect() : null + ch_dict = dict ? Channel.fromPath(dict).map{ dict_file -> [[id:"reference"], dict_file] }.collect() : null + ch_strtablefile = strtablefile ? Channel.fromPath(strtablefile).map{ str_file -> [[id:"reference"], str_file] }.collect() : null + ch_sdf = sdf ? Channel.fromPath(sdf).map { sdf_file -> [[id:'reference'], sdf_file] }.collect() : null ch_default_roi = roi ? Channel.fromPath(roi).collect() : [] - ch_dbsnp_ready = dbsnp ? Channel.fromPath(dbsnp).collect() : [] - ch_dbsnp_tbi = dbsnp_tbi ? Channel.fromPath(dbsnp_tbi).collect() : [] + ch_dbsnp_ready = dbsnp ? Channel.fromPath(dbsnp).collect { dbsnp_file -> [[id:"dbsnp"], dbsnp_file] } : [[],[]] + ch_dbsnp_tbi = dbsnp_tbi ? Channel.fromPath(dbsnp_tbi).collect { dbsnp_file -> [[id:"dbsnp"], dbsnp_file] } : [[],[]] - ch_somalier_sites = somalier_sites ? Channel.fromPath(somalier_sites).collect() : [] + ch_somalier_sites = somalier_sites ? Channel.fromPath(somalier_sites).collect { sites_file -> [[id:"somalier_sites"], sites_file] } : [[],[]] ch_vep_cache = vep_cache ? Channel.fromPath(vep_cache).collect() : [] @@ -518,8 +518,8 @@ workflow GERMLINE { VCF_EXTRACT_RELATE_SOMALIER( ch_normalized_variants, - ch_fasta_ready.map { meta, fasta_file -> fasta_file }, - ch_fai_ready.map { meta, fai_file -> fai_file }, + ch_fasta_ready, + ch_fai_ready, ch_somalier_sites, ch_somalier_input ) From 6d2cdd49f99c5a60c81534be588f66a39cf00ba9 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 Sep 2024 17:11:32 +0200 Subject: [PATCH 04/28] pre-commit --- conf/empty.config | 2 +- conf/empty_genomes.config | 2 +- conf/nf_test.config | 2 +- workflows/germline.nf | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/empty.config b/conf/empty.config index 11f237e6..19c49241 100644 --- a/conf/empty.config +++ b/conf/empty.config @@ -1 +1 @@ -// DON'T REMOVE THIS FILE \ No newline at end of file +// DON'T REMOVE THIS FILE diff --git a/conf/empty_genomes.config b/conf/empty_genomes.config index e02e8342..a90c75d0 100644 --- a/conf/empty_genomes.config +++ b/conf/empty_genomes.config @@ -1,3 +1,3 @@ // DON'T REMOVE THIS FILE! -params.genomes = [:] \ No newline at end of file +params.genomes = [:] diff --git a/conf/nf_test.config b/conf/nf_test.config index a592580c..3d2c735e 100644 --- a/conf/nf_test.config +++ b/conf/nf_test.config @@ -28,4 +28,4 @@ process { memory: 6.GB, time : 6.h ] -} \ No newline at end of file +} diff --git a/workflows/germline.nf b/workflows/germline.nf index b527d130..a756f7aa 100644 --- a/workflows/germline.nf +++ b/workflows/germline.nf @@ -360,7 +360,7 @@ workflow GERMLINE { ch_input.gvcf .filter { meta, gvcf, tbi -> // Filter out samples that have no GVCF - meta.type == "gvcf" || meta.type == "gvcf_cram" + meta.type == "gvcf" || meta.type == "gvcf_cram" } .branch { meta, gvcf, tbi -> no_tbi: !tbi @@ -385,13 +385,13 @@ workflow GERMLINE { // CRAM_PREPARE_SAMTOOLS_BEDTOOLS( - ch_input.cram.filter { meta, cram, crai -> + ch_input.cram.filter { meta, cram, crai -> // Filter out files that already have a called GVCF when only GVCF callers are used - meta.type == "cram" || (meta.type == "gvcf_cram" && callers - GlobalVariables.gvcfCallers) - }, + meta.type == "cram" || (meta.type == "gvcf_cram" && callers - GlobalVariables.gvcfCallers) + }, ch_input.roi.filter { meta, roi_file -> // Filter out files that already have a called GVCF when only GVCF callers are used - meta.type == "cram" || (meta.type == "gvcf_cram" && callers - GlobalVariables.gvcfCallers) + meta.type == "cram" || (meta.type == "gvcf_cram" && callers - GlobalVariables.gvcfCallers) }, ch_fasta_ready, ch_fai_ready, From 212370b638077ba694464795fc0ed49c347e12f4 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 Sep 2024 17:12:05 +0200 Subject: [PATCH 05/28] prettier --- .nf-core.yml | 58 ++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index 7c0e227a..7d44b8c7 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,33 +1,33 @@ lint: - files_exist: - - "CODE_OF_CONDUCT.md" - - "assets/nf-core-germline_logo_light.png" - - "docs/images/nf-core-germline_logo_light.png" - - "docs/images/nf-core-germline_logo_dark.png" - - ".github/ISSUE_TEMPLATE/config.yml" - - ".github/workflows/awstest.yml" - - ".github/workflows/awsfulltest.yml" - - "docs/README.md" - files_unchanged: - - ".github/CONTRIBUTING.md" - - ".github/PULL_REQUEST_TEMPLATE.md" - - ".github/workflows/linting_comment.yml" - - ".github/linting.yml" - - "CODE_OF_CONDUCT.md" - - ".github/ISSUE_TEMPLATE/bug_report.yml" - - ".prettierignore" - nextflow_config: - - "custom_config" # TODO Remove this once the new methods are supported - - "manifest.name" - - "manifest.homePage" - - "params.genomes" - - "validation.help.beforeText" - - "validation.help.afterText" - - "validation.summary.beforeText" - - "validation.summary.afterText" - multiqc_config: - - "report_comment" - actions_ci: false # TODO readd this once the linting doesn't act up + files_exist: + - "CODE_OF_CONDUCT.md" + - "assets/nf-core-germline_logo_light.png" + - "docs/images/nf-core-germline_logo_light.png" + - "docs/images/nf-core-germline_logo_dark.png" + - ".github/ISSUE_TEMPLATE/config.yml" + - ".github/workflows/awstest.yml" + - ".github/workflows/awsfulltest.yml" + - "docs/README.md" + files_unchanged: + - ".github/CONTRIBUTING.md" + - ".github/PULL_REQUEST_TEMPLATE.md" + - ".github/workflows/linting_comment.yml" + - ".github/linting.yml" + - "CODE_OF_CONDUCT.md" + - ".github/ISSUE_TEMPLATE/bug_report.yml" + - ".prettierignore" + nextflow_config: + - "custom_config" # TODO Remove this once the new methods are supported + - "manifest.name" + - "manifest.homePage" + - "params.genomes" + - "validation.help.beforeText" + - "validation.help.afterText" + - "validation.summary.beforeText" + - "validation.summary.afterText" + multiqc_config: + - "report_comment" + actions_ci: false # TODO readd this once the linting doesn't act up nf_core_version: 3.0.0dev repository_type: pipeline template: From 0a81d13fec8f53c34cba7696b06f5f6a6baaebe1 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 Sep 2024 17:19:49 +0200 Subject: [PATCH 06/28] fix validate tests --- .../vcf_validate_small_variants/main.nf.test | 13 -------- .../main.nf.test.snap | 33 ++----------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test index b77bd568..f540a89c 100644 --- a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test +++ b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test @@ -45,10 +45,6 @@ nextflow_workflow { input[2] = [[],[]] input[3] = [[],[]] input[4] = UNTAR.out.untar - input[5] = [[],[]] - input[6] = [[],[]] - input[7] = [[],[]] - input[8] = "vcfeval" """ } } @@ -57,15 +53,6 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.happy_vcf, - workflow.out.happy_tbi, - workflow.out.happy_indel_roc, - workflow.out.happy_indel_roc_pass, - workflow.out.happy_snp_roc, - workflow.out.happy_snp_roc_pass, - workflow.out.happy_roc, - workflow.out.happy_summary, - workflow.out.happy_extended_csv, workflow.out.vcfeval_true_positive_vcf, workflow.out.vcfeval_true_positive_vcf_tbi, workflow.out.vcfeval_false_negative_vcf, diff --git a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap index 8639b840..3e0b9a14 100644 --- a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap @@ -1,33 +1,6 @@ { "default": { "content": [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], [ [ { @@ -245,9 +218,9 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T14:02:50.290466115" + "timestamp": "2024-09-04T17:19:41.712263383" } } \ No newline at end of file From 5b49b84d957286af5c93b3b6cf93d870d574d91b Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 10:14:34 +0200 Subject: [PATCH 07/28] fix somalier tests --- modules.json | 5 + .../nf-core/somalier/relate/environment.yml | 7 + modules/nf-core/somalier/relate/main.nf | 62 ++++ modules/nf-core/somalier/relate/meta.yml | 63 ++++ .../somalier/relate/tests/main.nf.test | 124 ++++++++ .../somalier/relate/tests/main.nf.test.snap | 286 ++++++++++++++++++ .../nf-core/somalier/relate/tests/tags.yml | 2 + .../vcf_extract_relate_somalier/main.nf.test | 12 +- 8 files changed, 555 insertions(+), 6 deletions(-) create mode 100644 modules/nf-core/somalier/relate/environment.yml create mode 100644 modules/nf-core/somalier/relate/main.nf create mode 100644 modules/nf-core/somalier/relate/meta.yml create mode 100644 modules/nf-core/somalier/relate/tests/main.nf.test create mode 100644 modules/nf-core/somalier/relate/tests/main.nf.test.snap create mode 100644 modules/nf-core/somalier/relate/tests/tags.yml diff --git a/modules.json b/modules.json index 16f83c21..af06bdea 100644 --- a/modules.json +++ b/modules.json @@ -171,6 +171,11 @@ "git_sha": "458c882987320e27fc90723ec96c127a243a5497", "installed_by": ["modules"] }, + "somalier/relate": { + "branch": "master", + "git_sha": "458c882987320e27fc90723ec96c127a243a5497", + "installed_by": ["modules"] + }, "tabix/bgzip": { "branch": "master", "git_sha": "b20be35facfc5acdc1259f132ed79339d79e989f", diff --git a/modules/nf-core/somalier/relate/environment.yml b/modules/nf-core/somalier/relate/environment.yml new file mode 100644 index 00000000..5295646b --- /dev/null +++ b/modules/nf-core/somalier/relate/environment.yml @@ -0,0 +1,7 @@ +name: somalier_relate +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::somalier=0.2.19 diff --git a/modules/nf-core/somalier/relate/main.nf b/modules/nf-core/somalier/relate/main.nf new file mode 100644 index 00000000..1c0ba9ae --- /dev/null +++ b/modules/nf-core/somalier/relate/main.nf @@ -0,0 +1,62 @@ + +process SOMALIER_RELATE { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/somalier:0.2.19--h0c29559_0': + 'biocontainers/somalier:0.2.19--h0c29559_0' }" + + input: + tuple val(meta), path(extract), path(ped) + path(sample_groups) + + output: + tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.pairs.tsv"), emit: pairs_tsv + tuple val(meta), path("*.samples.tsv"), emit: samples_tsv + tuple val(meta), path("*.ped"), emit: ped + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def input_list = extract.collect{"$it"}.join(' ') + def prefix = task.ext.prefix ?: "$meta.id" + def sample_groups_command = sample_groups ? "-g $sample_groups" : "" + def ped_command = ped ? "-p $ped" : "" + + """ + somalier relate \\ + -o ${prefix} \\ + ${input_list} \\ + ${args} \\ + ${sample_groups_command} \\ + ${ped_command} + + cut -f1-6 ${prefix}.samples.tsv | sed -e 's/-9/0/' > ${prefix}_somalier.ped + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + somalier: \$(echo \$(somalier 2>&1) | sed 's/^.*somalier version: //; s/Commands:.*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "$meta.id" + + """ + touch ${prefix}.html + touch ${prefix}.pairs.tsv + touch ${prefix}.samples.tsv + touch ${prefix}_somalier.ped + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + somalier: \$(echo \$(somalier 2>&1) | sed 's/^.*somalier version: //; s/Commands:.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/somalier/relate/meta.yml b/modules/nf-core/somalier/relate/meta.yml new file mode 100644 index 00000000..42638f4f --- /dev/null +++ b/modules/nf-core/somalier/relate/meta.yml @@ -0,0 +1,63 @@ +name: "somalier_relate" +description: Somalier can extract informative sites, evaluate relatedness, and perform quality-control on BAM/CRAM/BCF/VCF/GVCF or from jointly-called VCFs +keywords: + - relatedness + - QC + - bam + - cram + - vcf + - gvcf + - ancestry + - identity + - kinship + - informative sites + - family +tools: + - "somalier": + description: "Somalier can extract informative sites, evaluate relatedness, and perform quality-control on BAM/CRAM/BCF/VCF/GVCF or from jointly-called VCFs" + homepage: "https://github.com/brentp/somalier" + documentation: "https://github.com/brentp/somalier/blob/master/README.md" + tool_dev_url: "https://github.com/brentp/somalier" + doi: "10.1186/s13073-020-00761-2" + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - extract: + type: file + description: extract file(s) from Somalier extract + pattern: "*.somalier" + - ped: + type: file + description: optional path to a ped or fam file indicating the expected relationships among samples + pattern: "*.{ped,fam}" + - sample_groups: + type: file + description: optional path to expected groups of samples such as tumor normal pairs specified as comma-separated groups per line + pattern: "*.{txt,csv}" +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - html: + type: file + description: html file + pattern: "*.html" + - pairs_tsv: + type: file + description: tsv file with output stats for pairs of samples + pattern: "*.pairs.tsv" + - samples_tsv: + type: file + description: tsv file with sample-level information + pattern: "*.samples.tsv" +authors: + - "@ashotmarg" + - "@nvnieuwk" +maintainers: + - "@ashotmarg" + - "@nvnieuwk" diff --git a/modules/nf-core/somalier/relate/tests/main.nf.test b/modules/nf-core/somalier/relate/tests/main.nf.test new file mode 100644 index 00000000..5f17456d --- /dev/null +++ b/modules/nf-core/somalier/relate/tests/main.nf.test @@ -0,0 +1,124 @@ +nextflow_process { + + name "Test Process SOMALIER_RELATE" + script "../main.nf" + process "SOMALIER_RELATE" + + tag "modules" + tag "modules_nfcore" + tag "somalier" + tag "somalier/relate" + + test("[ delete_me, [] ], []") { + + when { + process { + """ + input[0] = [ + [ id:'cohort', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'delete_me/somalier/normal.somalier', checkIfExists: true), + file(params.modules_testdata_base_path + 'delete_me/somalier/tumour.somalier', checkIfExists: true) + ], + [] + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("[ delete_me, ped ], groups") { + + when { + process { + """ + input[0] = [ + [ id:'cohort', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'delete_me/somalier/normal.somalier', checkIfExists: true), + file(params.modules_testdata_base_path + 'delete_me/somalier/tumour.somalier', checkIfExists: true) + ], + file(params.modules_testdata_base_path + 'delete_me/somalier/family.ped', checkIfExists: true) + ] + input[1] = file(params.modules_testdata_base_path + 'delete_me/somalier/groups.txt', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("[ delete_me, [] ], [] -stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'cohort', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'delete_me/somalier/normal.somalier', checkIfExists: true), + file(params.modules_testdata_base_path + 'delete_me/somalier/tumour.somalier', checkIfExists: true) + ], + [] + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("[ delete_me, ped ], groups -stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'cohort', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'delete_me/somalier/normal.somalier', checkIfExists: true), + file(params.modules_testdata_base_path + 'delete_me/somalier/tumour.somalier', checkIfExists: true) + ], + file(params.modules_testdata_base_path + 'delete_me/somalier/family.ped', checkIfExists: true) + ] + input[1] = file(params.modules_testdata_base_path + 'delete_me/somalier/groups.txt', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/somalier/relate/tests/main.nf.test.snap b/modules/nf-core/somalier/relate/tests/main.nf.test.snap new file mode 100644 index 00000000..54a73033 --- /dev/null +++ b/modules/nf-core/somalier/relate/tests/main.nf.test.snap @@ -0,0 +1,286 @@ +{ + "[ delete_me, [] ], []": { + "content": [ + { + "0": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.html:md5,03cac9b2c67a8a06f63e07f83ee11e18" + ] + ], + "1": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.pairs.tsv:md5,54d1e9fca1bf9d747d4254c6fa98edcf" + ] + ], + "2": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.samples.tsv:md5,97257d88886db1325c4d7d10cefa7169" + ] + ], + "3": [ + "versions.yml:md5,59d805a9f89558414535c136c814bea6" + ], + "html": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.html:md5,03cac9b2c67a8a06f63e07f83ee11e18" + ] + ], + "pairs_tsv": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.pairs.tsv:md5,54d1e9fca1bf9d747d4254c6fa98edcf" + ] + ], + "samples_tsv": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.samples.tsv:md5,97257d88886db1325c4d7d10cefa7169" + ] + ], + "versions": [ + "versions.yml:md5,59d805a9f89558414535c136c814bea6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T05:29:21.162582556" + }, + "[ delete_me, [] ], [] -stub": { + "content": [ + { + "0": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.pairs.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.samples.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,59d805a9f89558414535c136c814bea6" + ], + "html": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "pairs_tsv": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.pairs.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "samples_tsv": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.samples.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,59d805a9f89558414535c136c814bea6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T05:29:43.887124223" + }, + "[ delete_me, ped ], groups -stub": { + "content": [ + { + "0": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.pairs.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.samples.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,59d805a9f89558414535c136c814bea6" + ], + "html": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "pairs_tsv": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.pairs.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "samples_tsv": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.samples.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,59d805a9f89558414535c136c814bea6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T05:29:55.034913513" + }, + "[ delete_me, ped ], groups": { + "content": [ + { + "0": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.html:md5,0d573016c9279ccdfdcfd4eb01d73b89" + ] + ], + "1": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.pairs.tsv:md5,8655714f1e5359329188e9f501168131" + ] + ], + "2": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.samples.tsv:md5,38ef93340e55fbeef47640abda9e48b0" + ] + ], + "3": [ + "versions.yml:md5,59d805a9f89558414535c136c814bea6" + ], + "html": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.html:md5,0d573016c9279ccdfdcfd4eb01d73b89" + ] + ], + "pairs_tsv": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.pairs.tsv:md5,8655714f1e5359329188e9f501168131" + ] + ], + "samples_tsv": [ + [ + { + "id": "cohort", + "single_end": false + }, + "cohort.samples.tsv:md5,38ef93340e55fbeef47640abda9e48b0" + ] + ], + "versions": [ + "versions.yml:md5,59d805a9f89558414535c136c814bea6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-02T05:29:32.451456985" + } +} \ No newline at end of file diff --git a/modules/nf-core/somalier/relate/tests/tags.yml b/modules/nf-core/somalier/relate/tests/tags.yml new file mode 100644 index 00000000..c80de730 --- /dev/null +++ b/modules/nf-core/somalier/relate/tests/tags.yml @@ -0,0 +1,2 @@ +somalier/relate: + - "modules/nf-core/somalier/relate/**" diff --git a/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test b/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test index 09aa4cca..a07570e9 100644 --- a/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test +++ b/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test @@ -18,9 +18,9 @@ nextflow_workflow { file(params.famvcf, checkIfExists:true), file(params.famtbi, checkIfExists:true) ]) - input[1] = Channel.value(file(params.fasta, checkIfExists:true)) - input[2] = Channel.value(file(params.fai, checkIfExists:true)) - input[3] = Channel.value(file(params.somalier_sites, checkIfExists:true)) + input[1] = Channel.value([[id:"ref"], file(params.fasta, checkIfExists:true)]) + input[2] = Channel.value([[id:"ref"], file(params.fai, checkIfExists:true)]) + input[3] = Channel.value([[id:"ref"], file(params.somalier_sites, checkIfExists:true)]) input[4] = Channel.of([ [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], file(params.ped, checkIfExists:true) @@ -54,9 +54,9 @@ nextflow_workflow { file(params.famvcf, checkIfExists:true), file(params.famtbi, checkIfExists:true) ]) - input[1] = Channel.value(file(params.fasta, checkIfExists:true)) - input[2] = Channel.value(file(params.fai, checkIfExists:true)) - input[3] = Channel.value(file(params.somalier_sites, checkIfExists:true)) + input[1] = Channel.value([[id:"ref"], file(params.fasta, checkIfExists:true)]) + input[2] = Channel.value([[id:"ref"], file(params.fai, checkIfExists:true)]) + input[3] = Channel.value([[id:"ref"], file(params.somalier_sites, checkIfExists:true)]) input[4] = Channel.of([ [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], [] From e33f082d29615f83580e54856d95a31c912115c1 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 10:14:54 +0200 Subject: [PATCH 08/28] fix somalier tests --- modules.json | 184 +++++++++++++----- .../somalier/relate/somalier-relate.diff | 36 ++++ 2 files changed, 174 insertions(+), 46 deletions(-) create mode 100644 modules/nf-core/somalier/relate/somalier-relate.diff diff --git a/modules.json b/modules.json index af06bdea..a684404e 100644 --- a/modules.json +++ b/modules.json @@ -8,208 +8,292 @@ "bcftools/annotate": { "branch": "master", "git_sha": "88ae68490e8f2478a1e1bbeedac970fd7cc73022", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/bcftools/annotate/bcftools-annotate.diff" }, "bcftools/concat": { "branch": "master", "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", - "installed_by": ["vcf_annotate_ensemblvep_snpeff"] + "installed_by": [ + "vcf_annotate_ensemblvep_snpeff" + ] }, "bcftools/filter": { "branch": "master", "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/norm": { "branch": "master", "git_sha": "f6cc00f107826cfaf1c933297b10ed1757b41479", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/pluginscatter": { "branch": "master", "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", - "installed_by": ["vcf_annotate_ensemblvep_snpeff"] + "installed_by": [ + "vcf_annotate_ensemblvep_snpeff" + ] }, "bcftools/query": { "branch": "master", "git_sha": "34ac993e081b32d2170ab790d0386b74122f9d36", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/reheader": { "branch": "master", "git_sha": "c32611ac6813055b9321d2827678e2f8aebcb394", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/sort": { "branch": "master", "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", - "installed_by": ["vcf_annotate_ensemblvep_snpeff"] + "installed_by": [ + "vcf_annotate_ensemblvep_snpeff" + ] }, "bcftools/stats": { "branch": "master", "git_sha": "a5ba4d59c2b248c0379b0f8aeb4e7e754566cd1f", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/intersect": { "branch": "master", "git_sha": "575e1bc54b083fb15e7dd8b5fcc40bea60e8ce83", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/merge": { "branch": "master", "git_sha": "a3d614e4a7b8691a259bcfe33ad80903217d6215", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/split": { "branch": "master", "git_sha": "6dc8a32e32158bb4d3f9af92c802233b5d4f8e4d", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ensemblvep/download": { "branch": "master", "git_sha": "54c183cba37cac58860d9967feaae54acf9cc3e0", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ensemblvep/vep": { "branch": "master", "git_sha": "54c183cba37cac58860d9967feaae54acf9cc3e0", - "installed_by": ["vcf_annotate_ensemblvep_snpeff"] + "installed_by": [ + "vcf_annotate_ensemblvep_snpeff" + ] }, "gatk4/calibratedragstrmodel": { "branch": "master", "git_sha": "3f42e07a1133064c569b0dbe182979527bca9e59", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/composestrtablefile": { "branch": "master", "git_sha": "926e2f394d01c71d3abbdbca9c588630bfe51abf", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/createsequencedictionary": { "branch": "master", "git_sha": "e6fe277739f5894711405af3e717b2470bd956b5", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/genomicsdbimport": { "branch": "master", "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/genotypegvcfs": { "branch": "master", "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/haplotypecaller": { "branch": "master", "git_sha": "c332ea831f95f750be962c4b5de655f7a1e6e245", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gawk": { "branch": "master", "git_sha": "cf3ed075695639b0a0924eb0901146df1996dc08", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "mosdepth": { "branch": "master", "git_sha": "9bfc81874554e87740bcb3e5e07acf0a153c9ecb", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "multiqc": { "branch": "master", "git_sha": "19ca321db5d8bd48923262c2eca6422359633491", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "rtgtools/format": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "rtgtools/pedfilter": { "branch": "master", "git_sha": "c1c2a770cfb0bfbf093a2434a27f091ebbc65987", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "rtgtools/rocplot": { "branch": "master", "git_sha": "64770369d851c45c364e410e052ef9a6c3a7d2bb", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "rtgtools/vcfeval": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/convert": { "branch": "master", "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/faidx": { "branch": "master", "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/index": { "branch": "master", "git_sha": "46eca555142d6e597729fcb682adcc791796f514", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/merge": { "branch": "master", "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "snpeff/snpeff": { "branch": "master", "git_sha": "3ad7292d9b8da881386e9d5b58364d7da489b38b", - "installed_by": ["vcf_annotate_ensemblvep_snpeff"] + "installed_by": [ + "vcf_annotate_ensemblvep_snpeff" + ] }, "somalier/extract": { "branch": "master", "git_sha": "458c882987320e27fc90723ec96c127a243a5497", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "somalier/relate": { "branch": "master", "git_sha": "458c882987320e27fc90723ec96c127a243a5497", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ], + "patch": "modules/nf-core/somalier/relate/somalier-relate.diff" }, "tabix/bgzip": { "branch": "master", "git_sha": "b20be35facfc5acdc1259f132ed79339d79e989f", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/bgziptabix": { "branch": "master", "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/tabix": { "branch": "master", "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", - "installed_by": ["modules", "vcf_annotate_ensemblvep_snpeff"] + "installed_by": [ + "modules", + "vcf_annotate_ensemblvep_snpeff" + ] }, "untar": { "branch": "master", "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "vardictjava": { "branch": "master", "git_sha": "e61e5a13ef49c5595986bd31efb85c3f0709a282", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "vcf2db": { "branch": "master", "git_sha": "730f3aee80d5f8d0b5fc532202ac59361414d006", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "vcfanno": { "branch": "master", "git_sha": "9a8bba5910982ae637dedb8664e3121db77e173f", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] } } }, @@ -218,25 +302,33 @@ "utils_nextflow_pipeline": { "branch": "master", "git_sha": "d20fb2a9cc3e2835e9d067d1046a63252eb17352", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "2fdce49d30c0254f76bc0f13c55c17455c1251ab", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "bbd5a41f4535a8defafe6080e00ea74c45f4f96c", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "vcf_annotate_ensemblvep_snpeff": { "branch": "master", "git_sha": "cfd937a668919d948f6fcbf4218e79de50c2f36f", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/somalier/relate/somalier-relate.diff b/modules/nf-core/somalier/relate/somalier-relate.diff new file mode 100644 index 00000000..918d80b2 --- /dev/null +++ b/modules/nf-core/somalier/relate/somalier-relate.diff @@ -0,0 +1,36 @@ +Changes in module 'nf-core/somalier/relate' +Changes in 'somalier/relate/main.nf': +--- modules/nf-core/somalier/relate/main.nf ++++ modules/nf-core/somalier/relate/main.nf +@@ -16,6 +16,7 @@ + tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.pairs.tsv"), emit: pairs_tsv + tuple val(meta), path("*.samples.tsv"), emit: samples_tsv ++ tuple val(meta), path("*.ped"), emit: ped + path "versions.yml", emit: versions + + when: +@@ -36,6 +37,8 @@ + ${sample_groups_command} \\ + ${ped_command} + ++ cut -f1-6 ${prefix}.samples.tsv | sed -e 's/-9/0/' > ${prefix}_somalier.ped ++ + cat <<-END_VERSIONS > versions.yml + "${task.process}": + somalier: \$(echo \$(somalier 2>&1) | sed 's/^.*somalier version: //; s/Commands:.*\$//') +@@ -49,6 +52,7 @@ + touch ${prefix}.html + touch ${prefix}.pairs.tsv + touch ${prefix}.samples.tsv ++ touch ${prefix}_somalier.ped + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + +'modules/nf-core/somalier/relate/environment.yml' is unchanged +'modules/nf-core/somalier/relate/meta.yml' is unchanged +'modules/nf-core/somalier/relate/tests/tags.yml' is unchanged +'modules/nf-core/somalier/relate/tests/main.nf.test' is unchanged +'modules/nf-core/somalier/relate/tests/main.nf.test.snap' is unchanged +************************************************************ From f852ed288815eb34c885bfbdce6e30350912fbe6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 10:42:02 +0200 Subject: [PATCH 09/28] fix rtgtools testz --- modules/nf-core/rtgtools/pedfilter/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nf-core/rtgtools/pedfilter/main.nf b/modules/nf-core/rtgtools/pedfilter/main.nf index f6486e17..c06a33fa 100644 --- a/modules/nf-core/rtgtools/pedfilter/main.nf +++ b/modules/nf-core/rtgtools/pedfilter/main.nf @@ -34,6 +34,7 @@ process RTGTOOLS_PEDFILTER { rtg pedfilter \\ ${args} \\ ${input} \\ + | head -n -1 \\ ${postprocess} > ${prefix}.${extension} From b481cb557b54203c65fd488e0b67da88b660f87a Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 10:42:23 +0200 Subject: [PATCH 10/28] fix rtgtools testz --- modules.json | 3 ++- .../pedfilter/rtgtools-pedfilter.diff | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff diff --git a/modules.json b/modules.json index a684404e..05ffdf2e 100644 --- a/modules.json +++ b/modules.json @@ -179,7 +179,8 @@ "git_sha": "c1c2a770cfb0bfbf093a2434a27f091ebbc65987", "installed_by": [ "modules" - ] + ], + "patch": "modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff" }, "rtgtools/rocplot": { "branch": "master", diff --git a/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff b/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff new file mode 100644 index 00000000..18590bf8 --- /dev/null +++ b/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rtgtools/pedfilter' +Changes in 'rtgtools/pedfilter/main.nf': +--- modules/nf-core/rtgtools/pedfilter/main.nf ++++ modules/nf-core/rtgtools/pedfilter/main.nf +@@ -34,6 +34,7 @@ + rtg pedfilter \\ + ${args} \\ + ${input} \\ ++ | head -n -1 \\ + ${postprocess} > ${prefix}.${extension} + + + +'modules/nf-core/rtgtools/pedfilter/environment.yml' is unchanged +'modules/nf-core/rtgtools/pedfilter/meta.yml' is unchanged +'modules/nf-core/rtgtools/pedfilter/tests/main.nf.test' is unchanged +'modules/nf-core/rtgtools/pedfilter/tests/main.nf.test.snap' is unchanged +'modules/nf-core/rtgtools/pedfilter/tests/nextflow.config' is unchanged +************************************************************ From 20411ca26176b1a9dfaa22349be0c9f6deaaa948 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 11:27:11 +0200 Subject: [PATCH 11/28] fix more failing tests --- .github/workflows/linting.yml | 3 +- conf/modules.config | 2 +- modules.json | 183 +++++------------- .../local/cram_call_vardictjava/main.nf | 6 +- .../cram_call_genotype_gatk4/main.nf.test | 40 ++-- .../main.nf.test.snap | 40 ++-- 6 files changed, 86 insertions(+), 188 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 7d4ad177..9593436d 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -50,7 +50,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} + pip install git+https://github.com/nf-core/tools@dev + #pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} - name: Run nf-core pipelines lint env: diff --git a/conf/modules.config b/conf/modules.config index f8f93e8f..917f26c0 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -333,7 +333,7 @@ process { } withName: "^.*CRAM_CALL_VARDICTJAVA:VCF_FILTER_BCFTOOLS:FILTER_2\$" { - ext.args = "--soft-filter 'LowFreqBias' --mode '+' -e 'FORMAT/AF[0] < 0.02 && FORMAT/VD[0] < 30 && INFO/SBF < 0.1 && INFO/NM >= 2.0' --output-type z" + ext.args = "--soft-filter 'LowFreqBias' --mode '+' -e 'FORMAT/AF[0:*] < 0.02 && FORMAT/VD[0] < 30 && INFO/SBF < 0.1 && INFO/NM >= 2.0' --output-type z" ext.prefix = enableOutput("filter") ? final_prefix : {"${meta.id}.filtered"} publishDir = [ overwrite: true, diff --git a/modules.json b/modules.json index 05ffdf2e..b4661fa0 100644 --- a/modules.json +++ b/modules.json @@ -8,293 +8,210 @@ "bcftools/annotate": { "branch": "master", "git_sha": "88ae68490e8f2478a1e1bbeedac970fd7cc73022", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/bcftools/annotate/bcftools-annotate.diff" }, "bcftools/concat": { "branch": "master", "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", - "installed_by": [ - "vcf_annotate_ensemblvep_snpeff" - ] + "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/filter": { "branch": "master", "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/norm": { "branch": "master", "git_sha": "f6cc00f107826cfaf1c933297b10ed1757b41479", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/pluginscatter": { "branch": "master", "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", - "installed_by": [ - "vcf_annotate_ensemblvep_snpeff" - ] + "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/query": { "branch": "master", "git_sha": "34ac993e081b32d2170ab790d0386b74122f9d36", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/reheader": { "branch": "master", "git_sha": "c32611ac6813055b9321d2827678e2f8aebcb394", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/sort": { "branch": "master", "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", - "installed_by": [ - "vcf_annotate_ensemblvep_snpeff" - ] + "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/stats": { "branch": "master", "git_sha": "a5ba4d59c2b248c0379b0f8aeb4e7e754566cd1f", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/intersect": { "branch": "master", "git_sha": "575e1bc54b083fb15e7dd8b5fcc40bea60e8ce83", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/merge": { "branch": "master", "git_sha": "a3d614e4a7b8691a259bcfe33ad80903217d6215", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/split": { "branch": "master", "git_sha": "6dc8a32e32158bb4d3f9af92c802233b5d4f8e4d", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ensemblvep/download": { "branch": "master", "git_sha": "54c183cba37cac58860d9967feaae54acf9cc3e0", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ensemblvep/vep": { "branch": "master", "git_sha": "54c183cba37cac58860d9967feaae54acf9cc3e0", - "installed_by": [ - "vcf_annotate_ensemblvep_snpeff" - ] + "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "gatk4/calibratedragstrmodel": { "branch": "master", "git_sha": "3f42e07a1133064c569b0dbe182979527bca9e59", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/composestrtablefile": { "branch": "master", "git_sha": "926e2f394d01c71d3abbdbca9c588630bfe51abf", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/createsequencedictionary": { "branch": "master", "git_sha": "e6fe277739f5894711405af3e717b2470bd956b5", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/genomicsdbimport": { "branch": "master", "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/genotypegvcfs": { "branch": "master", "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/haplotypecaller": { "branch": "master", "git_sha": "c332ea831f95f750be962c4b5de655f7a1e6e245", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gawk": { "branch": "master", "git_sha": "cf3ed075695639b0a0924eb0901146df1996dc08", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "mosdepth": { "branch": "master", "git_sha": "9bfc81874554e87740bcb3e5e07acf0a153c9ecb", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "multiqc": { "branch": "master", "git_sha": "19ca321db5d8bd48923262c2eca6422359633491", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "rtgtools/format": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "rtgtools/pedfilter": { "branch": "master", "git_sha": "c1c2a770cfb0bfbf093a2434a27f091ebbc65987", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff" }, "rtgtools/rocplot": { "branch": "master", "git_sha": "64770369d851c45c364e410e052ef9a6c3a7d2bb", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "rtgtools/vcfeval": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/convert": { "branch": "master", "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", "git_sha": "46eca555142d6e597729fcb682adcc791796f514", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/merge": { "branch": "master", "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "snpeff/snpeff": { "branch": "master", "git_sha": "3ad7292d9b8da881386e9d5b58364d7da489b38b", - "installed_by": [ - "vcf_annotate_ensemblvep_snpeff" - ] + "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "somalier/extract": { "branch": "master", "git_sha": "458c882987320e27fc90723ec96c127a243a5497", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "somalier/relate": { "branch": "master", "git_sha": "458c882987320e27fc90723ec96c127a243a5497", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/somalier/relate/somalier-relate.diff" }, "tabix/bgzip": { "branch": "master", "git_sha": "b20be35facfc5acdc1259f132ed79339d79e989f", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/bgziptabix": { "branch": "master", "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", - "installed_by": [ - "modules", - "vcf_annotate_ensemblvep_snpeff" - ] + "installed_by": ["modules", "vcf_annotate_ensemblvep_snpeff"] }, "untar": { "branch": "master", "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "vardictjava": { "branch": "master", "git_sha": "e61e5a13ef49c5595986bd31efb85c3f0709a282", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "vcf2db": { "branch": "master", "git_sha": "730f3aee80d5f8d0b5fc532202ac59361414d006", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "vcfanno": { "branch": "master", "git_sha": "9a8bba5910982ae637dedb8664e3121db77e173f", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -303,33 +220,25 @@ "utils_nextflow_pipeline": { "branch": "master", "git_sha": "d20fb2a9cc3e2835e9d067d1046a63252eb17352", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "2fdce49d30c0254f76bc0f13c55c17455c1251ab", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "bbd5a41f4535a8defafe6080e00ea74c45f4f96c", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "vcf_annotate_ensemblvep_snpeff": { "branch": "master", "git_sha": "cfd937a668919d948f6fcbf4218e79de50c2f36f", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} diff --git a/subworkflows/local/cram_call_vardictjava/main.nf b/subworkflows/local/cram_call_vardictjava/main.nf index 0475d947..e7486627 100644 --- a/subworkflows/local/cram_call_vardictjava/main.nf +++ b/subworkflows/local/cram_call_vardictjava/main.nf @@ -1,6 +1,6 @@ include { SAMTOOLS_CONVERT } from '../../../modules/nf-core/samtools/convert/main' include { VARDICTJAVA } from '../../../modules/nf-core/vardictjava/main' -include { TABIX_BGZIPTABIX as TABIX_SPLIT } from '../../../modules/nf-core/tabix/bgziptabix/main' +include { TABIX_TABIX as TABIX_SPLIT } from '../../../modules/nf-core/tabix/tabix/main' include { TABIX_BGZIPTABIX as TABIX_VCFANNO } from '../../../modules/nf-core/tabix/bgziptabix/main' include { BCFTOOLS_REHEADER } from '../../../modules/nf-core/bcftools/reheader/main' include { VCFANNO } from '../../../modules/nf-core/vcfanno/main' @@ -52,7 +52,7 @@ workflow CRAM_CALL_VARDICTJAVA { .set { ch_vardict_crams } ch_cram_bam.bam - .mix(SAMTOOLS_CONVERT.out.alignment_index) + .mix(SAMTOOLS_CONVERT.out.bam.join(SAMTOOLS_CONVERT.out.bai, failOnMismatch:true, failOnDuplicate:true)) .combine(ch_vardict_crams, by:0) .map { meta, bam, bai, cram, crai, bed, split_count -> def new_meta = meta + [id:bed.baseName, split_count:split_count] @@ -73,7 +73,7 @@ workflow CRAM_CALL_VARDICTJAVA { ch_versions = ch_versions.mix(TABIX_SPLIT.out.versions.first()) VCF_CONCAT_BCFTOOLS( - TABIX_SPLIT.out.gz_tbi, + VARDICTJAVA.out.vcf.join(TABIX_SPLIT.out.tbi, failOnMismatch:true, failOnDuplicate:true), false ) ch_versions = ch_versions.mix(VCF_CONCAT_BCFTOOLS.out.versions) diff --git a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test index 7ad15931..33425c77 100644 --- a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test +++ b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test @@ -53,8 +53,8 @@ nextflow_workflow { [id:"strtablefile"], file(params.strtablefile, checkIfExists:true) ]) - input[6] = [] - input[7] = [] + input[6] = [[],[]] + input[7] = [[],[]] input[8] = false input[9] = false input[10] = false @@ -106,10 +106,8 @@ nextflow_workflow { [id:"strtablefile"], file(params.strtablefile, checkIfExists:true) ]) - input[6] = [] - input[7] = [] - input[6] = [] - input[7] = [] + input[6] = [[],[]] + input[7] = [[],[]] input[8] = false input[9] = false input[10] = false @@ -180,10 +178,8 @@ nextflow_workflow { [id:"strtablefile"], file(params.strtablefile, checkIfExists:true) ]) - input[6] = [] - input[7] = [] - input[6] = [] - input[7] = [] + input[6] = [[],[]] + input[7] = [[],[]] input[8] = false input[9] = false input[10] = false @@ -255,10 +251,8 @@ nextflow_workflow { [id:"strtablefile"], file(params.strtablefile, checkIfExists:true) ]) - input[6] = [] - input[7] = [] - input[6] = [] - input[7] = [] + input[6] = [[],[]] + input[7] = [[],[]] input[8] = false input[9] = false input[10] = false @@ -330,10 +324,8 @@ nextflow_workflow { [id:"strtablefile"], file(params.strtablefile, checkIfExists:true) ]) - input[6] = [] - input[7] = [] - input[6] = [] - input[7] = [] + input[6] = [[],[]] + input[7] = [[],[]] input[8] = false input[9] = true input[10] = false @@ -405,10 +397,8 @@ nextflow_workflow { [id:"strtablefile"], file(params.strtablefile, checkIfExists:true) ]) - input[6] = [] - input[7] = [] - input[6] = [] - input[7] = [] + input[6] = [[],[]] + input[7] = [[],[]] input[8] = false input[9] = false input[10] = true @@ -479,10 +469,8 @@ nextflow_workflow { [id:"strtablefile"], file(params.strtablefile, checkIfExists:true) ]) - input[6] = [] - input[7] = [] - input[6] = [] - input[7] = [] + input[6] = [[],[]] + input[7] = [[],[]] input[8] = false input[9] = false input[10] = false diff --git a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap index 64e23b12..6c932f93 100644 --- a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap +++ b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap @@ -6,15 +6,15 @@ ], [ [ - "NA24835.haplotypecaller.bcftools_stats.txt:md5,cf8d900f4a7f7844bf1ece4478010459" + "NA24835.haplotypecaller.bcftools_stats.txt:md5,5f42bee02b2bd0d2af2954292ec3b422" ] ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T10:12:27.678293492" + "timestamp": "2024-09-05T11:20:45.005084818" }, "default - family": { "content": [ @@ -33,15 +33,15 @@ ], [ [ - "NA24835.haplotypecaller.bcftools_stats.txt:md5,cf8d900f4a7f7844bf1ece4478010459" + "NA24835.haplotypecaller.bcftools_stats.txt:md5,5f42bee02b2bd0d2af2954292ec3b422" ] ] ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T13:01:36.711373912" + "timestamp": "2024-09-05T11:18:02.353352239" }, "filter - family": { "content": [ @@ -60,15 +60,15 @@ ], [ [ - "NA24835.haplotypecaller.bcftools_stats.txt:md5,cf8d900f4a7f7844bf1ece4478010459" + "NA24835.haplotypecaller.bcftools_stats.txt:md5,5f42bee02b2bd0d2af2954292ec3b422" ] ] ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T13:02:26.651064532" + "timestamp": "2024-09-05T11:19:14.883570897" }, "default - gvcfs": { "content": [ @@ -112,15 +112,15 @@ ], [ [ - "NA24143.haplotypecaller.bcftools_stats.txt:md5,8832acfa6af30e9225b151da201733c3" + "NA24143.haplotypecaller.bcftools_stats.txt:md5,09b4e7674e0f5b98b1e548df3002250e" ] ] ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T12:55:51.608812907" + "timestamp": "2024-09-05T11:16:25.448441115" }, "only_call - family": { "content": [ @@ -129,15 +129,15 @@ ], [ [ - "NA24835.haplotypecaller.bcftools_stats.txt:md5,cf8d900f4a7f7844bf1ece4478010459" + "NA24835.haplotypecaller.bcftools_stats.txt:md5,5f42bee02b2bd0d2af2954292ec3b422" ] ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T10:11:35.142110509" + "timestamp": "2024-09-05T11:20:04.714403906" }, "only_merge - sample + family": { "content": [ @@ -156,14 +156,14 @@ ], [ [ - "NA24835.haplotypecaller.bcftools_stats.txt:md5,cf8d900f4a7f7844bf1ece4478010459" + "NA24835.haplotypecaller.bcftools_stats.txt:md5,5f42bee02b2bd0d2af2954292ec3b422" ] ] ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T13:04:20.473178165" + "timestamp": "2024-09-05T11:21:57.601081087" } } \ No newline at end of file From 2adfe1bab2f492dd6c69728ef3b1602b63967991 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 12:44:54 +0200 Subject: [PATCH 12/28] fix all the things? --- .../local/cram_call_vardictjava/main.nf | 2 +- tests/pipeline/callers/main.nf.test.snap | 38 ++++++---- tests/pipeline/default/main.nf.test.snap | 12 ++-- tests/pipeline/gvcfs/main.nf.test.snap | 9 +-- tests/pipeline/variations/main.nf.test.snap | 71 ++++++++++++------- tests/pipeline/variations2/main.nf.test.snap | 60 ++++++++++------ .../local/cram_call_vardictjava/main.nf.test | 12 ++-- 7 files changed, 133 insertions(+), 71 deletions(-) diff --git a/subworkflows/local/cram_call_vardictjava/main.nf b/subworkflows/local/cram_call_vardictjava/main.nf index e7486627..203bdc7c 100644 --- a/subworkflows/local/cram_call_vardictjava/main.nf +++ b/subworkflows/local/cram_call_vardictjava/main.nf @@ -79,7 +79,7 @@ workflow CRAM_CALL_VARDICTJAVA { ch_versions = ch_versions.mix(VCF_CONCAT_BCFTOOLS.out.versions) ch_dbsnp_annotated = Channel.empty() - if(ch_dbsnp) { + if(ch_dbsnp != [[],[]]) { ch_dbsnp .map { meta, dbsnp -> [ get_vcfanno_config(dbsnp) ] } .collect() diff --git a/tests/pipeline/callers/main.nf.test.snap b/tests/pipeline/callers/main.nf.test.snap index b6f693f0..babe4775 100644 --- a/tests/pipeline/callers/main.nf.test.snap +++ b/tests/pipeline/callers/main.nf.test.snap @@ -2,23 +2,26 @@ "haplotypecaller": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -29,37 +32,41 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T15:40:41.593827142" + "timestamp": "2024-09-05T11:39:15.537730988" }, "vardict + haplotypecaller": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -70,15 +77,19 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/NA24143.vardict.ped", "test/Ashkenazim/NA24143.vardict.vcf.gz", + "test/Ashkenazim/NA24143.vardict.vcf.gz.csi", "test/Ashkenazim/NA24143.vardict.vcf.gz.tbi", "test/Ashkenazim/NA24149.vardict.ped", "test/Ashkenazim/NA24149.vardict.vcf.gz", + "test/Ashkenazim/NA24149.vardict.vcf.gz.csi", "test/Ashkenazim/NA24149.vardict.vcf.gz.tbi", "test/Ashkenazim/NA24385.vardict.ped", "test/Ashkenazim/NA24385.vardict.vcf.gz", + "test/Ashkenazim/NA24385.vardict.vcf.gz.csi", "test/Ashkenazim/NA24385.vardict.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html", @@ -91,15 +102,15 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T15:41:56.768447097" + "timestamp": "2024-09-05T11:56:32.019963111" }, "vardict": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", @@ -116,12 +127,15 @@ "samplesheet.csv", "test/Ashkenazim/NA24143.vardict.ped", "test/Ashkenazim/NA24143.vardict.vcf.gz", + "test/Ashkenazim/NA24143.vardict.vcf.gz.csi", "test/Ashkenazim/NA24143.vardict.vcf.gz.tbi", "test/Ashkenazim/NA24149.vardict.ped", "test/Ashkenazim/NA24149.vardict.vcf.gz", + "test/Ashkenazim/NA24149.vardict.vcf.gz.csi", "test/Ashkenazim/NA24149.vardict.vcf.gz.tbi", "test/Ashkenazim/NA24385.vardict.ped", "test/Ashkenazim/NA24385.vardict.vcf.gz", + "test/Ashkenazim/NA24385.vardict.vcf.gz.csi", "test/Ashkenazim/NA24385.vardict.vcf.gz.tbi", "test/Ashkenazim/reports/NA24143.vardict.bcftools_stats.txt", "test/Ashkenazim/reports/NA24143.vardict.somalier.html", @@ -132,9 +146,9 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T15:39:37.704366119" + "timestamp": "2024-09-05T11:54:10.944847435" } } \ No newline at end of file diff --git a/tests/pipeline/default/main.nf.test.snap b/tests/pipeline/default/main.nf.test.snap index 4e35a9bf..30d78cd0 100644 --- a/tests/pipeline/default/main.nf.test.snap +++ b/tests/pipeline/default/main.nf.test.snap @@ -2,23 +2,26 @@ "default": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -29,15 +32,16 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T15:34:28.414261433" + "timestamp": "2024-09-05T11:40:36.127517277" } } \ No newline at end of file diff --git a/tests/pipeline/gvcfs/main.nf.test.snap b/tests/pipeline/gvcfs/main.nf.test.snap index 430c3e0a..03a3b401 100644 --- a/tests/pipeline/gvcfs/main.nf.test.snap +++ b/tests/pipeline/gvcfs/main.nf.test.snap @@ -2,7 +2,7 @@ "gvcfs": { "content": [ [ - + "[:]" ], [ "multiqc/multiqc_plots", @@ -11,15 +11,16 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T17:18:10.515388658" + "timestamp": "2024-09-05T11:41:32.108980116" } } \ No newline at end of file diff --git a/tests/pipeline/variations/main.nf.test.snap b/tests/pipeline/variations/main.nf.test.snap index 988e32fc..ee31f079 100644 --- a/tests/pipeline/variations/main.nf.test.snap +++ b/tests/pipeline/variations/main.nf.test.snap @@ -2,23 +2,26 @@ "filter": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -29,37 +32,41 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T15:57:27.216291382" + "timestamp": "2024-09-05T11:45:02.491962487" }, "only_call": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -70,31 +77,34 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T15:58:10.801784853" + "timestamp": "2024-09-05T11:45:47.266012698" }, "annotate + vcfanno": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -105,37 +115,42 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.gzi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T15:56:25.391105365" + "timestamp": "2024-09-05T11:43:47.539727235" }, "automap": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -146,6 +161,7 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/automap_haplotypecaller/sample1/sample1.HomRegions.cmgg_bio.tsv", "test/Ashkenazim/automap_haplotypecaller/sample1/sample1.HomRegions.pdf", @@ -164,31 +180,34 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-04-04T16:27:21.116595696" + "timestamp": "2024-09-05T11:47:48.972236882" }, "only_merge": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -200,31 +219,34 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T16:28:12.406463008" + "timestamp": "2024-09-05T11:46:37.403799074" }, "annotate": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -235,15 +257,16 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T15:47:35.270453118" + "timestamp": "2024-09-05T11:42:39.793880467" } } \ No newline at end of file diff --git a/tests/pipeline/variations2/main.nf.test.snap b/tests/pipeline/variations2/main.nf.test.snap index af8cfcfd..ba145d7e 100644 --- a/tests/pipeline/variations2/main.nf.test.snap +++ b/tests/pipeline/variations2/main.nf.test.snap @@ -2,23 +2,26 @@ "gemini": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -30,37 +33,41 @@ "test/Ashkenazim/Ashkenazim.haplotypecaller.db", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T16:31:52.936259443" + "timestamp": "2024-09-05T11:59:55.764681555" }, "normalize": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -71,37 +78,41 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T17:04:19.112262269" + "timestamp": "2024-09-05T11:57:36.725019238" }, "updio": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -112,37 +123,41 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T16:30:38.464359399" + "timestamp": "2024-09-05T11:58:51.377552309" }, "add_ped": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", "NA24143/reports/NA24143.summary.txt", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", "NA24149/reports/NA24149.summary.txt", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -153,25 +168,27 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T17:09:21.531982672" + "timestamp": "2024-09-05T12:02:31.850254513" }, "validate": { "content": [ [ - + "[:]" ], [ "NA24143/NA24143.bed", "NA24143/NA24143.haplotypecaller.g.vcf.gz", + "NA24143/NA24143.haplotypecaller.g.vcf.gz.csi", "NA24143/NA24143.haplotypecaller.g.vcf.gz.tbi", "NA24143/reports/NA24143.global.dist.txt", "NA24143/reports/NA24143.haplotypecaller.bcftools_stats.txt", @@ -197,6 +214,7 @@ "NA24143/validation/haplotypecaller/NA24143.weighted_roc.tsv.gz", "NA24149/NA24149.bed", "NA24149/NA24149.haplotypecaller.g.vcf.gz", + "NA24149/NA24149.haplotypecaller.g.vcf.gz.csi", "NA24149/NA24149.haplotypecaller.g.vcf.gz.tbi", "NA24149/reports/NA24149.global.dist.txt", "NA24149/reports/NA24149.haplotypecaller.bcftools_stats.txt", @@ -222,6 +240,7 @@ "NA24149/validation/haplotypecaller/NA24149.weighted_roc.tsv.gz", "NA24385/NA24385.bed", "NA24385/NA24385.haplotypecaller.g.vcf.gz", + "NA24385/NA24385.haplotypecaller.g.vcf.gz.csi", "NA24385/NA24385.haplotypecaller.g.vcf.gz.tbi", "NA24385/reports/NA24385.global.dist.txt", "NA24385/reports/NA24385.haplotypecaller.bcftools_stats.txt", @@ -251,15 +270,16 @@ "test/Ashkenazim/Ashkenazim.bed", "test/Ashkenazim/Ashkenazim.haplotypecaller.ped", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz", + "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.csi", "test/Ashkenazim/Ashkenazim.haplotypecaller.vcf.gz.tbi", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.bcftools_stats.txt", "test/Ashkenazim/reports/Ashkenazim.haplotypecaller.somalier.html" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T16:33:15.226868795" + "timestamp": "2024-09-05T12:01:21.850991249" } } \ No newline at end of file diff --git a/tests/subworkflows/local/cram_call_vardictjava/main.nf.test b/tests/subworkflows/local/cram_call_vardictjava/main.nf.test index 6cf959b0..b0914d97 100644 --- a/tests/subworkflows/local/cram_call_vardictjava/main.nf.test +++ b/tests/subworkflows/local/cram_call_vardictjava/main.nf.test @@ -48,8 +48,8 @@ nextflow_workflow { [id:"fai"], file(params.fai, checkIfExists:true) ]) - input[4] = [] - input[5] = [] + input[4] = [[],[]] + input[5] = [[],[]] input[6] = false """ } @@ -105,8 +105,8 @@ nextflow_workflow { [id:"fai"], file(params.fai, checkIfExists:true) ]) - input[4] = [] - input[5] = [] + input[4] = [[],[]] + input[5] = [[],[]] input[6] = true """ } @@ -180,8 +180,8 @@ nextflow_workflow { [id:"fai"], file(params.fai, checkIfExists:true) ]) - input[4] = [] - input[5] = [] + input[4] = [[],[]] + input[5] = [[],[]] input[6] = false """ } From 96300061ba615d2d6c9a7732c9ed799b28d59575 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 12:45:46 +0200 Subject: [PATCH 13/28] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e59e9f4..50d6471f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Changes 1. Bumped the minimal support nextflow version to `24.04.0` +2. Bumped all modules to the newest versions +3. The pipeline now also outputs `csi` indices ## Refactors From 1565a9f2ee3c9e35584daccc3d474bee16e8460f Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 13:04:45 +0200 Subject: [PATCH 14/28] fix final test? --- .../local/vcf_annotation/main.nf.test.snap | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/subworkflows/local/vcf_annotation/main.nf.test.snap b/tests/subworkflows/local/vcf_annotation/main.nf.test.snap index fdec0b82..12d0ef2c 100644 --- a/tests/subworkflows/local/vcf_annotation/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_annotation/main.nf.test.snap @@ -13,16 +13,16 @@ ] ], [ - "NA241431_annotated.summary.html:md5,d41d8cd98f00b204e9800998ecf8427e", - "NA241432_annotated.summary.html:md5,d41d8cd98f00b204e9800998ecf8427e", - "NA241433_annotated.summary.html:md5,d41d8cd98f00b204e9800998ecf8427e" + "NA241430_annotated_summary.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "NA241431_annotated_summary.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "NA241432_annotated_summary.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-28T09:26:20.34701886" + "timestamp": "2024-09-05T12:53:05.739638954" }, "vcfanno": { "content": [ @@ -38,15 +38,15 @@ ] ], [ - "NA241431_annotated.summary.html:md5,d41d8cd98f00b204e9800998ecf8427e", - "NA241432_annotated.summary.html:md5,d41d8cd98f00b204e9800998ecf8427e", - "NA241433_annotated.summary.html:md5,d41d8cd98f00b204e9800998ecf8427e" + "NA241430_annotated_summary.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "NA241431_annotated_summary.html:md5,d41d8cd98f00b204e9800998ecf8427e", + "NA241432_annotated_summary.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-28T09:26:37.223392102" + "timestamp": "2024-09-05T12:53:27.894947052" } } \ No newline at end of file From e6681303f127a6dc782b43b6e8dabe89188d03b7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 13:10:29 +0200 Subject: [PATCH 15/28] make nf-core happy again --- .nf-core.yml | 2 +- modules.json | 2 +- .../genotypegvcfs/gatk4-genotypegvcfs.diff | 13 - modules/nf-core/gatk4/genotypegvcfs/meta.yml | 29 +- .../gatk4/genotypegvcfs/tests/main.nf.test | 285 ++++++++++++++++++ .../genotypegvcfs/tests/main.nf.test.snap | 191 ++++++++++++ 6 files changed, 505 insertions(+), 17 deletions(-) delete mode 100644 modules/nf-core/gatk4/genotypegvcfs/gatk4-genotypegvcfs.diff create mode 100644 modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test create mode 100644 modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test.snap diff --git a/.nf-core.yml b/.nf-core.yml index 7d44b8c7..d6b21f91 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -12,7 +12,7 @@ lint: - ".github/CONTRIBUTING.md" - ".github/PULL_REQUEST_TEMPLATE.md" - ".github/workflows/linting_comment.yml" - - ".github/linting.yml" + - ".github/workflows/linting.yml" - "CODE_OF_CONDUCT.md" - ".github/ISSUE_TEMPLATE/bug_report.yml" - ".prettierignore" diff --git a/modules.json b/modules.json index b4661fa0..b9a65237 100644 --- a/modules.json +++ b/modules.json @@ -98,7 +98,7 @@ }, "gatk4/genotypegvcfs": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "8b74c800af3d91e0d7bfbecb902308dc4369071c", "installed_by": ["modules"] }, "gatk4/haplotypecaller": { diff --git a/modules/nf-core/gatk4/genotypegvcfs/gatk4-genotypegvcfs.diff b/modules/nf-core/gatk4/genotypegvcfs/gatk4-genotypegvcfs.diff deleted file mode 100644 index 2369ffbc..00000000 --- a/modules/nf-core/gatk4/genotypegvcfs/gatk4-genotypegvcfs.diff +++ /dev/null @@ -1,13 +0,0 @@ -Changes in module 'nf-core/gatk4/genotypegvcfs' ---- modules/nf-core/gatk4/genotypegvcfs/main.nf -+++ modules/nf-core/gatk4/genotypegvcfs/main.nf -@@ -1,6 +1,6 @@ - process GATK4_GENOTYPEGVCFS { - tag "$meta.id" -- label 'process_high' -+ label 'process_single' - - conda "bioconda::gatk4=4.4.0.0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - -************************************************************ diff --git a/modules/nf-core/gatk4/genotypegvcfs/meta.yml b/modules/nf-core/gatk4/genotypegvcfs/meta.yml index 8f1e377e..eb704364 100644 --- a/modules/nf-core/gatk4/genotypegvcfs/meta.yml +++ b/modules/nf-core/gatk4/genotypegvcfs/meta.yml @@ -20,10 +20,10 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - gvcf: + - input: type: file description: | - gVCF(.gz) file or to a GenomicsDB + gVCF(.gz) file or a GenomicsDB pattern: "*.{vcf,vcf.gz}" - gvcf_index: type: file @@ -36,22 +36,47 @@ input: - intervals_index: type: file description: Interval index file (optional) + - meta2: + type: map + description: | + Groovy Map containing fasta information + e.g. [ id:'test' ] - fasta: type: file description: Reference fasta file pattern: "*.fasta" + - meta3: + type: map + description: | + Groovy Map containing fai information + e.g. [ id:'test' ] - fai: type: file description: Reference fasta index file pattern: "*.fai" + - meta4: + type: map + description: | + Groovy Map containing dict information + e.g. [ id:'test' ] - dict: type: file description: Reference fasta sequence dict file pattern: "*.dict" + - meta5: + type: map + description: | + Groovy Map containing dbsnp information + e.g. [ id:'test' ] - dbsnp: type: file description: dbSNP VCF file pattern: "*.vcf.gz" + - meta6: + type: map + description: | + Groovy Map containing dbsnp tbi information + e.g. [ id:'test' ] - dbsnp_tbi: type: file description: dbSNP VCF index file diff --git a/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test b/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test new file mode 100644 index 00000000..25bc2d38 --- /dev/null +++ b/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test @@ -0,0 +1,285 @@ +nextflow_process { + + name "Test Process GATK4_GENOTYPEGVCFS" + script "../main.nf" + process "GATK4_GENOTYPEGVCFS" + + tag "modules" + tag "modules_nfcore" + tag "gatk4" + tag "gatk4/genotypegvcfs" + tag "untar" + + setup { + run("UNTAR") { + script "../../../untar/main.nf" + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_genomicsdb.tar.gz', checkIfExists: true) + ] + """ + } + } + } + + test("homo_sapiens - [gvcf, idx, [], []], fasta, fai, dict, [], []") { + + when { + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx', checkIfExists: true), + [], + [] + ] + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gvcf_gz, tbi, [], []], fasta, fai, dict, dbsnp, dbsnp_tbi") { + + when { + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + [], + [] + ] + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [ + [id:"dbsnp"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz', checkIfExists:true) + ] + input[5] = [ + [id:"dbsnp"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi', checkIfExists:true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gvcf_gz, tbi, bed, []], fasta, fai, dict, [], []") { + + when { + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists:true), + [] + ] + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gendb, [], [], []], fasta, fai, dict, [], []") { + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, gendb -> [ meta, gendb, [], [], []] } + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gendb, bed, [], []], fasta, fai, dict, [], []") { + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, gendb -> + [ + meta, + gendb, + [], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists:true), + [] + ] + } + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf.collect { [it[0], path(it[1]).vcf.variantsMD5] }, + process.out.tbi.collect { [it[0], file(it[1]).name] }, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - [gvcf, idx, [], []], fasta, fai, dict, [], [] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [id:"test"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx', checkIfExists: true), + [], + [] + ] + input[1] = [ + [id:"fasta"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists:true) + ] + input[2] = [ + [id:"fai"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists:true) + ] + input[3] = [ + [id:"dict"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists:true) + ] + input[4] = [[],[]] + input[5] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test.snap b/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test.snap new file mode 100644 index 00000000..1621618e --- /dev/null +++ b/modules/nf-core/gatk4/genotypegvcfs/tests/main.nf.test.snap @@ -0,0 +1,191 @@ +{ + "homo_sapiens - [gendb, [], [], []], fasta, fai, dict, [], []": { + "content": [ + [ + [ + { + "id": "test" + }, + "1ab95fbc5ec55b208f3001572bec54fa" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:27:24.926097884" + }, + "homo_sapiens - [gvcf, idx, [], []], fasta, fai, dict, [], []": { + "content": [ + [ + [ + { + "id": "test" + }, + "1ab95fbc5ec55b208f3001572bec54fa" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:26:24.426228557" + }, + "homo_sapiens - [gvcf_gz, tbi, bed, []], fasta, fai, dict, [], []": { + "content": [ + [ + [ + { + "id": "test" + }, + "1ab95fbc5ec55b208f3001572bec54fa" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:27:04.179308513" + }, + "homo_sapiens - [gvcf_gz, tbi, [], []], fasta, fai, dict, dbsnp, dbsnp_tbi": { + "content": [ + [ + [ + { + "id": "test" + }, + "9b7d476515e07e5486633c42abd86cc" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:26:43.9088684" + }, + "homo_sapiens - [gvcf, idx, [], []], fasta, fai, dict, [], [] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ], + "tbi": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:19:57.615552867" + }, + "homo_sapiens - [gendb, bed, [], []], fasta, fai, dict, [], []": { + "content": [ + [ + [ + { + "id": "test" + }, + "1ab95fbc5ec55b208f3001572bec54fa" + ] + ], + [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,3c16cbf71737813609ad10d901d92ab3" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T14:27:46.189794941" + } +} \ No newline at end of file From 9a0b314ed532dd40bbe82f68fee8a2142ea293ce Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 5 Sep 2024 17:33:09 +0200 Subject: [PATCH 16/28] implement watchpath --- assets/schema_input.json | 68 ++++++-- conf/modules.config | 8 +- main.nf | 3 +- modules/local/automap/automap/main.nf | 2 +- nextflow_schema.json | 6 + .../cram_prepare_samtools_bedtools/main.nf | 15 +- .../local/gvcf_joint_genotype_gatk4/main.nf | 28 +-- .../utils_cmgg_germline_pipeline/main.nf | 46 ++--- subworkflows/local/vcf_upd_updio/main.nf | 6 +- subworkflows/local/watchpath_handling/main.nf | 160 ++++++++++++++++++ 10 files changed, 256 insertions(+), 86 deletions(-) create mode 100644 subworkflows/local/watchpath_handling/main.nf diff --git a/assets/schema_input.json b/assets/schema_input.json index f5de4eec..f1141ae6 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -16,28 +16,64 @@ "meta": ["family"] }, "cram": { - "type": "string", - "pattern": "^\\S+\\.cram$", - "format": "file-path", - "exists": true + "oneOf": [ + { + "type": "string", + "pattern": "^\\S+\\.cram$", + "format": "file-path", + "exists": true + }, + { + "type": "string", + "pattern": "^watch:\\S+\\.cram$", + "format": "file-path" + } + ] }, "crai": { - "type": "string", - "pattern": "^\\S+\\.crai$", - "format": "file-path", - "exists": true + "oneOf": [ + { + "type": "string", + "pattern": "^\\S+\\.cram\\.crai$", + "format": "file-path", + "exists": true + }, + { + "type": "string", + "pattern": "^watch:\\S+\\.cram\\.crai$", + "format": "file-path" + } + ] }, "gvcf": { - "type": "string", - "pattern": "^\\S+vcf(.gz)?$", - "format": "file-path", - "exists": true + "oneOf": [ + { + "type": "string", + "pattern": "^\\S+\\.g\\.vcf(\\.gz)?$", + "format": "file-path", + "exists": true + }, + { + "type": "string", + "pattern": "^watch:\\S+\\.g\\.vcf(\\.gz)?$", + "format": "file-path" + } + ] }, "tbi": { - "type": "string", - "pattern": "^\\S+\\.tbi$", - "format": "file-path", - "exists": true + "oneOf": [ + { + "type": "string", + "pattern": "^\\S+\\.g\\.vcf\\.gz\\.tbi$", + "format": "file-path", + "exists": true + }, + { + "type": "string", + "pattern": "^watch:\\S+\\.g\\.vcf\\.gz\\.tbi?$", + "format": "file-path" + } + ] }, "roi": { "type": "string", diff --git a/conf/modules.config b/conf/modules.config index 917f26c0..f07bb4f2 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -208,19 +208,19 @@ process { } withName: "^.*CRAM_CALL_GENOTYPE_GATK4:GVCF_JOINT_GENOTYPE_GATK4:GATK4_GENOMICSDBIMPORT\$" { - label = { meta.family_count <= 10 ? "process_medium" : "process_high" } + label = { meta.family_samples.tokenize(",").size() <= 10 ? "process_medium" : "process_high" } time = { 16.h * task.attempt } // Lots of parameters are fetched from https://gatk.broadinstitute.org/hc/en-us/articles/360056138571-GenomicsDBImport-usage-and-performance-guidelines ext.args = { [ - meta.family_count >= 100 ? "--batch-size 100" : "", + meta.family_samples.tokenize(",").size() >= 100 ? "--batch-size 100" : "", "--overwrite-existing-genomicsdb-workspace", "--genomicsdb-shared-posixfs-optimizations", "--merge-input-intervals", "--bypass-feature-reader", "--max-num-intervals-to-import-in-parallel ${task.cpus*10}", "--reader-threads ${task.cpus}", - meta.family_count >= 100 ? "--consolidate" : "", + meta.family_samples.tokenize(",").size() >= 100 ? "--consolidate" : "", "--merge-contigs-into-num-partitions 25" ].join(" ") } @@ -565,7 +565,7 @@ process { withName: "^.*VCF_ROH_AUTOMAP:AUTOMAP_AUTOMAP\$" { ext.prefix = {"automap_${meta.caller}"} ext.args = {[ - meta.family_count > 1 ? "--multivcf" : "--id ${meta.samples}", + meta.family_samples.tokenize(",").size() > 1 ? "--multivcf" : "--id ${meta.family_samples}", params.automap_panel_name ? "--panelname ${params.automap_panel_name}" : "" ].findAll { it != "" }.join(" ")} publishDir = [ diff --git a/main.nf b/main.nf index 988afc56..823c6263 100644 --- a/main.nf +++ b/main.nf @@ -208,7 +208,8 @@ workflow { params.input, params.ped, params.genomes, - params.genome + params.genome, + params.watchdir ) // diff --git a/modules/local/automap/automap/main.nf b/modules/local/automap/automap/main.nf index 36072031..b84535a9 100644 --- a/modules/local/automap/automap/main.nf +++ b/modules/local/automap/automap/main.nf @@ -42,7 +42,7 @@ process AUTOMAP_AUTOMAP { def panel_name = args.contains("--panelname") ? args.split("--panelname")[-1].trim().split(" ")[0] : "" prefix = task.ext.prefix ?: "${meta.id}" - def create_outputs = meta.family_count > 1 ? (1..meta.family_count).collect { number -> + def create_outputs = meta.family_samples.tokenize(",").size() > 1 ? (1..meta.family_samples.tokenize(",").size()).collect { number -> def cmd_prefix = "touch ${prefix}/sample${number}" [ "mkdir ${prefix}/sample${number}", diff --git a/nextflow_schema.json b/nextflow_schema.json index 0fc6f59f..31c7b78e 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -28,6 +28,12 @@ "description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.", "fa_icon": "fas fa-folder-open" }, + "watchdir": { + "type": "string", + "format": "directory-path", + "description": "A folder to watch for the creation of files that start with `watch:` in the samplesheet", + "fa_icon": "fas fa-folder-open" + }, "email": { "type": "string", "description": "Email address for completion summary.", diff --git a/subworkflows/local/cram_prepare_samtools_bedtools/main.nf b/subworkflows/local/cram_prepare_samtools_bedtools/main.nf index b4cdbef5..3be4dab3 100644 --- a/subworkflows/local/cram_prepare_samtools_bedtools/main.nf +++ b/subworkflows/local/cram_prepare_samtools_bedtools/main.nf @@ -31,7 +31,10 @@ workflow CRAM_PREPARE_SAMTOOLS_BEDTOOLS { // ch_crams - .groupTuple() // No size needed here because this runs before any process + .map { meta, cram, crai -> + [ groupKey(meta, meta.duplicate_count), cram, crai] + } + .groupTuple() .branch { meta, cram, crai -> multiple: cram.size() > 1 return [meta, cram] @@ -83,7 +86,10 @@ workflow CRAM_PREPARE_SAMTOOLS_BEDTOOLS { // ch_roi - .groupTuple() // A specified size isn't needed here since this runs before any process using ROI files is executed + .map { meta, roi -> + [ groupKey(meta, meta.duplicate_count), roi ] + } + .groupTuple() .branch { meta, roi -> // Determine whether there is an ROI file given to the current sample // It's possible that a sample is given multiple times in the samplesheet, in which @@ -123,7 +129,10 @@ workflow CRAM_PREPARE_SAMTOOLS_BEDTOOLS { ch_versions = ch_versions.mix(MERGE_ROI_PARAMS.out.versions) ch_roi_branch.missing - .groupTuple() // A specified size isn't needed here since this runs before any process using the default ROI file is executed + .map { meta, bed -> + [ groupKey(meta, meta.duplicate_count), bed ] + } + .groupTuple() .combine(MERGE_ROI_PARAMS.out.bed.map { meta, bed -> bed }) .map { meta, missing, default_roi -> [ meta, default_roi ] diff --git a/subworkflows/local/gvcf_joint_genotype_gatk4/main.nf b/subworkflows/local/gvcf_joint_genotype_gatk4/main.nf index 8c2a2a41..c9114b75 100644 --- a/subworkflows/local/gvcf_joint_genotype_gatk4/main.nf +++ b/subworkflows/local/gvcf_joint_genotype_gatk4/main.nf @@ -47,19 +47,10 @@ workflow GVCF_JOINT_GENOTYPE_GATK4 { ch_gvcfs .map { meta, gvcf, tbi -> // Create the family meta - def new_meta = [ - family: meta.family, - id: meta.family, - family_count: meta.family_count, - caller: meta.caller - ] - [ groupKey(new_meta, meta.family_count.toInteger()), gvcf, tbi, meta.sample ] + def new_meta = meta.subMap(["family", "family_samples", "caller"]) + [id:meta.family] + [ groupKey(new_meta, meta.family_samples.tokenize(",").size()), gvcf, tbi ] } .groupTuple() - .map { meta, gvcf, tbi, samples -> - def new_meta = meta + [samples: "${samples.sort(false).join(',')}"] // Having a comma-separated string ensures that joins don't fail - [ new_meta, gvcf, tbi ] - } .combine(GAWK.out.output.map { meta, bed -> bed }) .map { meta, gvcfs, tbis, bed -> [ meta, gvcfs, tbis, bed, [], [] ] @@ -87,19 +78,10 @@ workflow GVCF_JOINT_GENOTYPE_GATK4 { BCFTOOLS_QUERY.out.output .map { meta, bed -> // Create the family meta - def new_meta = [ - family: meta.family, - id: meta.family, - family_count: meta.family_count, - caller: meta.caller - ] - [ groupKey(new_meta, meta.family_count.toInteger()), bed, meta.sample ] + def new_meta = meta.subMap(["family", "family_samples", "caller"]) + [id:meta.family] + [ groupKey(new_meta, meta.family_samples.tokenize(",").size()), bed ] } .groupTuple() - .map { meta, bed, samples -> - def new_meta = meta + [samples: "${samples.sort(false).join(',')}"] // Having a comma-separated string ensures that joins don't fail - [ new_meta, bed ] - } .dump(tag:'merge_beds_input', pretty: true) .set { ch_merge_beds_input } @@ -116,7 +98,7 @@ workflow GVCF_JOINT_GENOTYPE_GATK4 { INPUT_SPLIT_BEDTOOLS( MERGE_BEDS.out.bed.map { meta, bed -> // Multiply the scatter count by the family size to better scatter big families - [meta, bed, (scatter_count * meta.family_count)] + [meta, bed, (scatter_count * meta.family_samples.tokenize(",").size())] }, GATK4_GENOMICSDBIMPORT.out.genomicsdb.map { meta, genomicsdb -> [ meta, genomicsdb, [] ]} ) diff --git a/subworkflows/local/utils_cmgg_germline_pipeline/main.nf b/subworkflows/local/utils_cmgg_germline_pipeline/main.nf index f70e310a..6124181e 100644 --- a/subworkflows/local/utils_cmgg_germline_pipeline/main.nf +++ b/subworkflows/local/utils_cmgg_germline_pipeline/main.nf @@ -10,12 +10,12 @@ include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' include { paramsSummaryMap } from 'plugin/nf-schema' -include { samplesheetToList } from 'plugin/nf-schema' include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' include { imNotification } from '../../nf-core/utils_nfcore_pipeline' include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' +include { WATCHPATH_HANDLING } from '../watchpath_handling' /* ======================================================================================== @@ -36,6 +36,7 @@ workflow PIPELINE_INITIALISATION { pedFile // string: Path to the common PED file genomesMap // map: A map structure containing the references for each genome genome // string: The genome to use + watchdir // string: The path to watch for input files main: @@ -75,43 +76,18 @@ workflow PIPELINE_INITIALISATION { // Create channel from input file provided through params.input // - // Output the samplesheet - def input_file = file(input) - input_file.copyTo("${outdir}/samplesheet.csv") - - def pedigree = new Pedigree(pedFile) + WATCHPATH_HANDLING( + input, + watchdir, + "assets/schema_input.json", + pedFile + ) - def samplesheetList = samplesheetToList(input_file, "assets/schema_input.json") - samplesheetList.each { row -> - def ped = row[6] - if(ped) { pedigree.addPedContent(ped) } - } - GlobalVariables.pedFiles = pedigree.writePeds(workflow) - - Channel.fromList(samplesheetList) - .map { meta, cram, crai, gvcf, tbi, roi, ped, truth_vcf, truth_tbi, truth_bed -> - // Infer the family ID from the PED file if no family ID was given. - // If no PED is given, use the sample ID as family ID - def new_meta = meta + [ - family: meta.family ?: pedigree.getFamily(meta.sample) - ] - [ new_meta, cram, crai, gvcf, tbi, roi, truth_vcf, truth_tbi, truth_bed ] - } - .tap { ch_raw_inputs } - .map { row -> - [ "id":row[0].id, "family":row[0].family ] - } - .reduce([:]) { families, v -> - // Count the unique samples in one family - families[v.family] = families[v.family] ? families[v.family] + [v.id] : [v.id] - families[v.family] = families[v.family].unique() - families - } - .combine(ch_raw_inputs) - .set { ch_samplesheet } + // Output the samplesheet + file(input).copyTo("${outdir}/samplesheet.csv") emit: - samplesheet = ch_samplesheet + samplesheet = WATCHPATH_HANDLING.out.samplesheet versions = ch_versions } diff --git a/subworkflows/local/vcf_upd_updio/main.nf b/subworkflows/local/vcf_upd_updio/main.nf index 7cfd7db4..c7c96d2a 100644 --- a/subworkflows/local/vcf_upd_updio/main.nf +++ b/subworkflows/local/vcf_upd_updio/main.nf @@ -17,13 +17,13 @@ workflow VCF_UPD_UPDIO { // Filter out all families that have less than 3 samples ch_vcfs .filter { meta, vcf, tbi -> - meta.family_count >= 3 + meta.family_samples.tokenize(",").size() >= 3 } .set { ch_trio_vcfs } ch_peds .filter { meta, ped -> - meta.family_count >= 3 + meta.family_samples.tokenize(",").size() >= 3 } .set { ch_trio_peds } @@ -31,7 +31,7 @@ workflow VCF_UPD_UPDIO { [failOnDuplicate:true, failOnMismatch:true], ch_trio_vcfs, ch_trio_peds, - ["id", "family", "family_count", "caller"] + ["id", "family", "family_samples", "caller"] ) .map { meta, vcf, tbi, ped -> def meta_list = get_family_data_from_ped(meta, ped) diff --git a/subworkflows/local/watchpath_handling/main.nf b/subworkflows/local/watchpath_handling/main.nf new file mode 100644 index 00000000..ddbda33f --- /dev/null +++ b/subworkflows/local/watchpath_handling/main.nf @@ -0,0 +1,160 @@ +include { samplesheetToList } from 'plugin/nf-schema' + +workflow WATCHPATH_HANDLING { + + take: + input_samplesheet + watchdir + samplesheet_schema + pedFile + + main: + + // A map with entries for every row that expects to be watched + def watch_lines = [:] + + // Initialize a filename for the DONE file + def watch_id = UUID.randomUUID().toString() + def done_file = file("${watchdir}/DONE-${watch_id}") + + // A list containing all expected files + def expected_files = [done_file.name] + + // Initialize samplesheet to keep the linter happy + ch_samplesheet_watched = Channel.empty() + + // Pedigree handling + def pedigree = new Pedigree(pedFile) + GlobalVariables.pedFiles = pedigree.writePeds(workflow) + + def families = [:] + def sample_counts = [:] + + // Determine which files to watch for + def samplesheet_list = samplesheetToList(input_samplesheet, samplesheet_schema) + // Do some calculations and manipulations here + .collect { row -> + // Watchpath logic + def is_watch = false + row = row.collect { input -> + input_name = input instanceof Path ? input.name : input as String + if (input_name.startsWith("watch:")) { + is_watch = true + expected_files.add(input_name.replace("watch:", "")) + return input_name + } + return input + } + if (is_watch) { + watch_lines[row[0].id] = row + } + + // Pipeline logic + def ped = row[6] + if (ped) { + pedigree.addPedContent(ped) + } + def family = row[0].family ?: pedigree.getFamily(row[0].sample) + + if (!families.containsKey(family)) { + families[family] = [row[0].id] + } else { + families[family].add(row[0].id) + } + + if (!sample_counts.containsKey(row[0].id)) { + sample_counts[row[0].id] = 1 + } else { + sample_counts[row[0].id] += 1 + } + + def new_meta = row[0] + [family:family] + row[0] = new_meta + row.remove(6) + return row + } + + println(sample_counts) + + Channel.fromList(samplesheet_list).set { ch_samplesheet_all } + + if (watchdir) { + + watchdir_path = file(watchdir) + if (!watchdir_path.exists()) { + // Create the watchdir if it doesn't exist (this is a failsafe) + watchdir_path.mkdir() + } + + // Watch the watchdir for the expected files + Channel.watchPath("${watchdir}**{${expected_files.join(',')}}", "create,modify") + .until { file -> + def file_name = file.name + if (file_name == done_file.name) { + // Delete the done file when it's been detected and stop watching + done_file.delete() + return true + } + return false + } + .map { file -> + // Try to find a matching ID in watch_lines + def id = find_id(file.name, watch_lines) + if (id == "") { + error("Could not find id for file '${file.name}' in the samplesheet.") + } + // Replace the matching watch entry with the file + watch_lines[id] = watch_lines[id].collect { line_entry -> + line_entry == "watch:${file.name}" as String ? file : line_entry + } + return watch_lines[id] + } + .filter { entry -> + def found_all_files = false + if (!entry.any { elem -> elem.toString().startsWith("watch:") }) { + // Remove the entry from watch_files when all files for the current entry have been found + watch_lines.remove(entry[0].id) + found_all_files = true + } + if (watch_lines.size() == 0) { + // Create the DONE file when all files have been found + done_file.text = "" + } + // Pass through all entries where all files have been found + return found_all_files + } + // Mix with all entries that didn't contain any watched files + .mix(ch_samplesheet_all.filter { entry -> !entry.any { elem -> elem.toString().startsWith("watch:") }}) + .set { ch_samplesheet_watched } + + } else { + ch_samplesheet_watched = ch_samplesheet_all + } + + ch_samplesheet_watched + .map { row -> + row[0] = row[0] + [ + family_samples:families[row[0].family].sort(false).join(","), + duplicate_count:sample_counts[row[0].id] + ] + return row + } + .set { samplesheet } + + emit: + samplesheet + +} + +// Find the ID of a file in a map with sample IDs as keys +def find_id(file_name, file_map) { + def lastDotIndex = file_name.lastIndexOf(".") + if (lastDotIndex == -1) { + return "" + } + def id = file_name.substring(0, lastDotIndex) + if (file_map.containsKey(id)) { + return id + } + return find_id(id, file_map) +} From 722e4eb5731d4e3cb9067e8b516c2a3c28c6506f Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 6 Sep 2024 13:37:17 +0200 Subject: [PATCH 17/28] fix some more issues found with the new import --- subworkflows/local/watchpath_handling/main.nf | 26 +++++++++++++------ workflows/germline.nf | 20 +++++++------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/subworkflows/local/watchpath_handling/main.nf b/subworkflows/local/watchpath_handling/main.nf index ddbda33f..5e96ec58 100644 --- a/subworkflows/local/watchpath_handling/main.nf +++ b/subworkflows/local/watchpath_handling/main.nf @@ -27,6 +27,8 @@ workflow WATCHPATH_HANDLING { def pedigree = new Pedigree(pedFile) GlobalVariables.pedFiles = pedigree.writePeds(workflow) + def errors = [] + def families = [:] def sample_counts = [:] @@ -47,6 +49,9 @@ workflow WATCHPATH_HANDLING { } if (is_watch) { watch_lines[row[0].id] = row + if (!watchdir) { + errors.add("Found a `watch:` prefix in the samplesheet for '${row[0].id}', but no watch directory has been set.") + } } // Pipeline logic @@ -55,17 +60,19 @@ workflow WATCHPATH_HANDLING { pedigree.addPedContent(ped) } def family = row[0].family ?: pedigree.getFamily(row[0].sample) + def sample_id = row[0].id if (!families.containsKey(family)) { - families[family] = [row[0].id] - } else { - families[family].add(row[0].id) + families[family] = [sample_id] + } else if(!families[family].contains(sample_id)) { + families[family].add(sample_id) } - if (!sample_counts.containsKey(row[0].id)) { - sample_counts[row[0].id] = 1 + + if (!sample_counts.containsKey(sample_id)) { + sample_counts[sample_id] = 1 } else { - sample_counts[row[0].id] += 1 + sample_counts[sample_id] += 1 } def new_meta = row[0] + [family:family] @@ -74,7 +81,9 @@ workflow WATCHPATH_HANDLING { return row } - println(sample_counts) + if (errors.size() > 0) { + error(errors.join("\n")) + } Channel.fromList(samplesheet_list).set { ch_samplesheet_all } @@ -129,6 +138,7 @@ workflow WATCHPATH_HANDLING { } else { ch_samplesheet_watched = ch_samplesheet_all + } ch_samplesheet_watched @@ -138,7 +148,7 @@ workflow WATCHPATH_HANDLING { duplicate_count:sample_counts[row[0].id] ] return row - } + }.view() .set { samplesheet } emit: diff --git a/workflows/germline.nf b/workflows/germline.nf index a756f7aa..ec5987a7 100644 --- a/workflows/germline.nf +++ b/workflows/germline.nf @@ -330,24 +330,19 @@ workflow GERMLINE { // ch_samplesheet - .multiMap { families, meta, cram, crai, gvcf, tbi, roi_file, truth_vcf, truth_tbi, truth_bed -> + .multiMap { meta, cram, crai, gvcf, tbi, roi_file, truth_vcf, truth_tbi, truth_bed -> // Divide the input files into their corresponding channel def new_meta = meta + [ - family_count: families[meta.family].size(), // Contains the amount of samples in the family from this sample type: gvcf && cram ? "gvcf_cram" : gvcf ? "gvcf" : "cram" // Define the type of input data ] - def new_meta_validation = [ - id: meta.id, - sample: meta.sample, - family: meta.family - ] + def new_meta_validation = meta.subMap(["id", "sample", "family", "duplicate_count"]) truth_variants: [new_meta_validation, truth_vcf, truth_tbi, truth_bed] // Optional channel containing the truth VCF, its index and the optional BED file gvcf: [new_meta, gvcf, tbi] // Optional channel containing the GVCFs and their optional indices cram: [new_meta, cram, crai] // Mandatory channel containing the CRAM files and their optional indices roi: [new_meta, roi_file] // Optional channel containing the ROI BED files for WES samples - family_samples: [meta.family, families[meta.family]] // A channel containing the samples per family + family_samples: [meta.family, meta.family_samples.tokenize(",")] // A channel containing the samples per family } .set { ch_input } @@ -599,7 +594,10 @@ workflow GERMLINE { if (validate){ ch_input.truth_variants - .groupTuple() // No size needed here since it's being run before any process + .map { meta, vcf, tbi, bed -> + [ groupKey(meta, meta.duplicate_count), vcf, tbi, bed ] + } + .groupTuple() .map { meta, vcf, tbi, bed -> // Get only one VCF for samples that were given multiple times one_vcf = vcf.find { vcf_file -> vcf_file != [] } ?: [] @@ -638,7 +636,7 @@ workflow GERMLINE { ch_final_vcfs .map { meta, vcf, tbi -> - def new_meta = meta - meta.subMap("family_count") + def new_meta = meta - meta.subMap("family_samples") [ meta.family, new_meta, vcf, tbi ] } .combine(ch_family_samples, by:0) @@ -685,7 +683,7 @@ workflow GERMLINE { CustomChannelOperators.joinOnKeys( ch_final_vcfs.map { meta, vcf, tbi -> [ meta, vcf ]}, VCF_EXTRACT_RELATE_SOMALIER.out.peds, - ['id', 'family', 'family_count'] + ['id', 'family', 'family_samples'] ) .dump(tag:'vcf2db_input', pretty:true) .set { ch_vcf2db_input } From 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 20 Sep 2024 13:18:57 +0200 Subject: [PATCH 18/28] fix tests --- assets/samplesheet.csv | 2 +- main.nf | 1 - .../cram_prepare_samtools_bedtools/main.nf | 10 ++-- subworkflows/local/watchpath_handling/main.nf | 17 +++++- .../cram_call_genotype_gatk4/main.nf.test | 58 +++++++++---------- .../main.nf.test.snap | 37 +++++------- .../local/cram_call_vardictjava/main.nf.test | 32 +++++----- .../cram_call_vardictjava/main.nf.test.snap | 20 +++---- .../main.nf.test | 24 ++++---- .../main.nf.test.snap | 57 +++++++++--------- .../local/input_split_bedtools/main.nf.test | 4 +- .../input_split_bedtools/main.nf.test.snap | 12 ++-- .../local/vcf_annotation/main.nf.test | 4 +- .../local/vcf_annotation/main.nf.test.snap | 8 +-- .../vcf_extract_relate_somalier/main.nf.test | 8 +-- .../main.nf.test.snap | 32 +++++----- .../local/vcf_ped_rtgtools/main.nf.test | 4 +- .../local/vcf_ped_rtgtools/main.nf.test.snap | 8 +-- .../local/vcf_roh_automap/main.nf.test | 4 +- .../local/vcf_roh_automap/main.nf.test.snap | 12 ++-- .../local/vcf_upd_updio/main.nf.test | 8 +-- .../local/vcf_upd_updio/main.nf.test.snap | 8 +-- .../vcf_validate_small_variants/main.nf.test | 4 +- .../main.nf.test.snap | 40 ++++++------- 24 files changed, 210 insertions(+), 204 deletions(-) diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv index b20e3926..2f8a87d7 100644 --- a/assets/samplesheet.csv +++ b/assets/samplesheet.csv @@ -1,4 +1,4 @@ sample,family,cram,crai,roi,ped,truth_vcf,truth_tbi,truth_bed,vardict_min_af NA24143,Proband_12345,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24143.cram,,,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/genome/test.ped,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24143.vcf.gz,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24143.vcf.gz.tbi,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/regions/roi.bed,0.01 NA24149,Proband_12345,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24149.cram,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24149.cram.crai,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/regions/roi.bed,,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24149.vcf.gz,,, -NA24385,Proband_12345,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24385.cram,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24385.cram.crai,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/regions/roi.bed,,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24385.vcf.gz,,, +NA24149,Proband_12345,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24385.cram,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24385.cram.crai,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/regions/roi.bed,,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24385.vcf.gz,,, diff --git a/main.nf b/main.nf index 823c6263..44089aa8 100644 --- a/main.nf +++ b/main.nf @@ -194,7 +194,6 @@ workflow { def multiqc_logo = params.multiqc_logo ?: "$projectDir/assets/CMGG_logo.png" - print(params.genomes) // // SUBWORKFLOW: Run initialisation tasks // diff --git a/subworkflows/local/cram_prepare_samtools_bedtools/main.nf b/subworkflows/local/cram_prepare_samtools_bedtools/main.nf index 3be4dab3..94e24a7c 100644 --- a/subworkflows/local/cram_prepare_samtools_bedtools/main.nf +++ b/subworkflows/local/cram_prepare_samtools_bedtools/main.nf @@ -37,9 +37,9 @@ workflow CRAM_PREPARE_SAMTOOLS_BEDTOOLS { .groupTuple() .branch { meta, cram, crai -> multiple: cram.size() > 1 - return [meta, cram] + return [meta.target, cram] single: cram.size() == 1 - return [meta, cram[0], crai[0]] + return [meta.target, cram[0], crai[0]] } .set { ch_cram_branch } @@ -104,9 +104,9 @@ workflow CRAM_PREPARE_SAMTOOLS_BEDTOOLS { } } found: is_present - return [ meta, output_roi ] + return [ meta.target, output_roi ] missing: !is_present - return [ meta, [] ] + return [ meta.target, [] ] } .set { ch_roi_branch } @@ -135,7 +135,7 @@ workflow CRAM_PREPARE_SAMTOOLS_BEDTOOLS { .groupTuple() .combine(MERGE_ROI_PARAMS.out.bed.map { meta, bed -> bed }) .map { meta, missing, default_roi -> - [ meta, default_roi ] + [ meta.target, default_roi ] } .set { ch_missing_rois } } else { diff --git a/subworkflows/local/watchpath_handling/main.nf b/subworkflows/local/watchpath_handling/main.nf index 5e96ec58..88cf3fbc 100644 --- a/subworkflows/local/watchpath_handling/main.nf +++ b/subworkflows/local/watchpath_handling/main.nf @@ -31,6 +31,7 @@ workflow WATCHPATH_HANDLING { def families = [:] def sample_counts = [:] + def sample_metas = [:] // Determine which files to watch for def samplesheet_list = samplesheetToList(input_samplesheet, samplesheet_schema) @@ -71,8 +72,19 @@ workflow WATCHPATH_HANDLING { if (!sample_counts.containsKey(sample_id)) { sample_counts[sample_id] = 1 + sample_metas[sample_id] = row[0] } else { sample_counts[sample_id] += 1 + if(sample_metas[sample_id] != row[0]) { + def other_meta = sample_metas[sample_id] + def diff_keys = [] + other_meta.each { k,v -> + if (v != row[0][k]) { + diff_keys.add(k) + } + } + errors.add("Found multiple entries for sample '${sample_id}' in the samplesheet with differing meta values (`${diff_keys.join(' ')}`).") + } } def new_meta = row[0] + [family:family] @@ -81,13 +93,14 @@ workflow WATCHPATH_HANDLING { return row } + // Stop the pipeline if extra validation errors have been detected if (errors.size() > 0) { error(errors.join("\n")) } Channel.fromList(samplesheet_list).set { ch_samplesheet_all } - if (watchdir) { + if (watchdir && expected_files.size() > 1) { watchdir_path = file(watchdir) if (!watchdir_path.exists()) { @@ -148,7 +161,7 @@ workflow WATCHPATH_HANDLING { duplicate_count:sample_counts[row[0].id] ] return row - }.view() + } .set { samplesheet } emit: diff --git a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test index 33425c77..37eca413 100644 --- a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test +++ b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test @@ -21,17 +21,17 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143.00001", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00001", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24143.00002", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00002", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24143.00003", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00003", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split3, checkIfExists:true) @@ -86,7 +86,7 @@ nextflow_workflow { """ input[0] = Channel.empty() input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143"], file(params.gvcf1, checkIfExists:true), file(params.gtbi1, checkIfExists:true) ]) @@ -138,27 +138,27 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split3, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:3], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.gvcf1, checkIfExists:true), file(params.gtbi1, checkIfExists:true) ],[ - [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_count:3], + [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.gvcf2, checkIfExists:true), file(params.gtbi2, checkIfExists:true) ]) @@ -211,27 +211,27 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split3, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:3], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.gvcf1, checkIfExists:true), file(params.gtbi1, checkIfExists:true) ],[ - [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_count:3], + [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.gvcf2, checkIfExists:true), file(params.gtbi2, checkIfExists:true) ]) @@ -284,27 +284,27 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split3, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:3], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.gvcf1, checkIfExists:true), file(params.gtbi1, checkIfExists:true) ],[ - [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_count:3], + [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.gvcf2, checkIfExists:true), file(params.gtbi2, checkIfExists:true) ]) @@ -357,27 +357,27 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_count:3, split_count:3], + [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split3, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:3], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.gvcf1, checkIfExists:true), file(params.gtbi1, checkIfExists:true) ],[ - [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_count:3], + [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.gvcf2, checkIfExists:true), file(params.gtbi2, checkIfExists:true) ]) @@ -429,27 +429,27 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24835.00001", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24835.00002", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24835.00003", sample:"NA24835", family:"Ashkenazim", family_samples:"NA24149,NA24385", split_count:3], file(params.cram3, checkIfExists:true), file(params.crai3, checkIfExists:true), file(params.split3, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:2], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143"], file(params.gvcf1, checkIfExists:true), file(params.gtbi1, checkIfExists:true) ],[ - [id:"NA24149", sample:"NA24149", family:"NA24149", family_count:2], + [id:"NA24149", sample:"NA24149", family:"NA24149", family_samples:"NA24149,NA24385"], file(params.gvcf2, checkIfExists:true), file(params.gtbi2, checkIfExists:true) ]) diff --git a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap index 6c932f93..a0aec425 100644 --- a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap +++ b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap @@ -22,10 +22,9 @@ [ { "family": "Ashkenazim", - "id": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller", - "samples": "NA24143,NA24149,NA24835" + "id": "Ashkenazim" }, "Ashkenazim.haplotypecaller.vcf.gz", "Ashkenazim.haplotypecaller.vcf.gz.tbi" @@ -41,7 +40,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-05T11:18:02.353352239" + "timestamp": "2024-09-05T17:35:02.44674969" }, "filter - family": { "content": [ @@ -49,10 +48,9 @@ [ { "family": "Ashkenazim", - "id": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller", - "samples": "NA24143,NA24149,NA24835" + "id": "Ashkenazim" }, "Ashkenazim.haplotypecaller.vcf.gz", "Ashkenazim.haplotypecaller.vcf.gz.tbi" @@ -68,7 +66,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-05T11:19:14.883570897" + "timestamp": "2024-09-05T17:35:46.768542501" }, "default - gvcfs": { "content": [ @@ -76,10 +74,9 @@ [ { "family": "Ashkenazim", - "id": "Ashkenazim", - "family_count": 1, + "family_samples": "NA24143", "caller": "haplotypecaller", - "samples": "NA24143" + "id": "Ashkenazim" }, "Ashkenazim.haplotypecaller.vcf.gz", "Ashkenazim.haplotypecaller.vcf.gz.tbi" @@ -91,9 +88,9 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T12:56:23.435795439" + "timestamp": "2024-09-05T17:34:17.846266913" }, "default - crams": { "content": [ @@ -101,10 +98,9 @@ [ { "family": "Ashkenazim", - "id": "Ashkenazim", - "family_count": 1, + "family_samples": "NA24143", "caller": "haplotypecaller", - "samples": "NA24143" + "id": "Ashkenazim" }, "Ashkenazim.haplotypecaller.vcf.gz", "Ashkenazim.haplotypecaller.vcf.gz.tbi" @@ -120,7 +116,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-05T11:16:25.448441115" + "timestamp": "2024-09-05T17:33:52.045772718" }, "only_call - family": { "content": [ @@ -145,10 +141,9 @@ [ { "family": "Ashkenazim", - "id": "Ashkenazim", - "family_count": 2, + "family_samples": "NA24143", "caller": "haplotypecaller", - "samples": "NA24143,NA24835" + "id": "Ashkenazim" }, "Ashkenazim.haplotypecaller.vcf.gz", "Ashkenazim.haplotypecaller.vcf.gz.tbi" @@ -164,6 +159,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-05T11:21:57.601081087" + "timestamp": "2024-09-06T14:26:29.249708339" } } \ No newline at end of file diff --git a/tests/subworkflows/local/cram_call_vardictjava/main.nf.test b/tests/subworkflows/local/cram_call_vardictjava/main.nf.test index b0914d97..05798304 100644 --- a/tests/subworkflows/local/cram_call_vardictjava/main.nf.test +++ b/tests/subworkflows/local/cram_call_vardictjava/main.nf.test @@ -20,22 +20,22 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143"], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143.00001", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00001", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24143.00002", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00002", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24143.00003", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00003", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split3, checkIfExists:true) @@ -77,22 +77,22 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143"], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143.00001", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00001", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24143.00002", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00002", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24143.00003", sample:"NA24143", family:"Ashkenazim", family_count:1, split_count:3], + [id:"NA24143.00003", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split3, checkIfExists:true) @@ -133,41 +133,41 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:2], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149"], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true) ],[ - [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_count:2], + [id:"NA24149", sample:"NA24149", family:"Ashkenazim", family_samples:"NA24143,NA24149"], file(params.cram2, checkIfExists:true), file(params.crai2, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143.00001", sample:"NA24143", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24143.00001", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24143.00002", sample:"NA24143", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24143.00002", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24143.00003", sample:"NA24143", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24143.00003", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149", split_count:3], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), file(params.split3, checkIfExists:true) ],[ - [id:"NA24149.00001", sample:"NA24149", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24149.00001", sample:"NA24149", family:"Ashkenazim", family_samples:"NA24143,NA24149", split_count:3], file(params.cram2, checkIfExists:true), file(params.crai2, checkIfExists:true), file(params.split1, checkIfExists:true) ],[ - [id:"NA24149.00002", sample:"NA24149", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24149.00002", sample:"NA24149", family:"Ashkenazim", family_samples:"NA24143,NA24149", split_count:3], file(params.cram2, checkIfExists:true), file(params.crai2, checkIfExists:true), file(params.split2, checkIfExists:true) ],[ - [id:"NA24149.00003", sample:"NA24149", family:"Ashkenazim", family_count:2, split_count:3], + [id:"NA24149.00003", sample:"NA24149", family:"Ashkenazim", family_samples:"NA24143,NA24149", split_count:3], file(params.cram2, checkIfExists:true), file(params.crai2, checkIfExists:true), file(params.split3, checkIfExists:true) diff --git a/tests/subworkflows/local/cram_call_vardictjava/main.nf.test.snap b/tests/subworkflows/local/cram_call_vardictjava/main.nf.test.snap index 8cbbdb2e..f2057a7b 100644 --- a/tests/subworkflows/local/cram_call_vardictjava/main.nf.test.snap +++ b/tests/subworkflows/local/cram_call_vardictjava/main.nf.test.snap @@ -7,7 +7,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1, + "family_samples": "NA24143", "caller": "vardict", "samples": "NA24143" }, @@ -18,9 +18,9 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T13:05:31.562298546" + "timestamp": "2024-09-05T17:38:01.461442987" }, "default": { "content": [ @@ -30,7 +30,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1, + "family_samples": "NA24143", "caller": "vardict", "samples": "NA24143" }, @@ -41,9 +41,9 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T13:05:04.322416692" + "timestamp": "2024-09-05T17:37:40.178107639" }, "family": { "content": [ @@ -53,7 +53,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 2, + "family_samples": "NA24143,NA24149", "caller": "vardict", "samples": "NA24143" }, @@ -65,7 +65,7 @@ "id": "NA24149", "sample": "NA24149", "family": "Ashkenazim", - "family_count": 2, + "family_samples": "NA24143,NA24149", "caller": "vardict", "samples": "NA24149" }, @@ -76,8 +76,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T13:06:05.012625054" + "timestamp": "2024-09-05T17:38:29.203806206" } } \ No newline at end of file diff --git a/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test b/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test index 7c6c226c..472a1eae 100644 --- a/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test +++ b/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test @@ -14,12 +14,12 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:1], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:1], [] ]) input[2] = Channel.value([ @@ -54,12 +54,12 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:1], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:1], [] ]) input[2] = Channel.value([ @@ -94,12 +94,12 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:1], file(params.cram1, checkIfExists:true), [] ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:1], file(params.bed, checkIfExists:true) ]) input[2] = Channel.value([ @@ -134,16 +134,16 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:2], file(params.cram1, checkIfExists:true), - file(params.crai1, checkIfExists:true) + [] ],[ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], - file(params.cram1, checkIfExists:true), - file(params.crai1, checkIfExists:true) + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:2], + file(params.cram2, checkIfExists:true), + [] ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:2], file(params.bed, checkIfExists:true) ]) input[2] = Channel.value([ diff --git a/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test.snap b/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test.snap index d19744ac..47b214c1 100644 --- a/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test.snap +++ b/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test.snap @@ -7,32 +7,25 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1 + "family_samples": "NA24143", + "duplicate_count": 2 }, - 899520, + 798258, "NA24143.cram.crai" ] ], [ - [ - { - "id": "NA24143", - "sample": "NA24143", - "family": "Ashkenazim", - "family_count": 1 - }, - "NA24143_intersect.bed:md5,b87069698afefb15282d069e56110046" - ] + ], [ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-04T17:01:48.046624445" + "timestamp": "2024-09-06T14:40:18.974586888" }, "default - WGS": { "content": [ @@ -42,7 +35,8 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1 + "family_samples": "NA24143", + "duplicate_count": 1 }, "NA24143.cram", "NA24143.cram.crai" @@ -54,7 +48,8 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1 + "family_samples": "NA24143", + "duplicate_count": 1 }, "NA24143.filter.bed:md5,9fc0cc2e4403678f18bc8b18646abd66" ] @@ -64,10 +59,10 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T10:49:45.063311741" + "timestamp": "2024-09-06T14:32:19.290286542" }, "default - WES": { "content": [ @@ -77,7 +72,8 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1 + "family_samples": "NA24143", + "duplicate_count": 1 }, "NA24143.cram", "NA24143.cram.crai" @@ -89,7 +85,8 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1 + "family_samples": "NA24143", + "duplicate_count": 1 }, "NA24143_intersect.bed:md5,b87069698afefb15282d069e56110046" ] @@ -99,10 +96,10 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T11:02:27.487076852" + "timestamp": "2024-09-06T14:33:15.988619426" }, "default - WES common ROI": { "content": [ @@ -112,7 +109,8 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1 + "family_samples": "NA24143", + "duplicate_count": 1 }, "NA24143.cram", "NA24143.cram.crai" @@ -124,7 +122,8 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1 + "family_samples": "NA24143", + "duplicate_count": 1 }, "NA24143_intersect.bed:md5,b87069698afefb15282d069e56110046" ] @@ -134,9 +133,9 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T11:02:14.280224701" + "timestamp": "2024-09-06T14:32:49.756585296" } } \ No newline at end of file diff --git a/tests/subworkflows/local/input_split_bedtools/main.nf.test b/tests/subworkflows/local/input_split_bedtools/main.nf.test index 3c9507ca..87cc55a6 100644 --- a/tests/subworkflows/local/input_split_bedtools/main.nf.test +++ b/tests/subworkflows/local/input_split_bedtools/main.nf.test @@ -14,12 +14,12 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143"], file(params.bed, checkIfExists:true), 3 ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:1], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143"], file(params.cram1, checkIfExists:true), file(params.crai1, checkIfExists:true), ]) diff --git a/tests/subworkflows/local/input_split_bedtools/main.nf.test.snap b/tests/subworkflows/local/input_split_bedtools/main.nf.test.snap index 9f34f75c..6089d29e 100644 --- a/tests/subworkflows/local/input_split_bedtools/main.nf.test.snap +++ b/tests/subworkflows/local/input_split_bedtools/main.nf.test.snap @@ -7,7 +7,7 @@ "id": "NA24143.00001", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1, + "family_samples": "NA24143", "split_count": 3 }, "NA24143.cram", @@ -19,7 +19,7 @@ "id": "NA24143.00002", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1, + "family_samples": "NA24143", "split_count": 3 }, "NA24143.cram", @@ -31,7 +31,7 @@ "id": "NA24143.00003", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 1, + "family_samples": "NA24143", "split_count": 3 }, "NA24143.cram", @@ -41,9 +41,9 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T11:15:19.235405576" + "timestamp": "2024-09-05T17:39:07.719231196" } } \ No newline at end of file diff --git a/tests/subworkflows/local/vcf_annotation/main.nf.test b/tests/subworkflows/local/vcf_annotation/main.nf.test index b829d298..99cedb8e 100644 --- a/tests/subworkflows/local/vcf_annotation/main.nf.test +++ b/tests/subworkflows/local/vcf_annotation/main.nf.test @@ -19,7 +19,7 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", family:"NA24143", family_count:1, caller:"haplotypecaller"], + [id:"NA24143", family:"NA24143", family_samples:"NA24143", caller:"haplotypecaller"], file(params.vcf1, checkIfExists:true) ]) input[1] = Channel.value([ @@ -66,7 +66,7 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", family:"NA24143", family_count:1, caller:"haplotypecaller"], + [id:"NA24143", family:"NA24143", family_samples:"NA24143", caller:"haplotypecaller"], file(params.vcf1, checkIfExists:true) ]) input[1] = Channel.value([ diff --git a/tests/subworkflows/local/vcf_annotation/main.nf.test.snap b/tests/subworkflows/local/vcf_annotation/main.nf.test.snap index 12d0ef2c..d3ebc487 100644 --- a/tests/subworkflows/local/vcf_annotation/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_annotation/main.nf.test.snap @@ -6,7 +6,7 @@ { "id": "NA24143", "family": "NA24143", - "family_count": 1, + "family_samples": "NA24143", "caller": "haplotypecaller" }, "NA24143.haplotypecaller.vcf.gz" @@ -22,7 +22,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-05T12:53:05.739638954" + "timestamp": "2024-09-05T17:39:23.107888975" }, "vcfanno": { "content": [ @@ -31,7 +31,7 @@ { "id": "NA24143", "family": "NA24143", - "family_count": 1, + "family_samples": "NA24143", "caller": "haplotypecaller" }, "NA24143.haplotypecaller.vcf.gz" @@ -47,6 +47,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-05T12:53:27.894947052" + "timestamp": "2024-09-05T17:39:39.640344999" } } \ No newline at end of file diff --git a/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test b/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test index a07570e9..3e277b57 100644 --- a/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test +++ b/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test @@ -14,7 +14,7 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller"], file(params.famvcf, checkIfExists:true), file(params.famtbi, checkIfExists:true) ]) @@ -22,7 +22,7 @@ nextflow_workflow { input[2] = Channel.value([[id:"ref"], file(params.fai, checkIfExists:true)]) input[3] = Channel.value([[id:"ref"], file(params.somalier_sites, checkIfExists:true)]) input[4] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller"], file(params.ped, checkIfExists:true) ]) """ @@ -50,7 +50,7 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller"], file(params.famvcf, checkIfExists:true), file(params.famtbi, checkIfExists:true) ]) @@ -58,7 +58,7 @@ nextflow_workflow { input[2] = Channel.value([[id:"ref"], file(params.fai, checkIfExists:true)]) input[3] = Channel.value([[id:"ref"], file(params.somalier_sites, checkIfExists:true)]) input[4] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller"], [] ]) """ diff --git a/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test.snap b/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test.snap index 6f69f1f5..49d14e7c 100644 --- a/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_extract_relate_somalier/main.nf.test.snap @@ -6,7 +6,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, [ @@ -21,7 +21,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller.html:md5,a7cc550571c8543643d10b2e9db68a48" @@ -32,7 +32,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller.pairs.tsv:md5,0c89abf63de67c9f0ee931e883a17a66" @@ -43,7 +43,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller.samples.tsv:md5,26e108afb44bcbaf4c47e43eb5611d15" @@ -54,7 +54,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller_somalier.ped:md5,689bb83118511ddcb09ae6d30d2d99b3" @@ -62,10 +62,10 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T13:17:18.055689163" + "timestamp": "2024-09-05T17:39:52.526057891" }, "default - no peds": { "content": [ @@ -74,7 +74,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, [ @@ -89,7 +89,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller.html:md5,1622292889a889778f10ae037c051e44" @@ -100,7 +100,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller.pairs.tsv:md5,fc51248691992f10a6b5176f5a2d6231" @@ -111,7 +111,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller.samples.tsv:md5,1c12b44787ba9bc79943737fa54d3007" @@ -122,7 +122,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller_somalier.ped:md5,f1a0cb22a941d0563fae2ca3c30dd0d4" @@ -130,9 +130,9 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T13:17:29.504749349" + "timestamp": "2024-09-05T17:40:03.603049023" } } \ No newline at end of file diff --git a/tests/subworkflows/local/vcf_ped_rtgtools/main.nf.test b/tests/subworkflows/local/vcf_ped_rtgtools/main.nf.test index 71fe4235..24398ed4 100644 --- a/tests/subworkflows/local/vcf_ped_rtgtools/main.nf.test +++ b/tests/subworkflows/local/vcf_ped_rtgtools/main.nf.test @@ -17,12 +17,12 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller"], file(params.famvcf, checkIfExists:true), file(params.famtbi, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller"], file(params.ped, checkIfExists:true) ]) """ diff --git a/tests/subworkflows/local/vcf_ped_rtgtools/main.nf.test.snap b/tests/subworkflows/local/vcf_ped_rtgtools/main.nf.test.snap index b5d831e0..f988cc9f 100644 --- a/tests/subworkflows/local/vcf_ped_rtgtools/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_ped_rtgtools/main.nf.test.snap @@ -6,7 +6,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller" }, "Ashkenazim.haplotypecaller.vcf.gz" @@ -14,9 +14,9 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T17:28:32.40423584" + "timestamp": "2024-09-05T17:40:15.516745396" } } \ No newline at end of file diff --git a/tests/subworkflows/local/vcf_roh_automap/main.nf.test b/tests/subworkflows/local/vcf_roh_automap/main.nf.test index b73cbbfd..724b1757 100644 --- a/tests/subworkflows/local/vcf_roh_automap/main.nf.test +++ b/tests/subworkflows/local/vcf_roh_automap/main.nf.test @@ -18,7 +18,7 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller", samples: "NA24143,NA24835,NA24149"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller", samples: "NA24143,NA24835,NA24149"], file(params.famvcf, checkIfExists:true), file(params.famtbi, checkIfExists:true) ]) @@ -58,7 +58,7 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", family:"NA24143", family_count:1, caller:"haplotypecaller", samples: "NA24143,NA24835,NA24149"], + [id:"NA24143", family:"NA24143", family_samples:"NA24143", caller:"haplotypecaller", samples: "NA24143,NA24835,NA24149"], file(params.vcf1, checkIfExists:true), file(params.tbi1, checkIfExists:true) ]) diff --git a/tests/subworkflows/local/vcf_roh_automap/main.nf.test.snap b/tests/subworkflows/local/vcf_roh_automap/main.nf.test.snap index 60f01c03..cc008cf9 100644 --- a/tests/subworkflows/local/vcf_roh_automap/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_roh_automap/main.nf.test.snap @@ -6,7 +6,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller", "samples": "NA24143,NA24835,NA24149" }, @@ -26,9 +26,9 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T13:06:37.322068108" + "timestamp": "2024-09-05T17:40:27.65975553" }, "default - sample": { "content": [ @@ -37,7 +37,7 @@ { "id": "NA24143", "family": "NA24143", - "family_count": 1, + "family_samples": "NA24143", "caller": "haplotypecaller", "samples": "NA24143,NA24835,NA24149" }, @@ -52,8 +52,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nextflow": "24.04.4" }, - "timestamp": "2024-08-06T13:06:47.205904762" + "timestamp": "2024-09-05T17:40:37.637175166" } } \ No newline at end of file diff --git a/tests/subworkflows/local/vcf_upd_updio/main.nf.test b/tests/subworkflows/local/vcf_upd_updio/main.nf.test index 226c71a1..1507c48a 100644 --- a/tests/subworkflows/local/vcf_upd_updio/main.nf.test +++ b/tests/subworkflows/local/vcf_upd_updio/main.nf.test @@ -17,12 +17,12 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller"], file(params.famvcf, checkIfExists:true), file(params.famtbi, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:3, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385", caller:"haplotypecaller"], file(params.ped, checkIfExists:true) ]) input[2] = [[],[]] @@ -50,12 +50,12 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:1, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143", caller:"haplotypecaller"], file(params.vcf1, checkIfExists:true), file(params.tbi1, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"Ashkenazim", family:"Ashkenazim", family_count:1, caller:"haplotypecaller"], + [id:"Ashkenazim", family:"Ashkenazim", family_samples:"NA24143", caller:"haplotypecaller"], file(params.ped, checkIfExists:true) ]) input[2] = [[],[]] diff --git a/tests/subworkflows/local/vcf_upd_updio/main.nf.test.snap b/tests/subworkflows/local/vcf_upd_updio/main.nf.test.snap index 330bb7e1..09731d58 100644 --- a/tests/subworkflows/local/vcf_upd_updio/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_upd_updio/main.nf.test.snap @@ -6,7 +6,7 @@ { "id": "Ashkenazim", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "caller": "haplotypecaller", "child": "NA24385", "father": "NA24149", @@ -22,10 +22,10 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-27T13:36:54.518507627" + "timestamp": "2024-09-05T17:40:47.828005254" }, "default - sample": { "content": [ diff --git a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test index f540a89c..6714fe38 100644 --- a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test +++ b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test @@ -31,14 +31,14 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:3], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.famvcf, checkIfExists:true), file(params.famtbi, checkIfExists:true), file(params.vcf1, checkIfExists:true), file(params.tbi1, checkIfExists:true) ]) input[1] = Channel.of([ - [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_count:3], + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143,NA24149,NA24385"], file(params.bed, checkIfExists:true), [] ]) diff --git a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap index 3e0b9a14..7d04aca4 100644 --- a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap @@ -7,7 +7,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.tp.vcf.gz:md5,b28d3e84a6efa95bfbf673de310f62c1" ] @@ -18,7 +18,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.tp.vcf.gz.tbi:md5,8f8356fd93e093e9deb1c2c4c72cb65e" ] @@ -29,7 +29,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.fn.vcf.gz:md5,99830701ae0191110b706b20abe56857" ] @@ -40,7 +40,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.fn.vcf.gz.tbi:md5,092a7a3162e7cff25d273525751eb284" ] @@ -51,7 +51,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.fp.vcf.gz:md5,2769bf65afefc821fe54a8b314b5d2be" ] @@ -62,7 +62,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.fp.vcf.gz.tbi:md5,092a7a3162e7cff25d273525751eb284" ] @@ -73,7 +73,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.tp-baseline.vcf.gz:md5,6de63c7e2fa458ca88ea78c36f579056" ] @@ -84,7 +84,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.tp-baseline.vcf.gz.tbi:md5,8d399004d8c45fa795b70da32e23a6d5" ] @@ -95,7 +95,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.summary.txt:md5,11416903ca828b22bd64cf297f2db999" ] @@ -106,7 +106,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.phasing.txt:md5,38920536b8c3e241e873c07ba61762e6" ] @@ -117,7 +117,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.snp_roc.tsv.gz:md5,d29e7796d37dada43378e466af98c35a" ] @@ -128,7 +128,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.non_snp_roc.tsv.gz:md5,121b8b67d40efcaf1aad5064c6f3bfe9" ] @@ -139,7 +139,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3 + "family_samples": "NA24143,NA24149,NA24385" }, "NA24143.weighted_roc.tsv.gz:md5,f016f9a10e793836b9b53d702e591454" ] @@ -150,7 +150,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "roc_type": "snp" }, "NA24143.snp.png" @@ -162,7 +162,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "roc_type": "non_snp" }, "NA24143.non_snp.png" @@ -174,7 +174,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "roc_type": "weighted" }, "NA24143.weighted.png" @@ -186,7 +186,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "roc_type": "snp" }, "NA24143.snp.svg" @@ -198,7 +198,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "roc_type": "non_snp" }, "NA24143.non_snp.svg" @@ -210,7 +210,7 @@ "id": "NA24143", "sample": "NA24143", "family": "Ashkenazim", - "family_count": 3, + "family_samples": "NA24143,NA24149,NA24385", "roc_type": "weighted" }, "NA24143.weighted.svg" @@ -221,6 +221,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-04T17:19:41.712263383" + "timestamp": "2024-09-05T17:41:19.06545291" } } \ No newline at end of file From 0e99623ded289e2f498bdd25c7767268b473882f Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 20 Sep 2024 13:41:34 +0200 Subject: [PATCH 19/28] fix some small issues --- assets/samplesheet.csv | 2 +- main.nf | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv index 2f8a87d7..b20e3926 100644 --- a/assets/samplesheet.csv +++ b/assets/samplesheet.csv @@ -1,4 +1,4 @@ sample,family,cram,crai,roi,ped,truth_vcf,truth_tbi,truth_bed,vardict_min_af NA24143,Proband_12345,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24143.cram,,,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/genome/test.ped,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24143.vcf.gz,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24143.vcf.gz.tbi,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/regions/roi.bed,0.01 NA24149,Proband_12345,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24149.cram,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24149.cram.crai,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/regions/roi.bed,,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24149.vcf.gz,,, -NA24149,Proband_12345,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24385.cram,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24385.cram.crai,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/regions/roi.bed,,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24385.vcf.gz,,, +NA24385,Proband_12345,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24385.cram,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/crams/NA24385.cram.crai,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/regions/roi.bed,,https://github.com/nf-cmgg/test-datasets/raw/germline/data/genomics/homo_sapiens/illumina/vcfs/NA24385.vcf.gz,,, diff --git a/main.nf b/main.nf index 0ca8b4c1..285e1280 100644 --- a/main.nf +++ b/main.nf @@ -177,7 +177,7 @@ workflow { } } - callers = params.callers.tokenize(",") + def callers = params.callers.tokenize(",") callers.each { caller -> if(!(caller in GlobalVariables.availableCallers)) { error("\"${caller}\" is not a supported callers please use one or more of these instead: ${GlobalVariables.availableCallers}")} } @@ -194,10 +194,6 @@ workflow { def multiqc_logo = params.multiqc_logo ?: "$projectDir/assets/CMGG_logo.png" -<<<<<<< HEAD - print(params.genomes) -======= ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 // // SUBWORKFLOW: Run initialisation tasks // From 6f687b9c052470af4acc7920b4cd9b223db386ac Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 20 Sep 2024 13:47:13 +0200 Subject: [PATCH 20/28] fix unresolved merge conflicts --- modules.json | 148 ------------------ .../bcftools/annotate/bcftools-annotate.diff | 16 -- .../nf-core/ensemblvep/vep/environment.yml | 3 - .../pedfilter/rtgtools-pedfilter.diff | 11 -- .../nf-core/samtools/faidx/environment.yml | 6 - .../somalier/relate/somalier-relate.diff | 11 -- modules/nf-core/tabix/tabix/environment.yml | 6 - modules/nf-core/untar/environment.yml | 6 - .../main.nf.test.snap | 16 -- .../local/vcf_annotation/main.nf.test.snap | 8 - .../main.nf.test.snap | 4 - 11 files changed, 235 deletions(-) diff --git a/modules.json b/modules.json index 8f6c09e3..19d1e586 100644 --- a/modules.json +++ b/modules.json @@ -7,84 +7,48 @@ "nf-core": { "bcftools/annotate": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "88ae68490e8f2478a1e1bbeedac970fd7cc73022", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"], "patch": "modules/nf-core/bcftools/annotate/bcftools-annotate.diff" }, "bcftools/concat": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/filter": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "bcftools/norm": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "f6cc00f107826cfaf1c933297b10ed1757b41479", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "bcftools/pluginscatter": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/query": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "34ac993e081b32d2170ab790d0386b74122f9d36", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "bcftools/reheader": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "c32611ac6813055b9321d2827678e2f8aebcb394", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "bcftools/sort": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "bcftools/stats": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "a5ba4d59c2b248c0379b0f8aeb4e7e754566cd1f", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "bedtools/intersect": { @@ -94,110 +58,62 @@ }, "bedtools/merge": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "a3d614e4a7b8691a259bcfe33ad80903217d6215", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "bedtools/split": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "6dc8a32e32158bb4d3f9af92c802233b5d4f8e4d", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "ensemblvep/download": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "54c183cba37cac58860d9967feaae54acf9cc3e0", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "ensemblvep/vep": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "54c183cba37cac58860d9967feaae54acf9cc3e0", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "gatk4/calibratedragstrmodel": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "3f42e07a1133064c569b0dbe182979527bca9e59", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "gatk4/composestrtablefile": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "926e2f394d01c71d3abbdbca9c588630bfe51abf", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "gatk4/createsequencedictionary": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "e6fe277739f5894711405af3e717b2470bd956b5", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "gatk4/genomicsdbimport": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "gatk4/genotypegvcfs": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "8b74c800af3d91e0d7bfbecb902308dc4369071c", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "gatk4/haplotypecaller": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "c332ea831f95f750be962c4b5de655f7a1e6e245", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "gawk": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "cf3ed075695639b0a0924eb0901146df1996dc08", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "mosdepth": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "9bfc81874554e87740bcb3e5e07acf0a153c9ecb", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "multiqc": { @@ -212,21 +128,13 @@ }, "rtgtools/pedfilter": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "c1c2a770cfb0bfbf093a2434a27f091ebbc65987", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"], "patch": "modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff" }, "rtgtools/rocplot": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "64770369d851c45c364e410e052ef9a6c3a7d2bb", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "rtgtools/vcfeval": { @@ -236,129 +144,73 @@ }, "samtools/convert": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "samtools/index": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "46eca555142d6e597729fcb682adcc791796f514", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "samtools/merge": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "snpeff/snpeff": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "3ad7292d9b8da881386e9d5b58364d7da489b38b", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["vcf_annotate_ensemblvep_snpeff"] }, "somalier/extract": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "458c882987320e27fc90723ec96c127a243a5497", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "somalier/relate": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "458c882987320e27fc90723ec96c127a243a5497", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"], "patch": "modules/nf-core/somalier/relate/somalier-relate.diff" }, "tabix/bgzip": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "b20be35facfc5acdc1259f132ed79339d79e989f", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "tabix/bgziptabix": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules", "vcf_annotate_ensemblvep_snpeff"] }, "untar": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "vardictjava": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "e61e5a13ef49c5595986bd31efb85c3f0709a282", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "vcf2db": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "730f3aee80d5f8d0b5fc532202ac59361414d006", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] }, "vcfanno": { "branch": "master", -<<<<<<< HEAD - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", -======= "git_sha": "9a8bba5910982ae637dedb8664e3121db77e173f", ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 "installed_by": ["modules"] } } diff --git a/modules/nf-core/bcftools/annotate/bcftools-annotate.diff b/modules/nf-core/bcftools/annotate/bcftools-annotate.diff index e284f014..518cee56 100644 --- a/modules/nf-core/bcftools/annotate/bcftools-annotate.diff +++ b/modules/nf-core/bcftools/annotate/bcftools-annotate.diff @@ -1,9 +1,4 @@ Changes in module 'nf-core/bcftools/annotate' -<<<<<<< HEAD -'modules/nf-core/bcftools/annotate/environment.yml' is unchanged -'modules/nf-core/bcftools/annotate/meta.yml' is unchanged -======= ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 Changes in 'bcftools/annotate/main.nf': --- modules/nf-core/bcftools/annotate/main.nf +++ modules/nf-core/bcftools/annotate/main.nf @@ -18,16 +13,6 @@ Changes in 'bcftools/annotate/main.nf': output: tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}"), emit: vcf -<<<<<<< HEAD -'modules/nf-core/bcftools/annotate/tests/main.nf.test.snap' is unchanged -'modules/nf-core/bcftools/annotate/tests/tags.yml' is unchanged -'modules/nf-core/bcftools/annotate/tests/vcf_gz_index.config' is unchanged -'modules/nf-core/bcftools/annotate/tests/vcf_gz_index_tbi.config' is unchanged -'modules/nf-core/bcftools/annotate/tests/vcf.config' is unchanged -'modules/nf-core/bcftools/annotate/tests/main.nf.test' is unchanged -'modules/nf-core/bcftools/annotate/tests/bcf.config' is unchanged -'modules/nf-core/bcftools/annotate/tests/vcf_gz_index_csi.config' is unchanged -======= 'modules/nf-core/bcftools/annotate/environment.yml' is unchanged 'modules/nf-core/bcftools/annotate/meta.yml' is unchanged 'modules/nf-core/bcftools/annotate/tests/tags.yml' is unchanged @@ -38,5 +23,4 @@ Changes in 'bcftools/annotate/main.nf': 'modules/nf-core/bcftools/annotate/tests/bcf.config' is unchanged 'modules/nf-core/bcftools/annotate/tests/vcf_gz_index.config' is unchanged 'modules/nf-core/bcftools/annotate/tests/main.nf.test.snap' is unchanged ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 ************************************************************ diff --git a/modules/nf-core/ensemblvep/vep/environment.yml b/modules/nf-core/ensemblvep/vep/environment.yml index 5fe0afb1..87b88372 100644 --- a/modules/nf-core/ensemblvep/vep/environment.yml +++ b/modules/nf-core/ensemblvep/vep/environment.yml @@ -1,7 +1,4 @@ -<<<<<<< HEAD -======= name: ensemblvep_vep ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 channels: - conda-forge - bioconda diff --git a/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff b/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff index a8ca8d7a..18590bf8 100644 --- a/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff +++ b/modules/nf-core/rtgtools/pedfilter/rtgtools-pedfilter.diff @@ -1,9 +1,4 @@ Changes in module 'nf-core/rtgtools/pedfilter' -<<<<<<< HEAD -'modules/nf-core/rtgtools/pedfilter/environment.yml' is unchanged -'modules/nf-core/rtgtools/pedfilter/meta.yml' is unchanged -======= ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 Changes in 'rtgtools/pedfilter/main.nf': --- modules/nf-core/rtgtools/pedfilter/main.nf +++ modules/nf-core/rtgtools/pedfilter/main.nf @@ -16,15 +11,9 @@ Changes in 'rtgtools/pedfilter/main.nf': -<<<<<<< HEAD -'modules/nf-core/rtgtools/pedfilter/tests/main.nf.test.snap' is unchanged -'modules/nf-core/rtgtools/pedfilter/tests/nextflow.config' is unchanged -'modules/nf-core/rtgtools/pedfilter/tests/main.nf.test' is unchanged -======= 'modules/nf-core/rtgtools/pedfilter/environment.yml' is unchanged 'modules/nf-core/rtgtools/pedfilter/meta.yml' is unchanged 'modules/nf-core/rtgtools/pedfilter/tests/main.nf.test' is unchanged 'modules/nf-core/rtgtools/pedfilter/tests/main.nf.test.snap' is unchanged 'modules/nf-core/rtgtools/pedfilter/tests/nextflow.config' is unchanged ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 ************************************************************ diff --git a/modules/nf-core/samtools/faidx/environment.yml b/modules/nf-core/samtools/faidx/environment.yml index 37884bae..f8450fa5 100644 --- a/modules/nf-core/samtools/faidx/environment.yml +++ b/modules/nf-core/samtools/faidx/environment.yml @@ -1,15 +1,9 @@ -<<<<<<< HEAD -channels: - - conda-forge - - bioconda -======= name: samtools_faidx channels: - conda-forge - bioconda - defaults ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 dependencies: - bioconda::htslib=1.20 diff --git a/modules/nf-core/somalier/relate/somalier-relate.diff b/modules/nf-core/somalier/relate/somalier-relate.diff index 513bc3ec..918d80b2 100644 --- a/modules/nf-core/somalier/relate/somalier-relate.diff +++ b/modules/nf-core/somalier/relate/somalier-relate.diff @@ -1,9 +1,4 @@ Changes in module 'nf-core/somalier/relate' -<<<<<<< HEAD -'modules/nf-core/somalier/relate/environment.yml' is unchanged -'modules/nf-core/somalier/relate/meta.yml' is unchanged -======= ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 Changes in 'somalier/relate/main.nf': --- modules/nf-core/somalier/relate/main.nf +++ modules/nf-core/somalier/relate/main.nf @@ -33,15 +28,9 @@ Changes in 'somalier/relate/main.nf': cat <<-END_VERSIONS > versions.yml "${task.process}": -<<<<<<< HEAD -'modules/nf-core/somalier/relate/tests/main.nf.test.snap' is unchanged -'modules/nf-core/somalier/relate/tests/tags.yml' is unchanged -'modules/nf-core/somalier/relate/tests/main.nf.test' is unchanged -======= 'modules/nf-core/somalier/relate/environment.yml' is unchanged 'modules/nf-core/somalier/relate/meta.yml' is unchanged 'modules/nf-core/somalier/relate/tests/tags.yml' is unchanged 'modules/nf-core/somalier/relate/tests/main.nf.test' is unchanged 'modules/nf-core/somalier/relate/tests/main.nf.test.snap' is unchanged ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 ************************************************************ diff --git a/modules/nf-core/tabix/tabix/environment.yml b/modules/nf-core/tabix/tabix/environment.yml index 8fd6ad50..4d1f9dd4 100644 --- a/modules/nf-core/tabix/tabix/environment.yml +++ b/modules/nf-core/tabix/tabix/environment.yml @@ -1,15 +1,9 @@ -<<<<<<< HEAD -channels: - - conda-forge - - bioconda -======= name: tabix_tabix channels: - conda-forge - bioconda - defaults ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 dependencies: - bioconda::htslib=1.20 diff --git a/modules/nf-core/untar/environment.yml b/modules/nf-core/untar/environment.yml index 58e0ef80..4f498244 100644 --- a/modules/nf-core/untar/environment.yml +++ b/modules/nf-core/untar/environment.yml @@ -1,14 +1,8 @@ -<<<<<<< HEAD -channels: - - conda-forge - - bioconda -======= name: untar channels: - conda-forge - bioconda - defaults ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 dependencies: - conda-forge::grep=3.11 - conda-forge::sed=4.8 diff --git a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap index 719e14c1..a0aec425 100644 --- a/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap +++ b/tests/subworkflows/local/cram_call_genotype_gatk4/main.nf.test.snap @@ -40,11 +40,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, -<<<<<<< HEAD - "timestamp": "2024-09-05T11:18:02.353352239" -======= "timestamp": "2024-09-05T17:35:02.44674969" ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 }, "filter - family": { "content": [ @@ -70,11 +66,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, -<<<<<<< HEAD - "timestamp": "2024-09-05T11:19:14.883570897" -======= "timestamp": "2024-09-05T17:35:46.768542501" ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 }, "default - gvcfs": { "content": [ @@ -124,11 +116,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, -<<<<<<< HEAD - "timestamp": "2024-09-05T11:16:25.448441115" -======= "timestamp": "2024-09-05T17:33:52.045772718" ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 }, "only_call - family": { "content": [ @@ -171,10 +159,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, -<<<<<<< HEAD - "timestamp": "2024-09-05T11:21:57.601081087" -======= "timestamp": "2024-09-06T14:26:29.249708339" ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 } } \ No newline at end of file diff --git a/tests/subworkflows/local/vcf_annotation/main.nf.test.snap b/tests/subworkflows/local/vcf_annotation/main.nf.test.snap index f9e7b1ad..d3ebc487 100644 --- a/tests/subworkflows/local/vcf_annotation/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_annotation/main.nf.test.snap @@ -22,11 +22,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, -<<<<<<< HEAD - "timestamp": "2024-09-05T12:53:05.739638954" -======= "timestamp": "2024-09-05T17:39:23.107888975" ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 }, "vcfanno": { "content": [ @@ -51,10 +47,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, -<<<<<<< HEAD - "timestamp": "2024-09-05T12:53:27.894947052" -======= "timestamp": "2024-09-05T17:39:39.640344999" ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 } } \ No newline at end of file diff --git a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap index 41c882d3..7d04aca4 100644 --- a/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap +++ b/tests/subworkflows/local/vcf_validate_small_variants/main.nf.test.snap @@ -221,10 +221,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, -<<<<<<< HEAD - "timestamp": "2024-09-04T17:19:41.712263383" -======= "timestamp": "2024-09-05T17:41:19.06545291" ->>>>>>> 3726a041a4fa98d73748421c2a5e8a5b3cd6e7c1 } } \ No newline at end of file From bb46fe2c5de29dc9ae8a3972ff4c7fbafb9f1376 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 20 Sep 2024 13:49:20 +0200 Subject: [PATCH 21/28] make pre-commit happy --- subworkflows/local/watchpath_handling/main.nf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/subworkflows/local/watchpath_handling/main.nf b/subworkflows/local/watchpath_handling/main.nf index 88cf3fbc..eca869b1 100644 --- a/subworkflows/local/watchpath_handling/main.nf +++ b/subworkflows/local/watchpath_handling/main.nf @@ -21,7 +21,7 @@ workflow WATCHPATH_HANDLING { def expected_files = [done_file.name] // Initialize samplesheet to keep the linter happy - ch_samplesheet_watched = Channel.empty() + def ch_samplesheet_watched = Channel.empty() // Pedigree handling def pedigree = new Pedigree(pedFile) @@ -40,7 +40,7 @@ workflow WATCHPATH_HANDLING { // Watchpath logic def is_watch = false row = row.collect { input -> - input_name = input instanceof Path ? input.name : input as String + def input_name = input instanceof Path ? input.name : input as String if (input_name.startsWith("watch:")) { is_watch = true expected_files.add(input_name.replace("watch:", "")) @@ -102,7 +102,7 @@ workflow WATCHPATH_HANDLING { if (watchdir && expected_files.size() > 1) { - watchdir_path = file(watchdir) + def watchdir_path = file(watchdir) if (!watchdir_path.exists()) { // Create the watchdir if it doesn't exist (this is a failsafe) watchdir_path.mkdir() @@ -151,7 +151,6 @@ workflow WATCHPATH_HANDLING { } else { ch_samplesheet_watched = ch_samplesheet_all - } ch_samplesheet_watched From 963f6b59eece4290d9fd47a361f3856a0a58e6ba Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 20 Sep 2024 14:06:33 +0200 Subject: [PATCH 22/28] [no-cancel] fix nf-core lint --- .github/workflows/ci.yml | 2 +- nextflow.config | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37ebe5ce..f5513eae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ env: concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" - cancel-in-progress: true + cancel-in-progress: "${{ !contains(github.event.head_commit.message, '[no-cancel]') }}" jobs: test_all: diff --git a/nextflow.config b/nextflow.config index 46e627fa..8a80581b 100644 --- a/nextflow.config +++ b/nextflow.config @@ -12,6 +12,7 @@ params { // Input options input = null ped = null + watchdir = null // Pipeline specific parameters scatter_count = 40 From 4efe0e361fbff50a2a1cdb98b8c3f93a01bf561b Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 20 Sep 2024 14:13:42 +0200 Subject: [PATCH 23/28] [no-cancel] fix nf-core lint --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5513eae..26383305 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ env: concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" - cancel-in-progress: "${{ !contains(github.event.head_commit.message, '[no-cancel]') }}" + cancel-in-progress: "${{ contains(github.event.head_commit.message, '[no-cancel]') }}" jobs: test_all: From 773eeafb1e05ca39d11bbbdeb616c82c27fbfd0a Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 23 Sep 2024 12:35:44 +0200 Subject: [PATCH 24/28] fix prepare tests --- .../cram_prepare_samtools_bedtools/main.nf.test | 3 +++ .../main.nf.test.snap | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test b/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test index 472a1eae..0a69a066 100644 --- a/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test +++ b/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test @@ -145,6 +145,9 @@ nextflow_workflow { input[1] = Channel.of([ [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:2], file(params.bed, checkIfExists:true) + ],[ + [id:"NA24143", sample:"NA24143", family:"Ashkenazim", family_samples:"NA24143", duplicate_count:2], + [] ]) input[2] = Channel.value([ [id:"fasta"], diff --git a/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test.snap b/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test.snap index 47b214c1..e4ad6291 100644 --- a/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test.snap +++ b/tests/subworkflows/local/cram_prepare_samtools_bedtools/main.nf.test.snap @@ -15,7 +15,16 @@ ] ], [ - + [ + { + "id": "NA24143", + "sample": "NA24143", + "family": "Ashkenazim", + "family_samples": "NA24143", + "duplicate_count": 2 + }, + "NA24143_intersect.bed:md5,b87069698afefb15282d069e56110046" + ] ], [ @@ -25,7 +34,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-06T14:40:18.974586888" + "timestamp": "2024-09-23T11:46:20.577603661" }, "default - WGS": { "content": [ From c9c4134c0dd2060f26f4feb76a55bd7daa5c6bbe Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 23 Sep 2024 12:36:10 +0200 Subject: [PATCH 25/28] undo no cancel --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26383305..37ebe5ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ env: concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" - cancel-in-progress: "${{ contains(github.event.head_commit.message, '[no-cancel]') }}" + cancel-in-progress: true jobs: test_all: From 3c5cf09f525cbf6c463113c0d9d7b9b07c3c1ca7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 23 Sep 2024 12:45:44 +0200 Subject: [PATCH 26/28] fix snapshots --- tests/pipeline/callers/main.nf.test.snap | 6 +++--- tests/pipeline/default/main.nf.test.snap | 2 +- tests/pipeline/gvcfs/main.nf.test.snap | 2 +- tests/pipeline/variations/main.nf.test.snap | 12 ++++++------ tests/pipeline/variations2/main.nf.test.snap | 10 +++++----- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/pipeline/callers/main.nf.test.snap b/tests/pipeline/callers/main.nf.test.snap index babe4775..f5629747 100644 --- a/tests/pipeline/callers/main.nf.test.snap +++ b/tests/pipeline/callers/main.nf.test.snap @@ -2,7 +2,7 @@ "haplotypecaller": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -47,7 +47,7 @@ "vardict + haplotypecaller": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -110,7 +110,7 @@ "vardict": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", diff --git a/tests/pipeline/default/main.nf.test.snap b/tests/pipeline/default/main.nf.test.snap index 30d78cd0..ab43dc3b 100644 --- a/tests/pipeline/default/main.nf.test.snap +++ b/tests/pipeline/default/main.nf.test.snap @@ -2,7 +2,7 @@ "default": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", diff --git a/tests/pipeline/gvcfs/main.nf.test.snap b/tests/pipeline/gvcfs/main.nf.test.snap index 03a3b401..3b3b89d8 100644 --- a/tests/pipeline/gvcfs/main.nf.test.snap +++ b/tests/pipeline/gvcfs/main.nf.test.snap @@ -2,7 +2,7 @@ "gvcfs": { "content": [ [ - "[:]" + ], [ "multiqc/multiqc_plots", diff --git a/tests/pipeline/variations/main.nf.test.snap b/tests/pipeline/variations/main.nf.test.snap index ee31f079..348a2942 100644 --- a/tests/pipeline/variations/main.nf.test.snap +++ b/tests/pipeline/variations/main.nf.test.snap @@ -2,7 +2,7 @@ "filter": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -47,7 +47,7 @@ "only_call": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -85,7 +85,7 @@ "annotate + vcfanno": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -131,7 +131,7 @@ "automap": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -188,7 +188,7 @@ "only_merge": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -227,7 +227,7 @@ "annotate": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", diff --git a/tests/pipeline/variations2/main.nf.test.snap b/tests/pipeline/variations2/main.nf.test.snap index ba145d7e..053dd3eb 100644 --- a/tests/pipeline/variations2/main.nf.test.snap +++ b/tests/pipeline/variations2/main.nf.test.snap @@ -2,7 +2,7 @@ "gemini": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -48,7 +48,7 @@ "normalize": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -93,7 +93,7 @@ "updio": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -138,7 +138,7 @@ "add_ped": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", @@ -183,7 +183,7 @@ "validate": { "content": [ [ - "[:]" + ], [ "NA24143/NA24143.bed", From 56ba4a1be1324c0acfbacb8f591c6e2692a459fb Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 23 Sep 2024 13:10:29 +0200 Subject: [PATCH 27/28] make genomes ignore true --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 8a80581b..bc52e3ff 100644 --- a/nextflow.config +++ b/nextflow.config @@ -82,7 +82,7 @@ params { igenomes_ignore = false genome = "GRCh38" genomes_base = "/references/" - genomes_ignore = false + genomes_ignore = true // Boilerplate options outdir = null From 070a9cbefc1acbb22738bdcd2d89ae821efdcc78 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 23 Sep 2024 13:50:31 +0200 Subject: [PATCH 28/28] fix an issue with the validation workflow --- .../local/vcf_validate_small_variants/main.nf | 32 ------------------- workflows/germline.nf | 21 ++++-------- 2 files changed, 7 insertions(+), 46 deletions(-) diff --git a/subworkflows/local/vcf_validate_small_variants/main.nf b/subworkflows/local/vcf_validate_small_variants/main.nf index eaa17579..63ca83fd 100644 --- a/subworkflows/local/vcf_validate_small_variants/main.nf +++ b/subworkflows/local/vcf_validate_small_variants/main.nf @@ -14,38 +14,6 @@ workflow VCF_VALIDATE_SMALL_VARIANTS { ch_versions = Channel.empty() - happy_vcf = Channel.empty() - happy_tbi = Channel.empty() - happy_indel_roc = Channel.empty() - happy_indel_roc_pass = Channel.empty() - happy_snp_roc = Channel.empty() - happy_snp_roc_pass = Channel.empty() - happy_roc = Channel.empty() - happy_summary = Channel.empty() - happy_extended_csv = Channel.empty() - - vcfeval_true_positive_vcf = Channel.empty() - vcfeval_true_positive_vcf_tbi = Channel.empty() - vcfeval_false_negative_vcf = Channel.empty() - vcfeval_false_negative_vcf_tbi = Channel.empty() - vcfeval_false_positive_vcf = Channel.empty() - vcfeval_false_positive_vcf_tbi = Channel.empty() - vcfeval_true_positive_baseline_vcf = Channel.empty() - vcfeval_true_positive_baseline_vcf_tbi = Channel.empty() - vcfeval_summary = Channel.empty() - vcfeval_phasing = Channel.empty() - vcfeval_snp_roc = Channel.empty() - vcfeval_non_snp_roc = Channel.empty() - vcfeval_weighted_roc = Channel.empty() - - rtgtools_snp_png_rocplot = Channel.empty() - rtgtools_non_snp_png_rocplot = Channel.empty() - rtgtools_weighted_png_rocplot = Channel.empty() - - rtgtools_snp_svg_rocplot = Channel.empty() - rtgtools_non_snp_svg_rocplot = Channel.empty() - rtgtools_weighted_svg_rocplot = Channel.empty() - ch_input = ch_vcf.join(ch_beds, failOnDuplicate: true, failOnMismatch: true) RTGTOOLS_VCFEVAL( diff --git a/workflows/germline.nf b/workflows/germline.nf index ec5987a7..fe3e04b6 100644 --- a/workflows/germline.nf +++ b/workflows/germline.nf @@ -342,12 +342,9 @@ workflow GERMLINE { gvcf: [new_meta, gvcf, tbi] // Optional channel containing the GVCFs and their optional indices cram: [new_meta, cram, crai] // Mandatory channel containing the CRAM files and their optional indices roi: [new_meta, roi_file] // Optional channel containing the ROI BED files for WES samples - family_samples: [meta.family, meta.family_samples.tokenize(",")] // A channel containing the samples per family } .set { ch_input } - ch_family_samples = ch_input.family_samples.distinct() - // // Create the GVCF index if it's missing // @@ -595,14 +592,15 @@ workflow GERMLINE { ch_input.truth_variants .map { meta, vcf, tbi, bed -> - [ groupKey(meta, meta.duplicate_count), vcf, tbi, bed ] + def new_meta = meta - meta.subMap("duplicate_count") + [ groupKey(new_meta, meta.duplicate_count), vcf, tbi, bed ] } .groupTuple() .map { meta, vcf, tbi, bed -> // Get only one VCF for samples that were given multiple times - one_vcf = vcf.find { vcf_file -> vcf_file != [] } ?: [] - one_tbi = tbi.find { tbi_file -> tbi_file != [] } ?: [] - one_bed = bed.find { bed_file -> bed_file != [] } ?: [] + def one_vcf = vcf.find { vcf_file -> vcf_file != [] } ?: [] + def one_tbi = tbi.find { tbi_file -> tbi_file != [] } ?: [] + def one_bed = bed.find { bed_file -> bed_file != [] } ?: [] [ meta, one_vcf, one_tbi, one_bed ] } .branch { meta, vcf, tbi, bed -> @@ -637,12 +635,7 @@ workflow GERMLINE { ch_final_vcfs .map { meta, vcf, tbi -> def new_meta = meta - meta.subMap("family_samples") - [ meta.family, new_meta, vcf, tbi ] - } - .combine(ch_family_samples, by:0) - .map { family, meta, vcf, tbi, samples -> - def sample = meta.sample ? [meta.sample] : samples - [ meta, vcf, tbi, sample ] + [ new_meta, vcf, tbi, meta.family_samples.tokenize(",") ] } .transpose(by: 3) .map { meta, vcf, tbi, sample -> @@ -654,7 +647,7 @@ workflow GERMLINE { ] [ new_meta, vcf, tbi ] } - .combine(ch_truths, by:0) + .join(ch_truths, failOnMismatch:true, failOnDuplicate:true) .filter { meta, vcf, tbi, truth_vcf, truth_tbi, truth_bed -> // Filter out all samples that have no truth VCF truth_vcf != []