From 64bea68580efac52ac2eca97ae5523e672b1e21d Mon Sep 17 00:00:00 2001 From: ramprasadn <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:09:44 +0200 Subject: [PATCH 1/7] update modules --- modules.json | 200 +-- .../nf-core/bcftools/annotate/environment.yml | 4 +- modules/nf-core/bcftools/annotate/main.nf | 21 +- modules/nf-core/bcftools/annotate/meta.yml | 87 +- .../bcftools/annotate/tests/bcf.config | 8 +- .../bcftools/annotate/tests/main.nf.test | 281 +++- .../bcftools/annotate/tests/main.nf.test.snap | 333 +++- .../bcftools/annotate/tests/vcf.config | 6 +- .../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/concat/environment.yml | 4 +- modules/nf-core/bcftools/concat/main.nf | 21 +- modules/nf-core/bcftools/concat/meta.yml | 84 +- .../bcftools/concat/tests/main.nf.test | 253 ++- .../bcftools/concat/tests/main.nf.test.snap | 330 +++- .../bcftools/concat/tests/vcf_gz_index.config | 4 + .../concat/tests/vcf_gz_index_csi.config | 4 + .../concat/tests/vcf_gz_index_tbi.config | 4 + .../nf-core/bcftools/filter/environment.yml | 4 +- modules/nf-core/bcftools/filter/main.nf | 18 +- modules/nf-core/bcftools/filter/meta.yml | 63 +- .../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 + .../nf-core/bcftools/merge/environment.yml | 4 +- modules/nf-core/bcftools/merge/main.nf | 26 +- modules/nf-core/bcftools/merge/meta.yml | 128 +- .../nf-core/bcftools/merge/tests/bcf.config | 3 + .../bcftools/merge/tests/bcf_gz.config | 3 + .../nf-core/bcftools/merge/tests/main.nf.test | 853 +++++++++++ .../bcftools/merge/tests/main.nf.test.snap | 607 ++++++++ .../bcftools/merge/tests/nextflow.config | 5 + .../bcftools/merge/tests/nextflow.gvcf.config | 5 + modules/nf-core/bcftools/merge/tests/tags.yml | 2 + .../nf-core/bcftools/merge/tests/vcf.config | 3 + .../bcftools/merge/tests/vcf_gz.config | 3 + .../bcftools/merge/tests/vcf_gz_index.config | 3 + .../merge/tests/vcf_gz_index_csi.config | 3 + .../merge/tests/vcf_gz_index_tbi.config | 3 + modules/nf-core/bcftools/norm/environment.yml | 4 +- modules/nf-core/bcftools/norm/main.nf | 22 +- modules/nf-core/bcftools/norm/meta.yml | 96 +- .../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/reheader/environment.yml | 4 +- modules/nf-core/bcftools/reheader/main.nf | 15 +- modules/nf-core/bcftools/reheader/meta.yml | 89 +- .../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 + modules/nf-core/bcftools/roh/environment.yml | 4 +- modules/nf-core/bcftools/roh/main.nf | 4 +- modules/nf-core/bcftools/roh/meta.yml | 95 +- .../nf-core/bcftools/roh/tests/main.nf.test | 67 + .../bcftools/roh/tests/main.nf.test.snap | 68 + modules/nf-core/bcftools/sort/environment.yml | 4 +- modules/nf-core/bcftools/sort/main.nf | 17 +- modules/nf-core/bcftools/sort/meta.yml | 65 +- .../nf-core/bcftools/sort/tests/main.nf.test | 174 ++- .../bcftools/sort/tests/main.nf.test.snap | 298 +++- .../bcftools/sort/tests/vcf_gz_index.config | 4 + .../sort/tests/vcf_gz_index_csi.config | 4 + .../sort/tests/vcf_gz_index_tbi.config | 4 + modules/nf-core/bcftools/view/environment.yml | 4 +- modules/nf-core/bcftools/view/main.nf | 16 +- modules/nf-core/bcftools/view/meta.yml | 108 +- .../nf-core/bcftools/view/tests/main.nf.test | 217 ++- .../bcftools/view/tests/main.nf.test.snap | 300 +++- .../bcftools/view/tests/vcf_gz_index.config | 4 + .../view/tests/vcf_gz_index_csi.config | 4 + .../view/tests/vcf_gz_index_tbi.config | 4 + modules/nf-core/bwa/index/environment.yml | 2 - modules/nf-core/bwa/index/meta.yml | 43 +- modules/nf-core/bwa/mem/environment.yml | 6 +- modules/nf-core/bwa/mem/meta.yml | 113 +- modules/nf-core/bwa/mem/tests/main.nf.test | 139 +- .../nf-core/bwa/mem/tests/main.nf.test.snap | 203 ++- modules/nf-core/bwamem2/index/environment.yml | 2 - modules/nf-core/bwamem2/index/meta.yml | 41 +- modules/nf-core/bwamem2/mem/environment.yml | 6 +- modules/nf-core/bwamem2/mem/meta.yml | 137 +- .../nf-core/bwamem2/mem/tests/main.nf.test | 99 +- .../bwamem2/mem/tests/main.nf.test.snap | 108 +- modules/nf-core/bwameme/index/environment.yml | 2 - modules/nf-core/bwameme/index/meta.yml | 45 +- modules/nf-core/bwameme/mem/environment.yml | 2 - modules/nf-core/bwameme/mem/meta.yml | 151 +- .../nf-core/bwameme/mem/tests/main.nf.test | 105 +- .../bwameme/mem/tests/main.nf.test.snap | 257 ++-- modules/nf-core/cadd/environment.yml | 2 - modules/nf-core/cadd/meta.yml | 60 +- modules/nf-core/cat/cat/environment.yml | 2 - modules/nf-core/cat/cat/main.nf | 1 - modules/nf-core/cat/cat/meta.yml | 39 +- modules/nf-core/cat/cat/tests/main.nf.test | 27 +- .../nf-core/cat/cat/tests/main.nf.test.snap | 74 +- modules/nf-core/chromograph/environment.yml | 2 - modules/nf-core/chromograph/meta.yml | 150 +- .../nf-core/chromograph/tests/main.nf.test | 2 +- .../nf-core/cnvnator/cnvnator/environment.yml | 2 - modules/nf-core/cnvnator/cnvnator/meta.yml | 124 +- .../cnvnator/convert2vcf/environment.yml | 2 - modules/nf-core/cnvnator/convert2vcf/meta.yml | 50 +- .../nf-core/deepvariant/callvariants/main.nf | 58 + .../nf-core/deepvariant/callvariants/meta.yml | 48 + .../callvariants/tests/main.nf.test | 85 + .../callvariants/tests/main.nf.test.snap | 59 + .../callvariants/tests/nextflow.config | 11 + .../deepvariant/callvariants/tests/tags.yml | 2 + .../nf-core/deepvariant/makeexamples/main.nf | 66 + .../nf-core/deepvariant/makeexamples/meta.yml | 102 ++ .../makeexamples/tests/main.nf.test | 228 +++ .../makeexamples/tests/main.nf.test.snap | 134 ++ .../makeexamples/tests/nextflow.config | 6 + .../deepvariant/makeexamples/tests/tags.yml | 2 + .../deepvariant/postprocessvariants/main.nf | 77 + .../deepvariant/postprocessvariants/meta.yml | 113 ++ .../postprocessvariants/tests/main.nf.test | 118 ++ .../tests/main.nf.test.snap | 180 +++ .../postprocessvariants/tests/nextflow.config | 10 + .../postprocessvariants/tests/tags.yml | 2 + .../deepvariant/rundeepvariant/main.nf | 78 + .../deepvariant/rundeepvariant/meta.yml | 122 ++ .../rundeepvariant/tests/main.nf.test | 166 ++ .../rundeepvariant/tests/main.nf.test.snap | 358 +++++ .../tests/nextflow-intervals.config | 8 + .../nextflow-non-autosomal-calling.config | 8 + .../rundeepvariant/tests/nextflow.config | 8 + .../deepvariant/rundeepvariant/tests/tags.yml | 2 + modules/nf-core/eklipse/environment.yml | 2 - modules/nf-core/eklipse/meta.yml | 85 +- modules/nf-core/eklipse/tests/main.nf.test | 6 +- modules/nf-core/ensemblvep/filtervep/meta.yml | 52 +- modules/nf-core/ensemblvep/vep/meta.yml | 148 +- .../nf-core/expansionhunter/environment.yml | 3 - modules/nf-core/expansionhunter/meta.yml | 133 +- .../expansionhunter/tests/main.nf.test | 20 +- modules/nf-core/fastp/environment.yml | 2 - modules/nf-core/fastp/main.nf | 21 +- modules/nf-core/fastp/meta.yml | 134 +- modules/nf-core/fastp/tests/main.nf.test | 823 ++++------ modules/nf-core/fastp/tests/main.nf.test.snap | 1361 ++++++++++++++--- modules/nf-core/fastqc/environment.yml | 2 - modules/nf-core/fastqc/main.nf | 5 +- modules/nf-core/fastqc/meta.yml | 57 +- modules/nf-core/fastqc/tests/main.nf.test | 225 ++- .../nf-core/fastqc/tests/main.nf.test.snap | 370 ++++- .../gatk4/bedtointervallist/environment.yml | 2 - .../nf-core/gatk4/bedtointervallist/meta.yml | 59 +- .../gatk4/collectreadcounts/environment.yml | 2 - .../nf-core/gatk4/collectreadcounts/meta.yml | 136 +- .../collectreadcounts/tests/main.nf.test | 104 ++ .../collectreadcounts/tests/main.nf.test.snap | 97 ++ .../tests/nextflow.cram.config | 5 + .../tests/nextflow.hdf5.config | 5 + .../tests/nextflow.tsv.config | 5 + .../createsequencedictionary/environment.yml | 2 - .../gatk4/createsequencedictionary/meta.yml | 37 +- .../gatk4/denoisereadcounts/environment.yml | 2 - .../nf-core/gatk4/denoisereadcounts/meta.yml | 75 +- .../denoisereadcounts/tests/main.nf.test | 17 +- .../denoisereadcounts/tests/main.nf.test.snap | 7 +- .../determinegermlinecontigploidy/meta.yml | 112 +- .../gatk4/filtermutectcalls/environment.yml | 2 - .../nf-core/gatk4/filtermutectcalls/meta.yml | 162 +- .../nf-core/gatk4/germlinecnvcaller/meta.yml | 107 +- .../gatk4/intervallisttools/environment.yml | 2 - .../nf-core/gatk4/intervallisttools/meta.yml | 51 +- .../gatk4/mergebamalignment/environment.yml | 2 - .../nf-core/gatk4/mergebamalignment/meta.yml | 77 +- .../mergebamalignment/tests/main.nf.test | 73 + .../mergebamalignment/tests/main.nf.test.snap | 48 + .../nf-core/gatk4/mergevcfs/environment.yml | 2 - modules/nf-core/gatk4/mergevcfs/meta.yml | 66 +- modules/nf-core/gatk4/mutect2/environment.yml | 2 - modules/nf-core/gatk4/mutect2/meta.yml | 175 ++- .../nf-core/gatk4/mutect2/tests/main.nf.test | 124 +- .../postprocessgermlinecnvcalls/meta.yml | 104 +- .../nf-core/gatk4/printreads/environment.yml | 2 - modules/nf-core/gatk4/printreads/meta.yml | 131 +- .../gatk4/printreads/tests/main.nf.test | 95 ++ .../gatk4/printreads/tests/main.nf.test.snap | 40 + .../nf-core/gatk4/revertsam/environment.yml | 2 - modules/nf-core/gatk4/revertsam/meta.yml | 37 +- .../gatk4/revertsam/tests/main.nf.test | 59 + .../gatk4/revertsam/tests/main.nf.test.snap | 48 + .../nf-core/gatk4/samtofastq/environment.yml | 2 - modules/nf-core/gatk4/samtofastq/meta.yml | 37 +- .../gatk4/samtofastq/tests/main.nf.test | 88 ++ .../gatk4/samtofastq/tests/main.nf.test.snap | 66 + .../gatk4/selectvariants/environment.yml | 2 - modules/nf-core/gatk4/selectvariants/meta.yml | 73 +- .../gatk4/selectvariants/tests/main.nf.test | 10 +- .../nf-core/gatk4/shiftfasta/environment.yml | 2 - modules/nf-core/gatk4/shiftfasta/meta.yml | 151 +- .../gatk4/shiftfasta/tests/main.nf.test | 44 + .../gatk4/shiftfasta/tests/main.nf.test.snap | 133 ++ .../gatk4/shiftfasta/tests/nextflow.config | 5 + .../gatk4/splitintervals/environment.yml | 2 - modules/nf-core/gatk4/splitintervals/meta.yml | 98 +- .../gatk4/splitintervals/tests/main.nf.test | 109 ++ .../splitintervals/tests/main.nf.test.snap | 119 ++ .../splitintervals/tests/nextflow.config | 5 + .../gatk4/variantfiltration/environment.yml | 2 - .../nf-core/gatk4/variantfiltration/meta.yml | 110 +- .../nf-core/genmod/annotate/environment.yml | 2 - modules/nf-core/genmod/annotate/meta.yml | 45 +- .../genmod/annotate/tests/main.nf.test | 2 +- .../nf-core/genmod/compound/environment.yml | 2 - modules/nf-core/genmod/compound/meta.yml | 45 +- .../genmod/compound/tests/main.nf.test | 2 +- modules/nf-core/genmod/models/environment.yml | 2 - modules/nf-core/genmod/models/meta.yml | 60 +- .../nf-core/genmod/models/tests/main.nf.test | 4 +- modules/nf-core/genmod/score/environment.yml | 2 - modules/nf-core/genmod/score/meta.yml | 60 +- .../nf-core/genmod/score/tests/main.nf.test | 6 +- modules/nf-core/glnexus/environment.yml | 2 - modules/nf-core/glnexus/meta.yml | 43 +- modules/nf-core/haplocheck/environment.yml | 2 - modules/nf-core/haplocheck/meta.yml | 62 +- modules/nf-core/haplocheck/tests/main.nf.test | 56 + .../haplocheck/tests/main.nf.test.snap | 100 ++ .../haplogrep2/classify/environment.yml | 2 - modules/nf-core/haplogrep2/classify/meta.yml | 57 +- .../haplogrep2/classify/tests/main.nf.test | 59 + .../classify/tests/main.nf.test.snap | 72 + .../nf-core/hmtnote/annotate/environment.yml | 2 - modules/nf-core/hmtnote/annotate/meta.yml | 44 +- .../nf-core/manta/germline/environment.yml | 2 - modules/nf-core/manta/germline/meta.yml | 175 ++- modules/nf-core/mosdepth/environment.yml | 4 +- modules/nf-core/mosdepth/main.nf | 12 +- modules/nf-core/mosdepth/meta.yml | 214 ++- modules/nf-core/mosdepth/tests/main.nf.test | 66 +- .../nf-core/mosdepth/tests/main.nf.test.snap | 423 +++-- modules/nf-core/multiqc/environment.yml | 4 +- modules/nf-core/multiqc/main.nf | 14 +- modules/nf-core/multiqc/meta.yml | 78 +- modules/nf-core/multiqc/tests/main.nf.test | 8 + .../nf-core/multiqc/tests/main.nf.test.snap | 20 +- modules/nf-core/multiqc/tests/nextflow.config | 5 + .../ngsbits/samplegender/environment.yml | 2 - modules/nf-core/ngsbits/samplegender/meta.yml | 99 +- .../ngsbits/samplegender/tests/main.nf.test | 4 +- modules/nf-core/peddy/environment.yml | 2 - modules/nf-core/peddy/meta.yml | 100 +- modules/nf-core/peddy/tests/main.nf.test | 6 +- .../addorreplacereadgroups/environment.yml | 4 +- .../picard/addorreplacereadgroups/main.nf | 4 +- .../picard/addorreplacereadgroups/meta.yml | 105 +- .../tests/main.nf.test.snap | 20 +- .../picard/collecthsmetrics/environment.yml | 4 +- .../nf-core/picard/collecthsmetrics/main.nf | 6 +- .../nf-core/picard/collecthsmetrics/meta.yml | 128 +- .../collecthsmetrics/tests/main.nf.test | 191 +++ .../collecthsmetrics/tests/main.nf.test.snap | 478 ++++++ .../picard/collecthsmetrics/tests/tags.yml | 2 + .../collectmultiplemetrics/environment.yml | 4 +- .../picard/collectmultiplemetrics/main.nf | 4 +- .../picard/collectmultiplemetrics/meta.yml | 97 +- .../collectmultiplemetrics/tests/main.nf.test | 112 ++ .../tests/main.nf.test.snap | 80 + .../picard/collectwgsmetrics/environment.yml | 4 +- .../nf-core/picard/collectwgsmetrics/main.nf | 4 +- .../nf-core/picard/collectwgsmetrics/meta.yml | 97 +- .../collectwgsmetrics/tests/main.nf.test | 83 + .../collectwgsmetrics/tests/main.nf.test.snap | 28 + .../picard/liftovervcf/environment.yml | 4 +- modules/nf-core/picard/liftovervcf/main.nf | 8 +- modules/nf-core/picard/liftovervcf/meta.yml | 102 +- .../picard/liftovervcf/tests/main.nf.test | 84 + .../liftovervcf/tests/main.nf.test.snap | 30 + .../picard/liftovervcf/tests/nextflow.config | 3 + .../picard/markduplicates/environment.yml | 4 +- modules/nf-core/picard/markduplicates/main.nf | 4 +- .../nf-core/picard/markduplicates/meta.yml | 116 +- .../picard/markduplicates/tests/main.nf.test | 99 +- .../markduplicates/tests/main.nf.test.snap | 271 +++- .../picard/renamesampleinvcf/environment.yml | 4 +- .../nf-core/picard/renamesampleinvcf/main.nf | 4 +- .../nf-core/picard/renamesampleinvcf/meta.yml | 45 +- .../renamesampleinvcf/tests/main.nf.test | 38 + .../renamesampleinvcf/tests/main.nf.test.snap | 15 + .../nf-core/picard/sortvcf/environment.yml | 4 +- modules/nf-core/picard/sortvcf/main.nf | 4 +- modules/nf-core/picard/sortvcf/meta.yml | 84 +- .../nf-core/picard/sortvcf/tests/main.nf.test | 44 + .../picard/sortvcf/tests/main.nf.test.snap | 21 + .../nf-core/qualimap/bamqc/environment.yml | 2 - modules/nf-core/qualimap/bamqc/meta.yml | 51 +- .../nf-core/qualimap/bamqc/tests/main.nf.test | 34 +- .../qualimap/bamqc/tests/main.nf.test.snap | 161 +- .../nf-core/rhocall/annotate/environment.yml | 2 - modules/nf-core/rhocall/annotate/meta.yml | 79 +- modules/nf-core/rhocall/viz/environment.yml | 2 - modules/nf-core/rhocall/viz/meta.yml | 72 +- .../nf-core/rhocall/viz/tests/main.nf.test | 6 +- .../nf-core/rtgtools/format/environment.yml | 2 - modules/nf-core/rtgtools/format/meta.yml | 71 +- .../nf-core/rtgtools/vcfeval/environment.yml | 2 - modules/nf-core/rtgtools/vcfeval/meta.yml | 251 ++- .../nf-core/samtools/faidx/environment.yml | 10 +- modules/nf-core/samtools/faidx/main.nf | 4 +- modules/nf-core/samtools/faidx/meta.yml | 85 +- .../samtools/faidx/tests/main.nf.test.snap | 50 +- .../nf-core/samtools/index/environment.yml | 8 +- modules/nf-core/samtools/index/main.nf | 11 +- modules/nf-core/samtools/index/meta.yml | 68 +- .../nf-core/samtools/index/tests/main.nf.test | 87 +- .../samtools/index/tests/main.nf.test.snap | 264 +++- .../nf-core/samtools/merge/environment.yml | 8 +- modules/nf-core/samtools/merge/main.nf | 4 +- modules/nf-core/samtools/merge/meta.yml | 117 +- .../samtools/merge/tests/main.nf.test.snap | 32 +- modules/nf-core/samtools/sort/environment.yml | 8 +- modules/nf-core/samtools/sort/main.nf | 19 +- modules/nf-core/samtools/sort/meta.yml | 99 +- .../nf-core/samtools/sort/tests/main.nf.test | 52 +- .../samtools/sort/tests/main.nf.test.snap | 144 +- .../samtools/sort/tests/nextflow_cram.config | 8 + .../nf-core/samtools/stats/environment.yml | 8 +- modules/nf-core/samtools/stats/main.nf | 4 +- modules/nf-core/samtools/stats/meta.yml | 69 +- .../nf-core/samtools/stats/tests/main.nf.test | 60 +- .../samtools/stats/tests/main.nf.test.snap | 98 +- modules/nf-core/samtools/view/environment.yml | 8 +- modules/nf-core/samtools/view/main.nf | 44 +- modules/nf-core/samtools/view/meta.yml | 158 +- .../nf-core/samtools/view/tests/main.nf.test | 2 + .../samtools/view/tests/main.nf.test.snap | 88 +- .../smncopynumbercaller/environment.yml | 2 - modules/nf-core/smncopynumbercaller/meta.yml | 77 +- .../smncopynumbercaller/tests/main.nf.test | 59 + .../tests/main.nf.test.snap | 100 ++ .../smncopynumbercaller/tests/nextflow.config | 6 + modules/nf-core/stranger/environment.yml | 4 +- modules/nf-core/stranger/main.nf | 6 +- modules/nf-core/stranger/meta.yml | 66 +- modules/nf-core/stranger/tests/main.nf.test | 82 + .../nf-core/stranger/tests/main.nf.test.snap | 68 + .../nf-core/stranger/tests/nextflow.config | 5 + modules/nf-core/stranger/tests/tags.yml | 2 + modules/nf-core/svdb/merge/environment.yml | 8 +- modules/nf-core/svdb/merge/meta.yml | 52 +- modules/nf-core/svdb/query/environment.yml | 2 - modules/nf-core/svdb/query/meta.yml | 88 +- modules/nf-core/svdb/query/tests/main.nf.test | 4 +- modules/nf-core/tabix/bgzip/environment.yml | 5 +- modules/nf-core/tabix/bgzip/main.nf | 4 +- modules/nf-core/tabix/bgzip/meta.yml | 53 +- .../nf-core/tabix/bgzip/tests/main.nf.test | 8 +- .../tabix/bgzip/tests/main.nf.test.snap | 56 +- modules/nf-core/tabix/tabix/environment.yml | 5 +- modules/nf-core/tabix/tabix/main.nf | 11 +- modules/nf-core/tabix/tabix/meta.yml | 55 +- .../nf-core/tabix/tabix/tests/main.nf.test | 44 +- .../tabix/tabix/tests/main.nf.test.snap | 111 +- modules/nf-core/tiddit/cov/environment.yml | 2 - modules/nf-core/tiddit/cov/meta.yml | 77 +- modules/nf-core/tiddit/cov/tests/main.nf.test | 53 +- .../tiddit/cov/tests/main.nf.test.snap | 78 +- modules/nf-core/tiddit/sv/environment.yml | 2 - modules/nf-core/tiddit/sv/meta.yml | 99 +- .../nf-core/ucsc/wigtobigwig/environment.yml | 2 - modules/nf-core/ucsc/wigtobigwig/meta.yml | 45 +- .../ucsc/wigtobigwig/tests/main.nf.test | 59 + .../ucsc/wigtobigwig/tests/main.nf.test.snap | 72 + modules/nf-core/untar/environment.yml | 6 +- modules/nf-core/untar/main.nf | 29 +- modules/nf-core/untar/meta.yml | 43 +- modules/nf-core/untar/tests/main.nf.test | 44 +- modules/nf-core/untar/tests/main.nf.test.snap | 152 +- modules/nf-core/upd/environment.yml | 2 - modules/nf-core/upd/meta.yml | 48 +- modules/nf-core/upd/tests/main.nf.test | 57 + modules/nf-core/upd/tests/main.nf.test.snap | 72 + modules/nf-core/upd/tests/nextflow.config | 3 + modules/nf-core/vcf2cytosure/environment.yml | 2 - modules/nf-core/vcf2cytosure/meta.yml | 110 +- .../nf-core/vcf2cytosure/tests/main.nf.test | 8 +- modules/nf-core/vcfanno/environment.yml | 2 - modules/nf-core/vcfanno/meta.yml | 86 +- modules/nf-core/vcfanno/tests/main.nf.test | 22 +- 398 files changed, 21074 insertions(+), 6024 deletions(-) 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/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/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/merge/tests/bcf.config create mode 100644 modules/nf-core/bcftools/merge/tests/bcf_gz.config create mode 100644 modules/nf-core/bcftools/merge/tests/main.nf.test create mode 100644 modules/nf-core/bcftools/merge/tests/main.nf.test.snap create mode 100644 modules/nf-core/bcftools/merge/tests/nextflow.config create mode 100644 modules/nf-core/bcftools/merge/tests/nextflow.gvcf.config create mode 100644 modules/nf-core/bcftools/merge/tests/tags.yml create mode 100644 modules/nf-core/bcftools/merge/tests/vcf.config create mode 100644 modules/nf-core/bcftools/merge/tests/vcf_gz.config create mode 100644 modules/nf-core/bcftools/merge/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/merge/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/merge/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 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/roh/tests/main.nf.test create mode 100644 modules/nf-core/bcftools/roh/tests/main.nf.test.snap 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 create mode 100644 modules/nf-core/bcftools/view/tests/vcf_gz_index.config create mode 100644 modules/nf-core/bcftools/view/tests/vcf_gz_index_csi.config create mode 100644 modules/nf-core/bcftools/view/tests/vcf_gz_index_tbi.config create mode 100644 modules/nf-core/deepvariant/callvariants/main.nf create mode 100644 modules/nf-core/deepvariant/callvariants/meta.yml create mode 100644 modules/nf-core/deepvariant/callvariants/tests/main.nf.test create mode 100644 modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap create mode 100644 modules/nf-core/deepvariant/callvariants/tests/nextflow.config create mode 100644 modules/nf-core/deepvariant/callvariants/tests/tags.yml create mode 100644 modules/nf-core/deepvariant/makeexamples/main.nf create mode 100644 modules/nf-core/deepvariant/makeexamples/meta.yml create mode 100644 modules/nf-core/deepvariant/makeexamples/tests/main.nf.test create mode 100644 modules/nf-core/deepvariant/makeexamples/tests/main.nf.test.snap create mode 100644 modules/nf-core/deepvariant/makeexamples/tests/nextflow.config create mode 100644 modules/nf-core/deepvariant/makeexamples/tests/tags.yml create mode 100644 modules/nf-core/deepvariant/postprocessvariants/main.nf create mode 100644 modules/nf-core/deepvariant/postprocessvariants/meta.yml create mode 100644 modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test create mode 100644 modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test.snap create mode 100644 modules/nf-core/deepvariant/postprocessvariants/tests/nextflow.config create mode 100644 modules/nf-core/deepvariant/postprocessvariants/tests/tags.yml create mode 100644 modules/nf-core/deepvariant/rundeepvariant/main.nf create mode 100644 modules/nf-core/deepvariant/rundeepvariant/meta.yml create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml create mode 100644 modules/nf-core/gatk4/collectreadcounts/tests/main.nf.test create mode 100644 modules/nf-core/gatk4/collectreadcounts/tests/main.nf.test.snap create mode 100644 modules/nf-core/gatk4/collectreadcounts/tests/nextflow.cram.config create mode 100644 modules/nf-core/gatk4/collectreadcounts/tests/nextflow.hdf5.config create mode 100644 modules/nf-core/gatk4/collectreadcounts/tests/nextflow.tsv.config create mode 100644 modules/nf-core/gatk4/mergebamalignment/tests/main.nf.test create mode 100644 modules/nf-core/gatk4/mergebamalignment/tests/main.nf.test.snap create mode 100644 modules/nf-core/gatk4/printreads/tests/main.nf.test create mode 100644 modules/nf-core/gatk4/printreads/tests/main.nf.test.snap create mode 100644 modules/nf-core/gatk4/revertsam/tests/main.nf.test create mode 100644 modules/nf-core/gatk4/revertsam/tests/main.nf.test.snap create mode 100644 modules/nf-core/gatk4/samtofastq/tests/main.nf.test create mode 100644 modules/nf-core/gatk4/samtofastq/tests/main.nf.test.snap create mode 100644 modules/nf-core/gatk4/shiftfasta/tests/main.nf.test create mode 100644 modules/nf-core/gatk4/shiftfasta/tests/main.nf.test.snap create mode 100644 modules/nf-core/gatk4/shiftfasta/tests/nextflow.config create mode 100644 modules/nf-core/gatk4/splitintervals/tests/main.nf.test create mode 100644 modules/nf-core/gatk4/splitintervals/tests/main.nf.test.snap create mode 100644 modules/nf-core/gatk4/splitintervals/tests/nextflow.config create mode 100644 modules/nf-core/haplocheck/tests/main.nf.test create mode 100644 modules/nf-core/haplocheck/tests/main.nf.test.snap create mode 100644 modules/nf-core/haplogrep2/classify/tests/main.nf.test create mode 100644 modules/nf-core/haplogrep2/classify/tests/main.nf.test.snap create mode 100644 modules/nf-core/multiqc/tests/nextflow.config create mode 100644 modules/nf-core/picard/collecthsmetrics/tests/main.nf.test create mode 100644 modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap create mode 100644 modules/nf-core/picard/collecthsmetrics/tests/tags.yml create mode 100644 modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test create mode 100644 modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap create mode 100644 modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test create mode 100644 modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap create mode 100644 modules/nf-core/picard/liftovervcf/tests/main.nf.test create mode 100644 modules/nf-core/picard/liftovervcf/tests/main.nf.test.snap create mode 100644 modules/nf-core/picard/liftovervcf/tests/nextflow.config create mode 100644 modules/nf-core/picard/renamesampleinvcf/tests/main.nf.test create mode 100644 modules/nf-core/picard/renamesampleinvcf/tests/main.nf.test.snap create mode 100644 modules/nf-core/picard/sortvcf/tests/main.nf.test create mode 100644 modules/nf-core/picard/sortvcf/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/sort/tests/nextflow_cram.config create mode 100644 modules/nf-core/smncopynumbercaller/tests/main.nf.test create mode 100644 modules/nf-core/smncopynumbercaller/tests/main.nf.test.snap create mode 100644 modules/nf-core/smncopynumbercaller/tests/nextflow.config create mode 100644 modules/nf-core/stranger/tests/main.nf.test create mode 100644 modules/nf-core/stranger/tests/main.nf.test.snap create mode 100644 modules/nf-core/stranger/tests/nextflow.config create mode 100644 modules/nf-core/stranger/tests/tags.yml create mode 100644 modules/nf-core/ucsc/wigtobigwig/tests/main.nf.test create mode 100644 modules/nf-core/ucsc/wigtobigwig/tests/main.nf.test.snap create mode 100644 modules/nf-core/upd/tests/main.nf.test create mode 100644 modules/nf-core/upd/tests/main.nf.test.snap create mode 100644 modules/nf-core/upd/tests/nextflow.config diff --git a/modules.json b/modules.json index 6434e3b78..a6af5aa05 100644 --- a/modules.json +++ b/modules.json @@ -7,47 +7,47 @@ "nf-core": { "bcftools/annotate": { "branch": "master", - "git_sha": "2ad29c2aed06d815d9f68ad7ba20b3b1c574ce9c", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bcftools/concat": { "branch": "master", - "git_sha": "b42fec6f7c6e5d0716685cabb825ef6bf6e386b5", + "git_sha": "d1e0ec7670fa77905a378627232566ce54c3c26d", "installed_by": ["modules"] }, "bcftools/filter": { "branch": "master", - "git_sha": "a3893076a76e91b3ff152faddf872f00778fb224", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bcftools/merge": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bcftools/norm": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bcftools/reheader": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bcftools/roh": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bcftools/sort": { "branch": "master", - "git_sha": "b42fec6f7c6e5d0716685cabb825ef6bf6e386b5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bcftools/view": { "branch": "master", - "git_sha": "1013101da4252623fd7acf19cc581bae91d4f839", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bedtools/genomecov": { @@ -57,58 +57,58 @@ }, "bwa/index": { "branch": "master", - "git_sha": "086fa66260595e123b0ea47a6512539b72a9afa3", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bwa/mem": { "branch": "master", - "git_sha": "0c34b8159f62cde451c4ff249629c9d0a4f3f9c3", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bwamem2/index": { "branch": "master", - "git_sha": "7081e04c18de9480948d34513a1c1e2d0fa9126d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bwamem2/mem": { "branch": "master", - "git_sha": "3afb95b2e15fc4a2347470255a7ef654f650c8ec", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bwameme/index": { "branch": "master", - "git_sha": "79480293280ff4f10f30bdea1ddd903f223f8489", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "bwameme/mem": { "branch": "master", - "git_sha": "0aa157a00b54bcbe2c50be375cafd68d928e7f4d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "cadd": { "branch": "master", - "git_sha": "cf3ed075695639b0a0924eb0901146df1996dc08", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "cat/cat": { "branch": "master", - "git_sha": "9437e6053dccf4aafa022bfd6e7e9de67e625af8", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "chromograph": { "branch": "master", - "git_sha": "f05512229a501df5d67273bb7358c5f69667f40d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "cnvnator/cnvnator": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"], "patch": "modules/nf-core/cnvnator/cnvnator/cnvnator-cnvnator.diff" }, "cnvnator/convert2vcf": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "deepvariant": { @@ -116,290 +116,310 @@ "git_sha": "a7e8b8afd4fa82f20d745fa778bfdbf39c1f7efb", "installed_by": ["modules"] }, + "deepvariant/callvariants": { + "branch": "master", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "installed_by": ["modules"] + }, + "deepvariant/makeexamples": { + "branch": "master", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "installed_by": ["modules"] + }, + "deepvariant/postprocessvariants": { + "branch": "master", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "installed_by": ["modules"] + }, + "deepvariant/rundeepvariant": { + "branch": "master", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "installed_by": ["modules"] + }, "eklipse": { "branch": "master", - "git_sha": "7f265c2db4b1394c9303a3eb51e25d8447767347", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "ensemblvep/filtervep": { "branch": "master", - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "ensemblvep/vep": { "branch": "master", - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "expansionhunter": { "branch": "master", - "git_sha": "b42fec6f7c6e5d0716685cabb825ef6bf6e386b5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "fastp": { "branch": "master", - "git_sha": "95cf5fe0194c7bf5cb0e3027a2eb7e7c89385080", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "fastqc": { "branch": "master", - "git_sha": "285a50500f9e02578d90b3ce6382ea3c30216acd", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/bedtointervallist": { "branch": "master", - "git_sha": "d3f215802f696f7993f25c759781d2db91232015", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/collectreadcounts": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/createsequencedictionary": { "branch": "master", - "git_sha": "e6fe277739f5894711405af3e717b2470bd956b5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/denoisereadcounts": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/determinegermlinecontigploidy": { "branch": "master", - "git_sha": "60a7dbae179bcfa24c10294cc9a07423a239c19a", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/filtermutectcalls": { "branch": "master", - "git_sha": "7d814815f638e1483995b24a23f5f23229036bbf", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/germlinecnvcaller": { "branch": "master", - "git_sha": "cf607b7749da0a8f5ca2a1e31233e13e3159e2fe", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/intervallisttools": { "branch": "master", - "git_sha": "afb604624abcc2fc67a43d70a2de369a50d16105", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/mergebamalignment": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/mergevcfs": { "branch": "master", - "git_sha": "194fca815cf594646e638fa5476acbcc296f1850", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/mutect2": { "branch": "master", - "git_sha": "5fd04feb37b58caa6a54d41e38c80066bdf71056", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/postprocessgermlinecnvcalls": { "branch": "master", - "git_sha": "cf607b7749da0a8f5ca2a1e31233e13e3159e2fe", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/printreads": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/revertsam": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/samtofastq": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/selectvariants": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/shiftfasta": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/splitintervals": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "gatk4/variantfiltration": { "branch": "master", - "git_sha": "00409369b2aff69bded4f0a9e7a80e17d933b426", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "genmod/annotate": { "branch": "master", - "git_sha": "1aba459a6f3528bee806403ae47bea304de26603", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "genmod/compound": { "branch": "master", - "git_sha": "1aba459a6f3528bee806403ae47bea304de26603", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "genmod/models": { "branch": "master", - "git_sha": "1aba459a6f3528bee806403ae47bea304de26603", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "genmod/score": { "branch": "master", - "git_sha": "1aba459a6f3528bee806403ae47bea304de26603", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "glnexus": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "haplocheck": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "haplogrep2/classify": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "hmtnote/annotate": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"], "patch": "modules/nf-core/hmtnote/annotate/hmtnote-annotate.diff" }, "manta/germline": { "branch": "master", - "git_sha": "ebc1733b77c702f19fe42076a5edfcbaa0d84f66", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "mosdepth": { "branch": "master", - "git_sha": "69e3eb17fb31b772b18f134d6e8f8b93ee980e65", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "multiqc": { "branch": "master", - "git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "ngsbits/samplegender": { "branch": "master", - "git_sha": "023e119cfa102f319b6dcfd06abecf7f3c2b8df1", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "peddy": { "branch": "master", - "git_sha": "bb8c1e039f2c1d603e8a93665d0386d5c6ac8e5e", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "picard/addorreplacereadgroups": { "branch": "master", - "git_sha": "1943aa60f7490c3d6740e8872e6e69122ccc8087", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "picard/collecthsmetrics": { "branch": "master", - "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "picard/collectmultiplemetrics": { "branch": "master", - "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "picard/collectwgsmetrics": { "branch": "master", - "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "picard/liftovervcf": { "branch": "master", - "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "picard/markduplicates": { "branch": "master", - "git_sha": "1943aa60f7490c3d6740e8872e6e69122ccc8087", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "picard/renamesampleinvcf": { "branch": "master", - "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "picard/sortvcf": { "branch": "master", - "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "qualimap/bamqc": { "branch": "master", - "git_sha": "6b0e4fe14ca1b12e131f64608f0bbaf36fd11451", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "rhocall/annotate": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "rhocall/viz": { "branch": "master", - "git_sha": "1013101da4252623fd7acf19cc581bae91d4f839", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "rtgtools/format": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "rtgtools/vcfeval": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", - "git_sha": "f153f1f10e1083c49935565844cccb7453021682", + "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", "installed_by": ["modules"] }, "samtools/index": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", "installed_by": ["modules"] }, "samtools/merge": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", - "git_sha": "4352dbdb09ec40db71e9b172b97a01dcf5622c26", + "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", "installed_by": ["modules"] }, "samtools/view": { "branch": "master", - "git_sha": "0bd7d2333a88483aa0476acea172e9f5f6dd83bb", + "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", "installed_by": ["modules"] }, "sentieon/bwaindex": { @@ -444,27 +464,27 @@ }, "smncopynumbercaller": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "stranger": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "svdb/merge": { "branch": "master", - "git_sha": "ba3f3df395d2719dcef5c67189042a1dc555c701", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "svdb/query": { "branch": "master", - "git_sha": "2a35cf4643135d51284236bc2835ee8b810c971d", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", - "git_sha": "09d3c8c29b31a2dfd610305b10550f0e1dbcd4a9", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "tabix/bgziptabix": { @@ -474,42 +494,42 @@ }, "tabix/tabix": { "branch": "master", - "git_sha": "9502adb23c0b97ed8e616bbbdfa73b4585aec9a1", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "tiddit/cov": { "branch": "master", - "git_sha": "ae07bd3d3e229ca82bd94531648736d44367a391", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "tiddit/sv": { "branch": "master", - "git_sha": "6af4979ee1a57c986102175d9e1bb7ab834f3ae8", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "ucsc/wigtobigwig": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "untar": { "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "upd": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "vcf2cytosure": { "branch": "master", - "git_sha": "8694793954175ddd3001ddfbc0e36782a674d8a7", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "vcfanno": { "branch": "master", - "git_sha": "b558cd24f8751dcda51f957391f5f9cb83e28586", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] } } diff --git a/modules/nf-core/bcftools/annotate/environment.yml b/modules/nf-core/bcftools/annotate/environment.yml index e0abc8d23..5c00b116a 100644 --- a/modules/nf-core/bcftools/annotate/environment.yml +++ b/modules/nf-core/bcftools/annotate/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_annotate channels: - conda-forge - 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 64e7ec76c..c3b8b1965 100644 --- a/modules/nf-core/bcftools/annotate/main.nf +++ b/modules/nf-core/bcftools/annotate/main.nf @@ -4,14 +4,17 @@ 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) + 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 +30,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,10 +59,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}" : "" + """ ${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 f3aa463bf..5bfccd2bd 100644 --- a/modules/nf-core/bcftools/annotate/meta.yml +++ b/modules/nf-core/bcftools/annotate/meta.yml @@ -13,41 +13,64 @@ tools: documentation: https://samtools.github.io/bcftools/bcftools.html#annotate doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: Query VCF or BCF file, can be either uncompressed or compressed - - index: - type: file - description: Index of the query VCF or BCF file - - annotations: - type: file - description: Bgzip-compressed file with annotations - - annotations_index: - type: file - description: Index of the annotations file - - header_lines: - type: file - description: Contains lines to append to the output VCF header + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: Query VCF or BCF file, can be either uncompressed or compressed + - index: + type: file + description: Index of the query VCF or BCF file + - annotations: + type: file + description: Bgzip-compressed file with annotations + - annotations_index: + type: file + description: Index of the annotations file + - - header_lines: + type: file + description: Contains lines to append to the output VCF header output: - - meta: - type: map - 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}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{vcf,vcf.gz,bcf,bcf.gz}": + type: file + description: Compressed annotated VCF file + pattern: "*{vcf,vcf.gz,bcf,bcf.gz}" + - tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbi": + type: file + description: Alternative VCF file index + pattern: "*.tbi" + - csi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: Default VCF file index + pattern: "*.csi" + - versions: + - versions.yml: + 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 index b8496b33c..79d26779d 100644 --- a/modules/nf-core/bcftools/annotate/tests/bcf.config +++ b/modules/nf-core/bcftools/annotate/tests/bcf.config @@ -1,6 +1,4 @@ process { - withName: 'BCFTOOLS_ANNOTATE' { - ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type u" - ext.prefix = { "${meta.id}_ann" } - } -} \ No newline at end of file + 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 index 9abf9475e..3a5c49331 100644 --- a/modules/nf-core/bcftools/annotate/tests/main.nf.test +++ b/modules/nf-core/bcftools/annotate/tests/main.nf.test @@ -9,20 +9,21 @@ nextflow_process { tag "bcftools" tag "bcftools/annotate" - test("sarscov2 - [vcf, tbi, vcf2, tbi2, []] - vcf_output") { + 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.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true), - [] + 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] = [] """ } } @@ -33,34 +34,161 @@ nextflow_process { { assert snapshot( process.out.vcf.collect { it.collect { it instanceof Map ? it : file(it).name }}, process.out.versions - ).match("vcf") } + ).match() } ) } } + test("sarscov2 - [vcf, [], annotation, annotation_tbi], [] - vcf_output") { - test("sarscov2 - [vcf, [], [], [], header] - bcf_output") { - - config "./bcf.config" + config "./vcf.config" when { process { """ - vcf = Channel.of([ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + 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") { - header = Channel.of( - '##INFO=', - '##INFO=' - ) - .collectFile(name:"headers.vcf", newLine:true) + config "./vcf_gz_index.config" - input[0] = vcf.combine(header) + 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) """ } } @@ -77,7 +205,7 @@ nextflow_process { } - test("sarscov2 - [vcf, tbi, vcf2, tbi2, []] - stub") { + test("sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - stub") { config "./vcf.config" options "-stub" @@ -85,13 +213,103 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test', single_end:false ], // 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.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true), - [] + 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] = [] """ } } @@ -99,10 +317,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match("stub") } + { 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 index 72b068784..bac2224a3 100644 --- a/modules/nf-core/bcftools/annotate/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/annotate/tests/main.nf.test.snap @@ -11,16 +11,16 @@ ] ], [ - "versions.yml:md5,ea2b798edb5c1c0d46938f313a97a901" + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.03.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-05-03T09:21:58.526449656" + "timestamp": "2024-06-12T16:39:33.331888" }, - "vcf": { + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index": { "content": [ [ [ @@ -32,16 +32,301 @@ ] ], [ - "versions.yml:md5,ea2b798edb5c1c0d46938f313a97a901" + + ], + [ + [ + { + "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.03.0" + "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-05-02T16:47:47.127427579" + "timestamp": "2024-08-15T10:09:16.094918834" }, - "stub": { + "sarscov2 - [vcf, tbi, annotation, annotation_tbi], [] - vcf_gz_index - stub": { "content": [ { "0": [ @@ -54,7 +339,31 @@ ] ], "1": [ - "versions.yml:md5,ea2b798edb5c1c0d46938f313a97a901" + + ], + "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": [ [ @@ -66,14 +375,14 @@ ] ], "versions": [ - "versions.yml:md5,ea2b798edb5c1c0d46938f313a97a901" + "versions.yml:md5,ea53f98610d42597cf384ff1fa3eb204" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.03.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-05-02T16:43:43.707474961" + "timestamp": "2024-08-15T10:08:54.366358502" } } \ No newline at end of file diff --git a/modules/nf-core/bcftools/annotate/tests/vcf.config b/modules/nf-core/bcftools/annotate/tests/vcf.config index cb809f614..611868d55 100644 --- a/modules/nf-core/bcftools/annotate/tests/vcf.config +++ b/modules/nf-core/bcftools/annotate/tests/vcf.config @@ -1,6 +1,4 @@ process { - withName: 'BCFTOOLS_ANNOTATE' { - ext.prefix = { "${meta.id}_vcf" } - ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type z" - } + 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 000000000..2fd9a225f --- /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 000000000..512c1dfb0 --- /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 000000000..7feb5ebbe --- /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/concat/environment.yml b/modules/nf-core/bcftools/concat/environment.yml index ff0200dfa..5c00b116a 100644 --- a/modules/nf-core/bcftools/concat/environment.yml +++ b/modules/nf-core/bcftools/concat/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_concat channels: - conda-forge - 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 d64640b32..a94b28d86 100644 --- a/modules/nf-core/bcftools/concat/main.nf +++ b/modules/nf-core/bcftools/concat/main.nf @@ -4,15 +4,17 @@ 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(tbi) output: - tuple val(meta), path("*.gz"), emit: vcf - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.vcf.gz.tbi"), emit: tbi, optional: true + tuple val(meta), path("${prefix}.vcf.gz.csi"), emit: csi, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -20,7 +22,11 @@ process BCFTOOLS_CONCAT { script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" + def tbi_names = tbi.findAll { file -> !(file instanceof List) }.collect { file -> file.name } + def create_input_index = vcfs.collect { vcf -> tbi_names.contains(vcf.name + ".tbi") ? "" : "tabix ${vcf}" }.join("\n ") """ + ${create_input_index} + bcftools concat \\ --output ${prefix}.vcf.gz \\ $args \\ @@ -34,9 +40,16 @@ process BCFTOOLS_CONCAT { """ stub: + def args = task.ext.args ?: '' 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}" : "" """ 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 91cb54d5c..d2565b289 100644 --- a/modules/nf-core/bcftools/concat/meta.yml +++ b/modules/nf-core/bcftools/concat/meta.yml @@ -13,36 +13,68 @@ tools: documentation: http://www.htslib.org/doc/bcftools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcfs: - type: list - description: | - List containing 2 or more vcf files - e.g. [ 'file1.vcf', 'file2.vcf' ] - - tbi: - type: list - description: | - List containing 2 or more index files (optional) - e.g. [ 'file1.tbi', 'file2.tbi' ] + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcfs: + type: list + description: | + List containing 2 or more vcf files + e.g. [ 'file1.vcf', 'file2.vcf' ] + - tbi: + type: list + description: | + List containing 2 or more index files (optional) + e.g. [ 'file1.tbi', 'file2.tbi' ] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - vcf: - type: file - description: VCF concatenated output file - pattern: "*.{vcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + pattern: "*.{vcf.gz}" + - ${prefix}.vcf.gz: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + pattern: "*.{vcf.gz}" + - tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + pattern: "*.tbi" + - ${prefix}.vcf.gz.tbi: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + pattern: "*.tbi" + - csi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + pattern: "*.csi" + - ${prefix}.vcf.gz.csi: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + pattern: "*.csi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" - "@nvnieuwk" diff --git a/modules/nf-core/bcftools/concat/tests/main.nf.test b/modules/nf-core/bcftools/concat/tests/main.nf.test index d5d9f7874..cb4642b29 100644 --- a/modules/nf-core/bcftools/concat/tests/main.nf.test +++ b/modules/nf-core/bcftools/concat/tests/main.nf.test @@ -9,22 +9,23 @@ nextflow_process { tag "bcftools" tag "bcftools/concat" - config "./nextflow.config" - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]") { + test("homo_sapiens - [[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) ] ] """ @@ -40,16 +41,130 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], []]") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index") { + + config "./vcf_gz_index.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) + ] + ] + """ + } + } + + 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("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi") { + + config "./vcf_gz_index_csi.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) + ] + ] + """ + } + } + + 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("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi") { + + config "./vcf_gz_index_tbi.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) + ] + ] + """ + } + } + + 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("homo_sapiens - [[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) ], [] ] @@ -66,21 +181,23 @@ nextflow_process { } - test("sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub") { + test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - stub") { + config "./nextflow.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) ] ] """ @@ -96,4 +213,104 @@ nextflow_process { } -} + test("homo_sapiens - [[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("homo_sapiens - [[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("homo_sapiens - [[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 90d3fc068..09e87cd3e 100644 --- a/modules/nf-core/bcftools/concat/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/concat/tests/main.nf.test.snap @@ -1,5 +1,60 @@ { - "sarscov2 - [[vcf1, vcf2], []]": { + "homo_sapiens - [[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.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-26T11:04:11.178539482" + }, + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]]": { "content": [ { "0": [ @@ -11,7 +66,19 @@ ] ], "1": [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + + ], + "tbi": [ + ], "vcf": [ [ @@ -22,17 +89,134 @@ ] ], "versions": [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-26T11:03:08.765639958" + }, + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-26T11:03:21.607274757" + }, + "homo_sapiens - [[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.03.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-26T11:04:27.332133878" + }, + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-03T13:22:49.766749302" + "timestamp": "2024-09-26T11:03:36.575719606" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]": { + "homo_sapiens - [[vcf1, vcf2], []]": { "content": [ { "0": [ @@ -44,7 +228,19 @@ ] ], "1": [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + + ], + "tbi": [ + ], "vcf": [ [ @@ -55,17 +251,17 @@ ] ], "versions": [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.03.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-03T13:22:41.119912312" + "timestamp": "2024-09-26T11:03:54.069826178" }, - "sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub": { + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - stub": { "content": [ { "0": [ @@ -77,7 +273,19 @@ ] ], "1": [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ], + "csi": [ + + ], + "tbi": [ + ], "vcf": [ [ @@ -88,14 +296,100 @@ ] ], "versions": [ - "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09" + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-26T11:04:02.45346063" + }, + "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a" + ] + ], + [ + + ], + [ + [ + { + "id": "test3" + }, + "test3_vcf.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-26T11:03:44.618596639" + }, + "homo_sapiens - [[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.03.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-03T13:22:59.90466392" + "timestamp": "2024-09-26T11:04:19.745768656" } } \ 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 000000000..7dd696ee2 --- /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 000000000..aebffb6fb --- /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 000000000..b192ae7d1 --- /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/filter/environment.yml b/modules/nf-core/bcftools/filter/environment.yml index b26987572..5c00b116a 100644 --- a/modules/nf-core/bcftools/filter/environment.yml +++ b/modules/nf-core/bcftools/filter/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_filter channels: - conda-forge - 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 cc9a23610..8f92c51a2 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 deb93b13b..8ac594fc2 100644 --- a/modules/nf-core/bcftools/filter/meta.yml +++ b/modules/nf-core/bcftools/filter/meta.yml @@ -12,30 +12,53 @@ tools: documentation: http://www.htslib.org/doc/bcftools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF input file - pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF input file + pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - vcf: - type: file - description: VCF filtered output file - pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.${extension}": + type: file + description: VCF filtered output file + pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" + - tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbi": + type: file + description: Alternative VCF file index + pattern: "*.tbi" + - csi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: Default VCF file index + pattern: "*.csi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/bcftools/filter/tests/main.nf.test b/modules/nf-core/bcftools/filter/tests/main.nf.test index eaf100e83..646f37ada 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 f8e17aa08..3d7605f26 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 000000000..7dd696ee2 --- /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 000000000..aebffb6fb --- /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 000000000..b192ae7d1 --- /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/merge/environment.yml b/modules/nf-core/bcftools/merge/environment.yml index 55de7cd38..5c00b116a 100644 --- a/modules/nf-core/bcftools/merge/environment.yml +++ b/modules/nf-core/bcftools/merge/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_merge channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/merge/main.nf b/modules/nf-core/bcftools/merge/main.nf index b85d3fec6..facb14ea1 100644 --- a/modules/nf-core/bcftools/merge/main.nf +++ b/modules/nf-core/bcftools/merge/main.nf @@ -4,26 +4,28 @@ process BCFTOOLS_MERGE { 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(meta2), path(fasta) tuple val(meta3), path(fai) - path(bed) + tuple val(meta4), path(bed) output: - tuple val(meta), path("*.{bcf,vcf}{,.gz}"), emit: merged_variants + tuple val(meta), path("*.{bcf,vcf}{,.gz}"), emit: vcf + tuple val(meta), path("*.{csi,tbi}") , emit: index, 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 args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def input = (vcfs.collect().size() > 1) ? vcfs.sort{ it.name } : vcfs def regions = bed ? "--regions-file $bed" : "" def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : @@ -37,7 +39,7 @@ process BCFTOOLS_MERGE { $regions \\ --threads $task.cpus \\ --output ${prefix}.${extension} \\ - $vcfs + $input cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -53,8 +55,16 @@ process BCFTOOLS_MERGE { 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/merge/meta.yml b/modules/nf-core/bcftools/merge/meta.yml index 877071401..2cf09a1d4 100644 --- a/modules/nf-core/bcftools/merge/meta.yml +++ b/modules/nf-core/bcftools/merge/meta.yml @@ -12,70 +12,78 @@ tools: documentation: http://www.htslib.org/doc/bcftools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcfs: - type: file - description: | - List containing 2 or more vcf files - e.g. [ 'file1.vcf', 'file2.vcf' ] - - tbis: - type: file - description: | - List containing the tbi index files corresponding to the vcfs input files - e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: "(Optional) The fasta reference file (only necessary for the `--gvcf FILE` parameter)" - pattern: "*.{fasta,fa}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: "(Optional) The fasta reference file index (only necessary for the `--gvcf FILE` parameter)" - pattern: "*.fai" - - bed: - type: file - description: "(Optional) The bed regions to merge on" - pattern: "*.bed" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcfs: + type: file + description: | + List containing 2 or more vcf files + e.g. [ 'file1.vcf', 'file2.vcf' ] + - tbis: + type: file + description: | + List containing the tbi index files corresponding to the vcfs input files + e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: "(Optional) The fasta reference file (only necessary for the `--gvcf + FILE` parameter)" + pattern: "*.{fasta,fa}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: "(Optional) The fasta reference file index (only necessary for + the `--gvcf FILE` parameter)" + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy Map containing bed information + e.g. [ id:'genome' ] + - bed: + type: file + description: "(Optional) The bed regions to merge on" + pattern: "*.bed" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf_gz: - type: file - description: VCF merged output file (bgzipped) => when `--output-type z` is used - pattern: "*.vcf.gz" - vcf: - type: file - description: VCF merged output file => when `--output-type v` is used - pattern: "*.vcf" - - bcf_gz: - type: file - description: BCF merged output file (bgzipped) => when `--output-type b` is used - pattern: "*.bcf.gz" - - bcf: - type: file - description: BCF merged output file => when `--output-type u` is used - pattern: "*.bcf" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{bcf,vcf}{,.gz}": + type: file + description: merged output file + pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - index: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{csi,tbi}": + type: file + description: index of merged output + pattern: "*.{csi,tbi}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/bcftools/merge/tests/bcf.config b/modules/nf-core/bcftools/merge/tests/bcf.config new file mode 100644 index 000000000..4467d07d9 --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/bcf.config @@ -0,0 +1,3 @@ +process { + ext.args = '--output-type u --no-version' +} diff --git a/modules/nf-core/bcftools/merge/tests/bcf_gz.config b/modules/nf-core/bcftools/merge/tests/bcf_gz.config new file mode 100644 index 000000000..280de8db0 --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/bcf_gz.config @@ -0,0 +1,3 @@ +process { + ext.args = '--output-type b --no-version' +} diff --git a/modules/nf-core/bcftools/merge/tests/main.nf.test b/modules/nf-core/bcftools/merge/tests/main.nf.test new file mode 100644 index 000000000..3995fc1a9 --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/main.nf.test @@ -0,0 +1,853 @@ +nextflow_process { + + name "Test Process BCFTOOLS_MERGE" + script "../main.nf" + process "BCFTOOLS_MERGE" + + tag "modules" + tag "modules_nfcore" + tag "bcftools" + tag "bcftools/merge" + + test("sarscov2 - [vcf, tbi], [], [], []") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf output") { + + config "./vcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).md5, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output") { + + config "./vcf_gz.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - bcf output") { + + config "./bcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("bcf") }, + { assert snapshot( + file(process.out.vcf.get(0).get(1)).name, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - bcf.gz output") { + + config "./bcf_gz.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("bcf.gz") }, + { assert snapshot( + file(process.out.vcf.get(0).get(1)).name, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - index") { + + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert process.out.index.get(0).get(1).endsWith("csi") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + file(process.out.index.get(0).get(1)).name, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - csi index") { + + config "./vcf_gz_index_csi.config" + + when { + + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert process.out.index.get(0).get(1).endsWith("csi") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + file(process.out.index.get(0).get(1)).name, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - tbi index") { + + config "./vcf_gz_index_tbi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert process.out.index.get(0).get(1).endsWith("tbi") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + file(process.out.index.get(0).get(1)).name, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], bed") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).md5, + process.out.versions, + ).match() } + ) + } + + } + + test("homo_sapiens - [vcf, tbi], fasta, fai, bed - vcf.gz output") { + + config "./nextflow.gvcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test2.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/gvcf/test2.genome.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ] + input[2] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + ] + input[3] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).vcf.variantsMD5, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - one sample") { + + config "./nextflow.config" + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf") }, + { assert snapshot( + path(process.out.vcf.get(0).get(1)).md5, + process.out.versions, + ).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - stub") { + + options "-stub" + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf output - stub") { + + options "-stub" + config "./vcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - stub") { + + options "-stub" + config "./vcf_gz.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - bcf output - stub") { + + options "-stub" + config "./bcf.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("bcf") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - bcf.gz output - stub") { + + options "-stub" + config "./bcf_gz.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("bcf.gz") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - index - stub") { + + options "-stub" + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert process.out.index.get(0).get(1).endsWith("csi") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - csi index - stub") { + + options "-stub" + config "./vcf_gz_index_csi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert process.out.index.get(0).get(1).endsWith("csi") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - tbi index - stub") { + + options "-stub" + config "./vcf_gz_index_tbi.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert process.out.index.get(0).get(1).endsWith("tbi") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], bed - stub") { + + options "-stub" + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test3.vcf.gz', checkIfExists: true) + ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [[],[]] + input[2] = [[],[]] + input[3] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("homo_sapiens - [vcf, tbi], fasta, fai, bed - vcf.gz output - stub") { + + options "-stub" + config "./nextflow.gvcf.config" + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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/test2.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/gvcf/test2.genome.vcf.gz.tbi', checkIfExists: true), + ] + ] + input[1] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ] + input[2] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + ] + input[3] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf.gz") }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - one sample - stub") { + + options "-stub" + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + 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] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.vcf.get(0).get(1).endsWith("vcf") }, + { assert snapshot(process.out).match() } + ) + } + + } +} diff --git a/modules/nf-core/bcftools/merge/tests/main.nf.test.snap b/modules/nf-core/bcftools/merge/tests/main.nf.test.snap new file mode 100644 index 000000000..b3b625563 --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/main.nf.test.snap @@ -0,0 +1,607 @@ +{ + "sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - tbi index": { + "content": [ + "e0de448dc8e712956a03ce68d79a0b3a", + "test.vcf.gz.tbi", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T12:34:16.977726522" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf output - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:17:34.532910365" + }, + "sarscov2 - [vcf, tbi], [], [], bed": { + "content": [ + "febdcfb851dcfc83d8248520830aef10", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:29:48.630057872" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + [ + { + "id": "test" + }, + "test.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:17:59.983157569" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf output": { + "content": [ + "57bb84274f336465d0a0946b532093b0", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:29:05.528412678" + }, + "sarscov2 - [vcf, tbi], [], [], [] - bcf.gz output - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.bcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T11:58:46.619657457" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - tbi index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + [ + { + "id": "test" + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:18:12.848227353" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T11:23:15.794389239" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - csi index": { + "content": [ + "e0de448dc8e712956a03ce68d79a0b3a", + "test.vcf.gz.csi", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T11:57:16.850641473" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output": { + "content": [ + "e0de448dc8e712956a03ce68d79a0b3a", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T11:56:27.949031071" + }, + "sarscov2 - [vcf, tbi], [], [], bed - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:18:19.273064822" + }, + "sarscov2 - [vcf, tbi], [], [], [] - bcf output": { + "content": [ + "test.bcf", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T11:56:38.567500859" + }, + "sarscov2 - [vcf, tbi], [], [], [] - bcf output - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.bcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:17:47.356328326" + }, + "sarscov2 - [vcf, tbi], [], [], [] - one sample - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T15:13:18.708495878" + }, + "homo_sapiens - [vcf, tbi], fasta, fai, bed - vcf.gz output - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:56:45.706125286" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - index": { + "content": [ + "e0de448dc8e712956a03ce68d79a0b3a", + "test.vcf.gz.csi", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T12:33:43.639646108" + }, + "homo_sapiens - [vcf, tbi], fasta, fai, bed - vcf.gz output": { + "content": [ + "645b7f7f9131bfe350a9ec3cf82c17fe", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:55:44.299812124" + }, + "sarscov2 - [vcf, tbi], [], [], [] - one sample": { + "content": [ + "2a374cf02f0c32cf607646167e7f153b", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T15:37:38.491844702" + }, + "sarscov2 - [vcf, tbi], [], [], [] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:17:28.188178904" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf.gz output - csi index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ], + "index": [ + [ + { + "id": "test" + }, + "test.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-05T13:18:06.430943593" + }, + "sarscov2 - [vcf, tbi], [], [], []": { + "content": [ + "e0de448dc8e712956a03ce68d79a0b3a", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T12:31:03.893007442" + }, + "sarscov2 - [vcf, tbi], [], [], [] - bcf.gz output": { + "content": [ + "test.bcf.gz", + [ + "versions.yml:md5,d2c0a30d9a4cc6df89a464ae82e0c38a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-09-05T11:56:56.416361069" + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/merge/tests/nextflow.config b/modules/nf-core/bcftools/merge/tests/nextflow.config new file mode 100644 index 000000000..c3f0b7159 --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: BCFTOOLS_MERGE { + ext.args = '--force-samples --force-single --no-version' + } +} diff --git a/modules/nf-core/bcftools/merge/tests/nextflow.gvcf.config b/modules/nf-core/bcftools/merge/tests/nextflow.gvcf.config new file mode 100644 index 000000000..8c457b716 --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/nextflow.gvcf.config @@ -0,0 +1,5 @@ +process { + withName: BCFTOOLS_MERGE { + ext.args = { "--force-samples --no-version --output-type z --gvcf $fasta" } + } +} diff --git a/modules/nf-core/bcftools/merge/tests/tags.yml b/modules/nf-core/bcftools/merge/tests/tags.yml new file mode 100644 index 000000000..1464d0c1c --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/tags.yml @@ -0,0 +1,2 @@ +bcftools/merge: + - "modules/nf-core/bcftools/merge/**" diff --git a/modules/nf-core/bcftools/merge/tests/vcf.config b/modules/nf-core/bcftools/merge/tests/vcf.config new file mode 100644 index 000000000..759222e58 --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/vcf.config @@ -0,0 +1,3 @@ +process { + ext.args = '--output-type v --no-version' +} diff --git a/modules/nf-core/bcftools/merge/tests/vcf_gz.config b/modules/nf-core/bcftools/merge/tests/vcf_gz.config new file mode 100644 index 000000000..8b6ad8b4f --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/vcf_gz.config @@ -0,0 +1,3 @@ +process { + ext.args = '--output-type z --no-version' +} diff --git a/modules/nf-core/bcftools/merge/tests/vcf_gz_index.config b/modules/nf-core/bcftools/merge/tests/vcf_gz_index.config new file mode 100644 index 000000000..9f1e9b1d8 --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/vcf_gz_index.config @@ -0,0 +1,3 @@ +process { + ext.args = "--output-type z --write-index --no-version" +} diff --git a/modules/nf-core/bcftools/merge/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/merge/tests/vcf_gz_index_csi.config new file mode 100644 index 000000000..8308ee1ae --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/vcf_gz_index_csi.config @@ -0,0 +1,3 @@ +process { + ext.args = "--output-type z --write-index=csi --no-version" +} diff --git a/modules/nf-core/bcftools/merge/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/merge/tests/vcf_gz_index_tbi.config new file mode 100644 index 000000000..9be4075bc --- /dev/null +++ b/modules/nf-core/bcftools/merge/tests/vcf_gz_index_tbi.config @@ -0,0 +1,3 @@ +process { + 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 fe80e4e7c..5c00b116a 100644 --- a/modules/nf-core/bcftools/norm/environment.yml +++ b/modules/nf-core/bcftools/norm/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_norm channels: - conda-forge - 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 47d3dab1e..bd7a25012 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 1f3e1b626..b6edeb4aa 100644 --- a/modules/nf-core/bcftools/norm/meta.yml +++ b/modules/nf-core/bcftools/norm/meta.yml @@ -13,46 +13,70 @@ tools: documentation: http://www.htslib.org/doc/bcftools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: | - The vcf file to be normalized - e.g. 'file1.vcf' - pattern: "*.{vcf,vcf.gz}" - - tbi: - type: file - description: | - An optional index of the VCF file (for when the VCF is compressed) - pattern: "*.vcf.gz.tbi" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: FASTA reference file - pattern: "*.{fasta,fa}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + The vcf file to be normalized + e.g. 'file1.vcf' + pattern: "*.{vcf,vcf.gz}" + - tbi: + type: file + description: | + An optional index of the VCF file (for when the VCF is compressed) + pattern: "*.vcf.gz.tbi" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: FASTA reference file + pattern: "*.{fasta,fa}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - vcf: - 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}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{vcf,vcf.gz,bcf,bcf.gz}": + 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}" + - tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbi": + type: file + description: Alternative VCF file index + pattern: "*.tbi" + - csi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: Default VCF file index + pattern: "*.csi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" - "@ramprasadn" 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 000000000..dbc415023 --- /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 000000000..3be52116a --- /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 000000000..b79af8681 --- /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 000000000..f36f397c2 --- /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 000000000..510803b40 --- /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 000000000..10bf93e32 --- /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 000000000..b31dd2de2 --- /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 000000000..f6f5e3561 --- /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 000000000..7dd696ee2 --- /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 000000000..aebffb6fb --- /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 000000000..b192ae7d1 --- /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/reheader/environment.yml b/modules/nf-core/bcftools/reheader/environment.yml index aab0dc92e..5c00b116a 100644 --- a/modules/nf-core/bcftools/reheader/environment.yml +++ b/modules/nf-core/bcftools/reheader/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_reheader channels: - conda-forge - 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 825271671..9cf6d0d38 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 690d4eade..47e5344cd 100644 --- a/modules/nf-core/bcftools/reheader/meta.yml +++ b/modules/nf-core/bcftools/reheader/meta.yml @@ -12,47 +12,60 @@ tools: documentation: http://samtools.github.io/bcftools/bcftools.html#reheader doi: 10.1093/gigascience/giab008 licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF/BCF file - pattern: "*.{vcf.gz,vcf,bcf}" - - header: - type: file - description: New header to add to the VCF - pattern: "*.{header.txt}" - - samples: - type: file - description: File containing sample names to update (one sample per line) - pattern: "*.{samples.txt}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Fasta index to update header sequences with - pattern: "*.{fai}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF/BCF file + pattern: "*.{vcf.gz,vcf,bcf}" + - header: + type: file + description: New header to add to the VCF + pattern: "*.{header.txt}" + - samples: + type: file + description: File containing sample names to update (one sample per line) + pattern: "*.{samples.txt}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Fasta index to update header sequences with + pattern: "*.{fai}" output: - - meta: - type: map - 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: VCF with updated header, bgzipped per default - pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{vcf,vcf.gz,bcf,bcf.gz}": + type: file + description: VCF with updated header, bgzipped per default + pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - index: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{csi,tbi}": + type: file + description: Index of VCF with updated header + pattern: "*.{csi,tbi}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" 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 f3200cb39..96c1b7b0e 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 112736a11..87a3654a5 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 000000000..1e050ec74 --- /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 000000000..536e4b423 --- /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 000000000..91a80db77 --- /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/roh/environment.yml b/modules/nf-core/bcftools/roh/environment.yml index 7a9ee9bdf..5c00b116a 100644 --- a/modules/nf-core/bcftools/roh/environment.yml +++ b/modules/nf-core/bcftools/roh/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_roh channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/roh/main.nf b/modules/nf-core/bcftools/roh/main.nf index 8e03e47d5..ac96eef54 100644 --- a/modules/nf-core/bcftools/roh/main.nf +++ b/modules/nf-core/bcftools/roh/main.nf @@ -4,8 +4,8 @@ process BCFTOOLS_ROH { 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/roh/meta.yml b/modules/nf-core/bcftools/roh/meta.yml index ee928a8fa..032148fa4 100644 --- a/modules/nf-core/bcftools/roh/meta.yml +++ b/modules/nf-core/bcftools/roh/meta.yml @@ -1,5 +1,6 @@ name: "bcftools_roh" -description: A program for detecting runs of homo/autozygosity. Only bi-allelic sites are considered. +description: A program for detecting runs of homo/autozygosity. Only bi-allelic sites + are considered. keywords: - roh - biallelic @@ -7,53 +8,65 @@ keywords: - autozygosity tools: - "roh": - description: "A program for detecting runs of homo/autozygosity. Only bi-allelic sites are considered." + description: "A program for detecting runs of homo/autozygosity. Only bi-allelic + sites are considered." homepage: https://www.htslib.org/ documentation: http://www.htslib.org/doc/bcftools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF file - pattern: "*.{vcf,.vcf.gz}" - - af_file: - type: file - description: "Read allele frequencies from a tab-delimited file containing the columns: CHROM\tPOS\tREF,ALT\tAF." - - af_file_tbi: - type: file - description: "tbi index of af_file." - - genetic_map: - type: file - description: "Genetic map in the format required also by IMPUTE2." - - regions_file: - type: file - description: "Regions can be specified either on command line or in a VCF, BED, or tab-delimited file (the default)." - - samples_file: - type: file - description: "File of sample names to include or exclude if prefixed with '^'." - - targets_file: - type: file - description: "Targets can be specified either on command line or in a VCF, BED, or tab-delimited file (the default)." + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file + pattern: "*.{vcf,.vcf.gz}" + - tbi: + type: file + description: TBI file + patthern: "*.tbi" + - - af_file: + type: file + description: "Read allele frequencies from a tab-delimited file containing the + columns: CHROM\tPOS\tREF,ALT\tAF." + - af_file_tbi: + type: file + description: "tbi index of af_file." + - - genetic_map: + type: file + description: "Genetic map in the format required also by IMPUTE2." + - - regions_file: + type: file + description: "Regions can be specified either on command line or in a VCF, BED, + or tab-delimited file (the default)." + - - samples_file: + type: file + description: "File of sample names to include or exclude if prefixed with '^'." + - - targets_file: + type: file + description: "Targets can be specified either on command line or in a VCF, BED, + or tab-delimited file (the default)." output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - roh: - type: file - description: Contains site-specific and/or per-region runs of homo/autozygosity calls. - pattern: "*.{roh}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.roh": + type: file + description: Contains site-specific and/or per-region runs of homo/autozygosity + calls. + pattern: "*.{roh}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/bcftools/roh/tests/main.nf.test b/modules/nf-core/bcftools/roh/tests/main.nf.test new file mode 100644 index 000000000..bb73b80c0 --- /dev/null +++ b/modules/nf-core/bcftools/roh/tests/main.nf.test @@ -0,0 +1,67 @@ + +nextflow_process { + + name "Test Process BCFTOOLS_ROH" + script "../main.nf" + process "BCFTOOLS_ROH" + + tag "modules" + tag "modules_nfcore" + tag "bcftools" + tag "bcftools/roh" + + test("test-bcftools-roh") { + + 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] = [[],[]] + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-bcftools-roh-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), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [[],[]] + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/bcftools/roh/tests/main.nf.test.snap b/modules/nf-core/bcftools/roh/tests/main.nf.test.snap new file mode 100644 index 000000000..3b008a01e --- /dev/null +++ b/modules/nf-core/bcftools/roh/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "test-bcftools-roh": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.roh:md5,853de778be3030754be40e11be0aa557" + ] + ], + "1": [ + "versions.yml:md5,684b9cddcfaf57299e6e245b12b7d710" + ], + "roh": [ + [ + { + "id": "test" + }, + "test.roh:md5,853de778be3030754be40e11be0aa557" + ] + ], + "versions": [ + "versions.yml:md5,684b9cddcfaf57299e6e245b12b7d710" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T14:19:06.961553" + }, + "test-bcftools-roh-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.roh:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,684b9cddcfaf57299e6e245b12b7d710" + ], + "roh": [ + [ + { + "id": "test" + }, + "test.roh:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,684b9cddcfaf57299e6e245b12b7d710" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T14:19:11.161719" + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/sort/environment.yml b/modules/nf-core/bcftools/sort/environment.yml index 89cf911d6..5c00b116a 100644 --- a/modules/nf-core/bcftools/sort/environment.yml +++ b/modules/nf-core/bcftools/sort/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_sort channels: - conda-forge - 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 246148d61..7d4c9b8e9 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}" : "" + """ ${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 84747c6d8..f7a6eff17 100644 --- a/modules/nf-core/bcftools/sort/meta.yml +++ b/modules/nf-core/bcftools/sort/meta.yml @@ -12,30 +12,53 @@ tools: tool_dev_url: https://github.com/samtools/bcftools doi: "10.1093/bioinformatics/btp352" licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: The VCF/BCF file to be sorted - pattern: "*.{vcf.gz,vcf,bcf}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: The VCF/BCF file to be sorted + pattern: "*.{vcf.gz,vcf,bcf}" output: - - meta: - type: map - 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: Sorted VCF file - pattern: "*.{vcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{vcf,vcf.gz,bcf,bcf.gz}": + type: file + description: Sorted VCF file + pattern: "*.{vcf.gz}" + - tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbi": + type: file + description: Alternative VCF file index + pattern: "*.tbi" + - csi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: Default VCF file index + pattern: "*.csi" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" 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 index 8a496dda7..b9bdd76a0 100644 --- a/modules/nf-core/bcftools/sort/tests/main.nf.test +++ b/modules/nf-core/bcftools/sort/tests/main.nf.test @@ -15,7 +15,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] """ } @@ -30,6 +30,96 @@ nextflow_process { } + 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 { @@ -37,7 +127,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] """ } @@ -51,4 +141,82 @@ nextflow_process { } } -} + + 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 index 6200cc42e..f38272cb2 100644 --- a/modules/nf-core/bcftools/sort/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/sort/tests/main.nf.test.snap @@ -1,4 +1,59 @@ { + "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": [ { @@ -11,7 +66,19 @@ ] ], "1": [ - "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168" + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ], + "csi": [ + + ], + "tbi": [ + ], "vcf": [ [ @@ -22,15 +89,187 @@ ] ], "versions": [ - "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168" + "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.03.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-05-02T16:55:21.237927554" + "timestamp": "2024-06-05T12:05:52.405673587" }, "sarscov2 - vcf - stub": { "content": [ @@ -44,7 +283,19 @@ ] ], "1": [ - "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168" + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" + ], + "csi": [ + + ], + "tbi": [ + ], "vcf": [ [ @@ -55,14 +306,45 @@ ] ], "versions": [ - "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168" + "versions.yml:md5,2c9f26ca356ef71199c3a7d1742974cb" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.03.0" + "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-05-03T12:32:50.506309198" + "timestamp": "2024-06-05T12:05:17.217274984" } } \ No newline at end of file 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 000000000..aacd13464 --- /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 000000000..640eb0ba5 --- /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 000000000..589a50c65 --- /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/bcftools/view/environment.yml b/modules/nf-core/bcftools/view/environment.yml index 8937c6dab..5c00b116a 100644 --- a/modules/nf-core/bcftools/view/environment.yml +++ b/modules/nf-core/bcftools/view/environment.yml @@ -1,7 +1,5 @@ -name: bcftools_view channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::bcftools=1.18 + - bioconda::bcftools=1.20 diff --git a/modules/nf-core/bcftools/view/main.nf b/modules/nf-core/bcftools/view/main.nf index 5237adc8c..7fe4303c0 100644 --- a/modules/nf-core/bcftools/view/main.nf +++ b/modules/nf-core/bcftools/view/main.nf @@ -4,8 +4,8 @@ process BCFTOOLS_VIEW { 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(index) @@ -15,6 +15,8 @@ process BCFTOOLS_VIEW { 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: @@ -55,8 +57,16 @@ process BCFTOOLS_VIEW { 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/view/meta.yml b/modules/nf-core/bcftools/view/meta.yml index 6baa34a64..aa7785f12 100644 --- a/modules/nf-core/bcftools/view/meta.yml +++ b/modules/nf-core/bcftools/view/meta.yml @@ -1,5 +1,6 @@ name: bcftools_view -description: View, subset and filter VCF or BCF files by position and filtering expression. Convert between VCF and BCF +description: View, subset and filter VCF or BCF files by position and filtering expression. + Convert between VCF and BCF keywords: - variant calling - view @@ -13,51 +14,74 @@ tools: documentation: http://www.htslib.org/doc/bcftools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:bcftools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: | - The vcf file to be inspected. - e.g. 'file.vcf' - - index: - type: file - description: | - The tab index for the VCF file to be inspected. - e.g. 'file.tbi' - - regions: - type: file - description: | - Optionally, restrict the operation to regions listed in this file. - e.g. 'file.vcf' - - targets: - type: file - description: | - Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files) - e.g. 'file.vcf' - - samples: - type: file - description: | - Optional, file of sample names to be included or excluded. - e.g. 'file.tsv' + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + The vcf file to be inspected. + e.g. 'file.vcf' + - index: + type: file + description: | + The tab index for the VCF file to be inspected. + e.g. 'file.tbi' + - - regions: + type: file + description: | + Optionally, restrict the operation to regions listed in this file. + e.g. 'file.vcf' + - - targets: + type: file + description: | + Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files) + e.g. 'file.vcf' + - - samples: + type: file + description: | + Optional, file of sample names to be included or excluded. + e.g. 'file.tsv' output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - vcf: - type: file - description: VCF normalized output file - pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{vcf,vcf.gz,bcf,bcf.gz}": + type: file + description: VCF normalized output file + pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" + - tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbi": + type: file + description: Alternative VCF file index + pattern: "*.tbi" + - csi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: Default VCF file index + pattern: "*.csi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" maintainers: diff --git a/modules/nf-core/bcftools/view/tests/main.nf.test b/modules/nf-core/bcftools/view/tests/main.nf.test index c285674c5..1e60c50d5 100644 --- a/modules/nf-core/bcftools/view/tests/main.nf.test +++ b/modules/nf-core/bcftools/view/tests/main.nf.test @@ -9,17 +9,17 @@ nextflow_process { tag "bcftools" tag "bcftools/view" - config "./nextflow.config" - test("sarscov2 - [vcf, tbi], [], [], []") { + config "./nextflow.config" + when { process { """ input[0] = [ [ id:'out', single_end:false ], // 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] = [] @@ -40,18 +40,122 @@ nextflow_process { } + test("sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index") { + + config "./vcf_gz_index.config" + + when { + process { + """ + input[0] = [ + [ id:'out', 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) + ] + input[1] = [] + input[2] = [] + input[3] = [] + """ + } + } + + 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, tbi], [], [], [] - vcf_gz_index_csi") { + + config "./vcf_gz_index_csi.config" + + when { + process { + """ + input[0] = [ + [ id:'out', 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) + ] + input[1] = [] + input[2] = [] + input[3] = [] + """ + } + } + + 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, tbi], [], [], [] - vcf_gz_index_tbi") { + + config "./vcf_gz_index_tbi.config" + + when { + process { + """ + input[0] = [ + [ id:'out', 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) + ] + input[1] = [] + input[2] = [] + input[3] = [] + """ + } + } + + 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, tbi], vcf, tsv, []") { + config "./nextflow.config" + when { process { """ input[0] = [ [ id:'out', single_end:false ], // 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] = [] """ } @@ -71,6 +175,7 @@ nextflow_process { test("sarscov2 - [vcf, tbi], [], [], [] - stub") { + config "./nextflow.config" options "-stub" when { @@ -78,8 +183,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // 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] = [] @@ -100,4 +205,94 @@ nextflow_process { } -} + test("sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index - stub") { + + config "./vcf_gz_index.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'out', 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) + ] + input[1] = [] + input[2] = [] + input[3] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index_csi - stub") { + + config "./vcf_gz_index_csi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'out', 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) + ] + input[1] = [] + input[2] = [] + input[3] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.csi[0][1].endsWith(".csi") } + ) + } + + } + + test("sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index_tbi - stub") { + + config "./vcf_gz_index_tbi.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'out', 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) + ] + input[1] = [] + input[2] = [] + input[3] = [] + """ + } + } + + 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/view/tests/main.nf.test.snap b/modules/nf-core/bcftools/view/tests/main.nf.test.snap index b59be9322..fec22e366 100644 --- a/modules/nf-core/bcftools/view/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/view/tests/main.nf.test.snap @@ -1,4 +1,214 @@ { + "sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index_csi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ], + "csi": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:14:38.717458272" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index_tbi": { + "content": [ + [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + + ], + [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.tbi" + ] + ], + [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:13:44.760671384" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ], + "csi": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-04T16:06:21.669668533" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index_tbi - stub": { + "content": [ + { + "0": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ], + "csi": [ + + ], + "tbi": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:14:53.026083914" + }, "sarscov2 - [vcf, tbi], vcf, tsv, []": { "content": [ [ @@ -11,19 +221,60 @@ ] ], [ - "versions.yml:md5,106d119dde844ec7fee1cdd30828bcdc" + "versions.yml:md5,241125d00357804552689c37bbabe1f5" ] ], - "timestamp": "2024-02-05T17:12:20.799849895" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T15:15:14.663512924" }, "sarscov2 - [vcf, tbi], [], [], [] - stub": { "content": [ "out.vcf", [ - "versions.yml:md5,106d119dde844ec7fee1cdd30828bcdc" + "versions.yml:md5,241125d00357804552689c37bbabe1f5" ] ], - "timestamp": "2024-02-05T16:53:34.652746985" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T15:15:19.723448323" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index": { + "content": [ + [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T08:24:36.358469315" }, "sarscov2 - [vcf, tbi], [], [], []": { "content": [ @@ -37,9 +288,46 @@ ] ], [ - "versions.yml:md5,106d119dde844ec7fee1cdd30828bcdc" + "versions.yml:md5,241125d00357804552689c37bbabe1f5" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-31T15:15:09.588867653" + }, + "sarscov2 - [vcf, tbi], [], [], [] - vcf_gz_index_csi": { + "content": [ + [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz:md5,8e722884ffb75155212a3fc053918766" + ] + ], + [ + [ + { + "id": "out", + "single_end": false + }, + "out_vcf.vcf.gz.csi" + ] + ], + [ + + ], + [ + "versions.yml:md5,241125d00357804552689c37bbabe1f5" ] ], - "timestamp": "2024-02-05T17:12:14.247465409" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-05T12:13:33.834986869" } } \ No newline at end of file diff --git a/modules/nf-core/bcftools/view/tests/vcf_gz_index.config b/modules/nf-core/bcftools/view/tests/vcf_gz_index.config new file mode 100644 index 000000000..7dd696ee2 --- /dev/null +++ b/modules/nf-core/bcftools/view/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/view/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/view/tests/vcf_gz_index_csi.config new file mode 100644 index 000000000..aebffb6fb --- /dev/null +++ b/modules/nf-core/bcftools/view/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/view/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/view/tests/vcf_gz_index_tbi.config new file mode 100644 index 000000000..b192ae7d1 --- /dev/null +++ b/modules/nf-core/bcftools/view/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/bwa/index/environment.yml b/modules/nf-core/bwa/index/environment.yml index 126e00344..d8789a209 100644 --- a/modules/nf-core/bwa/index/environment.yml +++ b/modules/nf-core/bwa/index/environment.yml @@ -1,7 +1,5 @@ -name: bwa_index channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::bwa=0.7.18 diff --git a/modules/nf-core/bwa/index/meta.yml b/modules/nf-core/bwa/index/meta.yml index 4c7d30f3a..4884bca2a 100644 --- a/modules/nf-core/bwa/index/meta.yml +++ b/modules/nf-core/bwa/index/meta.yml @@ -11,32 +11,35 @@ tools: BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome. homepage: http://bio-bwa.sourceforge.net/ - documentation: http://www.htslib.org/doc/samtools.html + documentation: https://bio-bwa.sourceforge.net/bwa.shtml arxiv: arXiv:1303.3997 licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input genome fasta file + - - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input genome fasta file output: - - meta: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - index: - type: file - description: BWA genome index files - pattern: "*.{amb,ann,bwt,pac,sa}" + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - bwa: + type: file + description: BWA genome index files + pattern: "*.{amb,ann,bwt,pac,sa}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@maxulysse" diff --git a/modules/nf-core/bwa/mem/environment.yml b/modules/nf-core/bwa/mem/environment.yml index 3aa9f0cca..ef7b966c0 100644 --- a/modules/nf-core/bwa/mem/environment.yml +++ b/modules/nf-core/bwa/mem/environment.yml @@ -1,10 +1,8 @@ -name: bwa_mem channels: - conda-forge - bioconda - - defaults + dependencies: - bwa=0.7.18 - # renovate: datasource=conda depName=bioconda/samtools - - samtools=1.20 - htslib=1.20.0 + - samtools=1.20 diff --git a/modules/nf-core/bwa/mem/meta.yml b/modules/nf-core/bwa/mem/meta.yml index 1532c2615..37467d291 100644 --- a/modules/nf-core/bwa/mem/meta.yml +++ b/modules/nf-core/bwa/mem/meta.yml @@ -14,58 +14,85 @@ tools: BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome. homepage: http://bio-bwa.sourceforge.net/ - documentation: http://www.htslib.org/doc/samtools.html + documentation: https://bio-bwa.sourceforge.net/bwa.shtml arxiv: arXiv:1303.3997 licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - meta2: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" - - fasta: - type: file - description: Reference genome in FASTA format - pattern: "*.{fasta,fa}" - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - - meta2: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" + - - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fasta,fa}" + - - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" output: - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" + - meta: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - "*.bam": + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" - cram: - type: file - description: Output CRAM file containing read alignments - pattern: "*.{cram}" + - meta: + type: file + description: Output CRAM file containing read alignments + pattern: "*.{cram}" + - "*.cram": + type: file + description: Output CRAM file containing read alignments + pattern: "*.{cram}" - csi: - type: file - description: Optional index file for BAM file - pattern: "*.{csi}" + - meta: + type: file + description: Optional index file for BAM file + pattern: "*.{csi}" + - "*.csi": + type: file + description: Optional index file for BAM file + pattern: "*.{csi}" - crai: - type: file - description: Optional index file for CRAM file - pattern: "*.{crai}" + - meta: + type: file + description: Optional index file for CRAM file + pattern: "*.{crai}" + - "*.crai": + type: file + description: Optional index file for CRAM file + pattern: "*.{crai}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@jeremy1805" diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test b/modules/nf-core/bwa/mem/tests/main.nf.test index 463b76f81..5de2c2f45 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test +++ b/modules/nf-core/bwa/mem/tests/main.nf.test @@ -9,21 +9,21 @@ nextflow_process { script "../main.nf" process "BWA_MEM" - test("Single-End") { - - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } + setup { + run("BWA_INDEX") { + script "../../index/main.nf" + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ } } + } + + test("Single-End") { when { process { @@ -49,7 +49,8 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - file(process.out.bam[0][1]).name + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -59,20 +60,6 @@ nextflow_process { test("Single-End Sort") { - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - when { process { """ @@ -97,7 +84,8 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - file(process.out.bam[0][1]).name + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -107,20 +95,6 @@ nextflow_process { test("Paired-End") { - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - when { process { """ @@ -146,7 +120,8 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - file(process.out.bam[0][1]).name + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -156,20 +131,6 @@ nextflow_process { test("Paired-End Sort") { - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - when { process { """ @@ -195,7 +156,8 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - file(process.out.bam[0][1]).name + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -205,20 +167,6 @@ nextflow_process { test("Paired-End - no fasta") { - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - when { process { """ @@ -244,7 +192,8 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - file(process.out.bam[0][1]).name + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -253,20 +202,9 @@ nextflow_process { } test("Single-end - stub") { + options "-stub" - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } + when { process { """ @@ -286,30 +224,15 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - file(process.out.csi[0][1]).name, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } ) } } test("Paired-end - stub") { + options "-stub" - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } + when { process { """ @@ -330,11 +253,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - file(process.out.csi[0][1]).name, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test.snap b/modules/nf-core/bwa/mem/tests/main.nf.test.snap index 038ee7b7a..2079ea224 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwa/mem/tests/main.nf.test.snap @@ -13,13 +13,14 @@ [ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" ], - "test.bam" + "b6d9cb250261a4c125413c5d867d87a7", + "798439cbd7fd81cbcc5078022dc5479d" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-20T08:44:32.953673185" + "timestamp": "2024-08-02T12:22:28.051598" }, "Single-End Sort": { "content": [ @@ -35,13 +36,14 @@ [ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" ], - "test.bam" + "848434ae4b79cfdcb2281c60b33663ce", + "94fcf617f5b994584c4e8d4044e16b4f" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-20T08:44:45.27066093" + "timestamp": "2024-08-02T12:22:39.671154" }, "Paired-End": { "content": [ @@ -57,13 +59,14 @@ [ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" ], - "test.bam" + "5b34d31be84478761f789e3e2e805e31", + "57aeef88ed701a8ebc8e2f0a381b2a6" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-20T08:44:57.706852274" + "timestamp": "2024-08-02T12:22:51.919479" }, "Paired-End Sort": { "content": [ @@ -79,27 +82,91 @@ [ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" ], - "test.bam" + "69003376d9a8952622d8587b39c3eaae", + "af8628d9df18b2d3d4f6fd47ef2bb872" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-20T08:45:10.376505036" + "timestamp": "2024-08-02T12:23:00.833562" }, "Single-end - stub": { "content": [ - "test.bam", - "test.csi", - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + [ + { + "id": "test", + "single_end": true + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": true + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-20T08:46:07.182072398" + "timestamp": "2024-08-02T12:31:29.46282" }, "Paired-End - no fasta": { "content": [ @@ -115,26 +182,90 @@ [ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" ], - "test.bam" + "5b34d31be84478761f789e3e2e805e31", + "57aeef88ed701a8ebc8e2f0a381b2a6" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-20T08:45:53.813076501" + "timestamp": "2024-08-02T12:23:09.942545" }, "Paired-end - stub": { "content": [ - "test.bam", - "test.csi", - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-20T08:46:18.412916364" + "timestamp": "2024-08-02T12:31:37.757037" } } \ No newline at end of file diff --git a/modules/nf-core/bwamem2/index/environment.yml b/modules/nf-core/bwamem2/index/environment.yml index 26b439172..15cee2387 100644 --- a/modules/nf-core/bwamem2/index/environment.yml +++ b/modules/nf-core/bwamem2/index/environment.yml @@ -1,7 +1,5 @@ -name: bwamem2_index channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::bwa-mem2=2.2.1 diff --git a/modules/nf-core/bwamem2/index/meta.yml b/modules/nf-core/bwamem2/index/meta.yml index c14a10925..74f54ef0d 100644 --- a/modules/nf-core/bwamem2/index/meta.yml +++ b/modules/nf-core/bwamem2/index/meta.yml @@ -13,29 +13,32 @@ tools: homepage: https://github.com/bwa-mem2/bwa-mem2 documentation: https://github.com/bwa-mem2/bwa-mem2#usage licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input genome fasta file + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input genome fasta file output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - index: - type: file - description: BWA genome index files - pattern: "*.{0123,amb,ann,bwt.2bit.64,pac}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bwamem2: + type: file + description: BWA genome index files + pattern: "*.{0123,amb,ann,bwt.2bit.64,pac}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@maxulysse" maintainers: diff --git a/modules/nf-core/bwamem2/mem/environment.yml b/modules/nf-core/bwamem2/mem/environment.yml index cbf06d399..7e0b5a347 100644 --- a/modules/nf-core/bwamem2/mem/environment.yml +++ b/modules/nf-core/bwamem2/mem/environment.yml @@ -1,10 +1,8 @@ -name: bwamem2_mem channels: - conda-forge - bioconda - - defaults + dependencies: - bwa-mem2=2.2.1 - # renovate: datasource=conda depName=bioconda/samtools - - samtools=1.19.2 - htslib=1.19.1 + - samtools=1.19.2 diff --git a/modules/nf-core/bwamem2/mem/meta.yml b/modules/nf-core/bwamem2/mem/meta.yml index 931f71294..c6333ca17 100644 --- a/modules/nf-core/bwamem2/mem/meta.yml +++ b/modules/nf-core/bwamem2/mem/meta.yml @@ -17,69 +17,96 @@ tools: documentation: http://www.htslib.org/doc/samtools.html arxiv: arXiv:1303.3997 licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - meta2: - type: map - description: | - Groovy Map containing reference/index information - e.g. [ id:'test' ] - - index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Reference genome in FASTA format - pattern: "*.{fa,fasta,fna}" - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - - meta2: + type: map + description: | + Groovy Map containing reference/index information + e.g. [ id:'test' ] + - index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fa,fasta,fna}" + - - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - sam: - type: file - description: Output SAM file containing read alignments - pattern: "*.{sam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.sam": + type: file + description: Output SAM file containing read alignments + pattern: "*.{sam}" - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" - cram: - type: file - description: Output CRAM file containing read alignments - pattern: "*.{cram}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.cram": + type: file + description: Output CRAM file containing read alignments + pattern: "*.{cram}" - crai: - type: file - description: Index file for CRAM file - pattern: "*.{crai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.crai": + type: file + description: Index file for CRAM file + pattern: "*.{crai}" - csi: - type: file - description: Index file for BAM file - pattern: "*.{csi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: Index file for BAM file + pattern: "*.{csi}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@maxulysse" - "@matthdsm" diff --git a/modules/nf-core/bwamem2/mem/tests/main.nf.test b/modules/nf-core/bwamem2/mem/tests/main.nf.test index 5e67f70b6..9e0ab14ae 100644 --- a/modules/nf-core/bwamem2/mem/tests/main.nf.test +++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test @@ -10,21 +10,21 @@ nextflow_process { tag "bwamem2/mem" tag "bwamem2/index" - test("sarscov2 - fastq, index, fasta, false") { - - setup { - run("BWAMEM2_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } + setup { + run("BWAMEM2_INDEX") { + script "../../index/main.nf" + process { + """ + input[0] = Channel.of([ + [:], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + ]) + """ } } + } + + test("sarscov2 - fastq, index, fasta, false") { when { process { @@ -44,7 +44,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), process.out.versions ).match() } ) @@ -54,20 +55,6 @@ nextflow_process { test("sarscov2 - fastq, index, fasta, true") { - setup { - run("BWAMEM2_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ @@ -86,7 +73,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), process.out.versions ).match() } ) @@ -96,20 +84,6 @@ nextflow_process { test("sarscov2 - [fastq1, fastq2], index, fasta, false") { - setup { - run("BWAMEM2_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ @@ -131,7 +105,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), process.out.versions ).match() } ) @@ -141,20 +116,6 @@ nextflow_process { test("sarscov2 - [fastq1, fastq2], index, fasta, true") { - setup { - run("BWAMEM2_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ @@ -176,7 +137,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), process.out.versions ).match() } ) @@ -188,20 +150,6 @@ nextflow_process { options "-stub" - setup { - run("BWAMEM2_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ @@ -222,10 +170,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } ) } diff --git a/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap index 9fb1e69d0..69bc3612b 100644 --- a/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap @@ -1,67 +1,129 @@ { "sarscov2 - [fastq1, fastq2], index, fasta, false": { "content": [ - "test.bam", + "eefa0f44493fd0504e734efd2f1f4a9e", + "57aeef88ed701a8ebc8e2f0a381b2a6", [ "versions.yml:md5,1c1a9566f189ec077b5179bbf453c51a" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T13:13:18.890289958" + "timestamp": "2024-08-02T12:23:37.929675" }, "sarscov2 - [fastq1, fastq2], index, fasta, true - stub": { "content": [ - "test.bam", - [ - "versions.yml:md5,1c1a9566f189ec077b5179bbf453c51a" - ] + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + "versions.yml:md5,1c1a9566f189ec077b5179bbf453c51a" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sam": [ + + ], + "versions": [ + "versions.yml:md5,1c1a9566f189ec077b5179bbf453c51a" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T13:45:51.821633029" + "timestamp": "2024-08-02T12:12:06.693567" }, "sarscov2 - [fastq1, fastq2], index, fasta, true": { "content": [ - "test.bam", + "7aba324f82d5b4e926a5dd7b46029cb4", + "af8628d9df18b2d3d4f6fd47ef2bb872", [ "versions.yml:md5,1c1a9566f189ec077b5179bbf453c51a" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T13:13:36.458291078" + "timestamp": "2024-08-02T12:23:53.488374" }, "sarscov2 - fastq, index, fasta, false": { "content": [ - "test.bam", + "bc02b41697b3a8f1021b02becec24052", + "798439cbd7fd81cbcc5078022dc5479d", [ "versions.yml:md5,1c1a9566f189ec077b5179bbf453c51a" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T13:12:44.084654507" + "timestamp": "2024-08-02T12:23:05.644682" }, "sarscov2 - fastq, index, fasta, true": { "content": [ - "test.bam", + "e41d67320815d29ba5f6e9d1ae21902a", + "94fcf617f5b994584c4e8d4044e16b4f", [ "versions.yml:md5,1c1a9566f189ec077b5179bbf453c51a" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T13:13:01.763341681" + "timestamp": "2024-08-02T12:23:21.837763" } } \ No newline at end of file diff --git a/modules/nf-core/bwameme/index/environment.yml b/modules/nf-core/bwameme/index/environment.yml index 5d76ea188..f209d62e8 100644 --- a/modules/nf-core/bwameme/index/environment.yml +++ b/modules/nf-core/bwameme/index/environment.yml @@ -1,7 +1,5 @@ -name: "bwameme_index" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::bwa-meme=1.0.6" diff --git a/modules/nf-core/bwameme/index/meta.yml b/modules/nf-core/bwameme/index/meta.yml index 2db1d3a82..e0cb04a63 100644 --- a/modules/nf-core/bwameme/index/meta.yml +++ b/modules/nf-core/bwameme/index/meta.yml @@ -12,32 +12,33 @@ tools: documentation: https://github.com/kaist-ina/BWA-MEME#getting-started doi: "10.1093/bioinformatics/btac137" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - fasta: - type: file - description: Input genome fasta file - + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - fasta: + type: file + description: Input genome fasta file output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - index: - type: file - description: BWA-MEME genome index files - pattern: "*.{0123,amb,ann,pac,pos_packed,suffixarray_uint64,suffixarray_uint64_L0_PARAMETERS,suffixarray_uint64_L1_PARAMETERS,suffixarray_uint64_L2_PARAMETERS}" - + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - bwameme: + type: file + description: BWA-MEME genome index files + pattern: "*.{0123,amb,ann,pac,pos_packed,suffixarray_uint64,suffixarray_uint64_L0_PARAMETERS,suffixarray_uint64_L1_PARAMETERS,suffixarray_uint64_L2_PARAMETERS}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/bwameme/mem/environment.yml b/modules/nf-core/bwameme/mem/environment.yml index 388eedd21..cad794404 100644 --- a/modules/nf-core/bwameme/mem/environment.yml +++ b/modules/nf-core/bwameme/mem/environment.yml @@ -1,10 +1,8 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "bwameme_mem" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::bwa-meme=1.0.6" - "bioconda::mbuffer=20160228" diff --git a/modules/nf-core/bwameme/mem/meta.yml b/modules/nf-core/bwameme/mem/meta.yml index e5d28db25..070aefebf 100644 --- a/modules/nf-core/bwameme/mem/meta.yml +++ b/modules/nf-core/bwameme/mem/meta.yml @@ -18,78 +18,103 @@ tools: documentation: https://github.com/kaist-ina/BWA-MEME#getting-started doi: "10.1093/bioinformatics/btac137" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - meta2: - type: map - description: | - Groovy Map containing reference/index information - e.g. [ id:'test' ] - - index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Reference genome in FASTA format - pattern: "*.{fa,fasta,fna}" - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" - - mbuffer: - type: integer - description: memory for mbuffer in megabytes (default 3072) - - sort_threads: - type: integer - description: number of threads to used during samtools sort (default 2). - + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - - meta2: + type: map + description: | + Groovy Map containing reference/index information + e.g. [ id:'test' ] + - index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fa,fasta,fna}" + - - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" + - - mbuffer: + type: integer + description: memory for mbuffer in megabytes (default 3072) + - - samtools_threads: + type: integer + description: number of threads for samtools (default 2) output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - sam: - type: file - description: Output SAM file containing read alignments - pattern: "*.{sam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.sam": + type: file + description: Output SAM file containing read alignments + pattern: "*.{sam}" - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" - cram: - type: file - description: Output CRAM file containing read alignments - pattern: "*.{cram}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.cram": + type: file + description: Output CRAM file containing read alignments + pattern: "*.{cram}" - crai: - type: file - description: Index file for CRAM file - pattern: "*.{crai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.crai": + type: file + description: Index file for CRAM file + pattern: "*.{crai}" - csi: - type: file - description: Index file for BAM file - pattern: "*.{csi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: Index file for BAM file + pattern: "*.{csi}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/bwameme/mem/tests/main.nf.test b/modules/nf-core/bwameme/mem/tests/main.nf.test index 8175f58a9..6d93fd6eb 100644 --- a/modules/nf-core/bwameme/mem/tests/main.nf.test +++ b/modules/nf-core/bwameme/mem/tests/main.nf.test @@ -11,22 +11,22 @@ nextflow_process { tag "bwameme/index" config "./nextflow.config" - test("sarscov2 - fastq, index, fasta, false, 0, 4") { - - setup { - run("BWAMEME_INDEX") { - script "../../index/main.nf" - config "./nextflow.config" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } + setup { + run("BWAMEME_INDEX") { + script "../../index/main.nf" + config "./nextflow.config" + process { + """ + input[0] = Channel.of([ + [:], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + ]) + """ } } + } + + test("sarscov2 - fastq, index, fasta, false, 0, 4") { when { process { @@ -48,7 +48,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), process.out.versions ).match() } ) @@ -58,21 +59,6 @@ nextflow_process { test("sarscov2 - fastq, index, fasta, true, 2048, 4") { - setup { - run("BWAMEME_INDEX") { - script "../../index/main.nf" - config "./nextflow.config" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ @@ -93,7 +79,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), process.out.versions ).match() } ) @@ -103,21 +90,6 @@ nextflow_process { test("sarscov2 - [fastq1, fastq2], index, fasta, false, 0, 4") { - setup { - run("BWAMEME_INDEX") { - script "../../index/main.nf" - config "./nextflow.config" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ @@ -141,7 +113,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), process.out.versions ).match() } ) @@ -151,21 +124,6 @@ nextflow_process { test("sarscov2 - [fastq1, fastq2], index, fasta, true, 2048, ''") { - setup { - run("BWAMEME_INDEX") { - script "../../index/main.nf" - config "./nextflow.config" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ @@ -189,7 +147,8 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), process.out.versions ).match() } ) @@ -201,21 +160,6 @@ nextflow_process { options "-stub" - setup { - run("BWAMEME_INDEX") { - script "../../index/main.nf" - config "./nextflow.config" - process { - """ - input[0] = Channel.of([ - [:], // meta map - [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - ]) - """ - } - } - } - when { process { """ @@ -238,10 +182,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } ) } diff --git a/modules/nf-core/bwameme/mem/tests/main.nf.test.snap b/modules/nf-core/bwameme/mem/tests/main.nf.test.snap index 552359597..bc845155c 100644 --- a/modules/nf-core/bwameme/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwameme/mem/tests/main.nf.test.snap @@ -1,210 +1,129 @@ { "sarscov2 - [fastq1, fastq2], index, fasta, false, 0, 4": { "content": [ - "test.bam", + "640e6a53bedb535837cc35cc1c145dcb", + "57aeef88ed701a8ebc8e2f0a381b2a6", [ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-20T16:07:51.065498711" - }, - "sarscov2 - [fastq1, fastq2], index, fasta, false": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-15T20:04:31.962017214" - }, - "sarscov2 - [fastq1, fastq2], index, fasta, true, 2048, 4": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-20T16:08:18.378362535" + "timestamp": "2024-08-02T12:25:03.99184" }, "sarscov2 - [fastq1, fastq2], index, fasta, true, 2048, ''": { "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-20T16:25:43.613918051" - }, - "sarscov2 - fastq, index, fasta, false": { - "content": [ - "test.bam", + "7af5d6b93d3f8bd4f53d4f9ace7ee981", + "af8628d9df18b2d3d4f6fd47ef2bb872", [ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-05-15T20:00:05.782384898" - }, - "sarscov2 - [fastq1, fastq2], index, fasta, true, 2048 - stub": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-18T10:17:40.514767321" - }, - "sarscov2 - [fastq1, fastq2], index, fasta, true, 2048": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-18T10:17:31.035368735" + "timestamp": "2024-08-02T12:26:17.237557" }, "sarscov2 - fastq, index, fasta, true, 2048, 4": { "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-20T16:07:24.071789902" - }, - "sarscov2 - [fastq1, fastq2], index, fasta, true - stub": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-15T19:28:46.895668666" - }, - "sarscov2 - [fastq1, fastq2], index, fasta, false, 0": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-18T10:17:08.497131484" - }, - "sarscov2 - fastq, index, fasta, false, 0": { - "content": [ - "test.bam", + "4ccda5ce5d3b09b697786589b3753825", + "94fcf617f5b994584c4e8d4044e16b4f", [ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-18T10:16:23.45126091" - }, - "sarscov2 - [fastq1, fastq2], index, fasta, true": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-15T20:44:56.510177191" - }, - "sarscov2 - fastq, index, fasta, true, 2048": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-18T10:16:46.541148031" - }, - "sarscov2 - fastq, index, fasta, true": { - "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-15T20:44:05.2657749" + "timestamp": "2024-08-02T12:24:07.289865" }, "sarscov2 - fastq, index, fasta, false, 0, 4": { "content": [ - "test.bam", + "a58fa4a997be7d13a3dc62c9c9eb83d2", + "798439cbd7fd81cbcc5078022dc5479d", [ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-20T16:06:58.802149967" + "timestamp": "2024-08-02T12:23:17.201419" }, "sarscov2 - [fastq1, fastq2], index, fasta, true, 2048, 4 - stub": { "content": [ - "test.bam", - [ - "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-20T16:08:28.453969552" + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sam": [ + + ], + "versions": [ + "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-02T12:31:46.777111" } } \ No newline at end of file diff --git a/modules/nf-core/cadd/environment.yml b/modules/nf-core/cadd/environment.yml index 26f170e9d..4477e16e5 100644 --- a/modules/nf-core/cadd/environment.yml +++ b/modules/nf-core/cadd/environment.yml @@ -1,8 +1,6 @@ -name: cadd channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::cadd-scripts=1.6.post1 - conda-forge::conda=4.14.0 diff --git a/modules/nf-core/cadd/meta.yml b/modules/nf-core/cadd/meta.yml index 230ed9c0f..751bea454 100644 --- a/modules/nf-core/cadd/meta.yml +++ b/modules/nf-core/cadd/meta.yml @@ -1,5 +1,6 @@ name: "cadd" -description: CADD is a tool for scoring the deleteriousness of single nucleotide variants as well as insertion/deletions variants in the human genome. +description: CADD is a tool for scoring the deleteriousness of single nucleotide variants + as well as insertion/deletions variants in the human genome. keywords: - cadd - annotate @@ -13,36 +14,39 @@ tools: doi: "10.1093/nar/gky1016" licence: - Restricted. Free for non-commercial users. + identifier: biotools:cadd_phred input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: Input file for annotation in vcf or vcf.gz format - pattern: "*.{vcf,vcf.gz}" - - annotation_dir: - type: file - description: | - Path to folder containing the vcf files with precomputed CADD scores. - This folder contains the uncompressed files that would otherwise be in data/annotation folder as described in https://github.com/kircherlab/CADD-scripts/#manual-installation. - pattern: "*.{vcf,vcf.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Input file for annotation in vcf or vcf.gz format + pattern: "*.{vcf,vcf.gz}" + - - annotation_dir: + type: file + description: | + Path to folder containing the vcf files with precomputed CADD scores. + This folder contains the uncompressed files that would otherwise be in data/annotation folder as described in https://github.com/kircherlab/CADD-scripts/#manual-installation. + pattern: "*.{vcf,vcf.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - tsv: - type: file - description: Annotated tsv file - pattern: "*.{tsv,tsv.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv.gz": + type: file + description: Annotated tsv file + pattern: "*.{tsv,tsv.gz}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml index 17a04ef23..9b01c865a 100644 --- a/modules/nf-core/cat/cat/environment.yml +++ b/modules/nf-core/cat/cat/environment.yml @@ -1,7 +1,5 @@ -name: cat_cat channels: - conda-forge - bioconda - - defaults dependencies: - conda-forge::pigz=2.3.4 diff --git a/modules/nf-core/cat/cat/main.nf b/modules/nf-core/cat/cat/main.nf index adbdbd7ba..2862c64cd 100644 --- a/modules/nf-core/cat/cat/main.nf +++ b/modules/nf-core/cat/cat/main.nf @@ -76,4 +76,3 @@ def getFileSuffix(filename) { def match = filename =~ /^.*?((\.\w{1,5})?(\.\w{1,5}\.gz$))/ return match ? match[0][1] : filename.substring(filename.lastIndexOf('.')) } - diff --git a/modules/nf-core/cat/cat/meta.yml b/modules/nf-core/cat/cat/meta.yml index 00a8db0bc..81778a067 100644 --- a/modules/nf-core/cat/cat/meta.yml +++ b/modules/nf-core/cat/cat/meta.yml @@ -9,25 +9,32 @@ tools: description: Just concatenation documentation: https://man7.org/linux/man-pages/man1/cat.1.html licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - files_in: - type: file - description: List of compressed / uncompressed files - pattern: "*" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - files_in: + type: file + description: List of compressed / uncompressed files + pattern: "*" output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - file_out: - type: file - description: Concatenated file. Will be gzipped if file_out ends with ".gz" - pattern: "${file_out}" + - meta: + type: file + description: Concatenated file. Will be gzipped if file_out ends with ".gz" + pattern: "${file_out}" + - ${prefix}: + type: file + description: Concatenated file. Will be gzipped if file_out ends with ".gz" + pattern: "${file_out}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@erikrikarddaniel" - "@FriederikeHanssen" diff --git a/modules/nf-core/cat/cat/tests/main.nf.test b/modules/nf-core/cat/cat/tests/main.nf.test index fcee2d19f..9cb161788 100644 --- a/modules/nf-core/cat/cat/tests/main.nf.test +++ b/modules/nf-core/cat/cat/tests/main.nf.test @@ -29,7 +29,8 @@ nextflow_process { then { assertAll( { assert !process.success }, - { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") } + { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -83,8 +84,12 @@ nextflow_process { def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_zipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_zipped_zipped_size")} + { assert snapshot( + lines[0..5], + lines.size(), + process.out.versions + ).match() + } ) } } @@ -142,8 +147,12 @@ nextflow_process { def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_unzipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_unzipped_zipped_size")} + { assert snapshot( + lines[0..5], + lines.size(), + process.out.versions + ).match() + } ) } } @@ -170,8 +179,12 @@ nextflow_process { def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_one_file_unzipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_one_file_unzipped_zipped_size")} + { assert snapshot( + lines[0..5], + lines.size(), + process.out.versions + ).match() + } ) } } diff --git a/modules/nf-core/cat/cat/tests/main.nf.test.snap b/modules/nf-core/cat/cat/tests/main.nf.test.snap index 423571ba2..b7623ee65 100644 --- a/modules/nf-core/cat/cat/tests/main.nf.test.snap +++ b/modules/nf-core/cat/cat/tests/main.nf.test.snap @@ -1,10 +1,4 @@ { - "test_cat_unzipped_zipped_size": { - "content": [ - 375 - ], - "timestamp": "2023-10-16T14:33:08.049445686" - }, "test_cat_unzipped_unzipped": { "content": [ { @@ -34,6 +28,10 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, "timestamp": "2023-10-16T14:32:18.500464399" }, "test_cat_zipped_unzipped": { @@ -65,9 +63,13 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, "timestamp": "2023-10-16T14:32:49.642741302" }, - "test_cat_zipped_zipped_lines": { + "test_cat_zipped_zipped": { "content": [ [ "MT192765.1\tGenbank\ttranscript\t259\t29667\t.\t+\t.\tID=unknown_transcript_1;geneID=orf1ab;gene_name=orf1ab", @@ -76,11 +78,31 @@ "MT192765.1\tGenbank\tCDS\t13461\t21548\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1", "MT192765.1\tGenbank\tCDS\t21556\t25377\t.\t+\t0\tParent=unknown_transcript_1;gbkey=CDS;gene=S;note=\"structural protein\";product=\"surface glycoprotein\";protein_id=QIK50427.1", "MT192765.1\tGenbank\tgene\t21556\t25377\t.\t+\t.\tParent=unknown_transcript_1" + ], + 78, + [ + "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:51:46.802978" + }, + "test_cat_name_conflict": { + "content": [ + [ + ] ], - "timestamp": "2023-10-16T14:32:33.629048645" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:51:29.45394" }, - "test_cat_unzipped_zipped_lines": { + "test_cat_one_file_unzipped_zipped": { "content": [ [ ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", @@ -89,11 +111,19 @@ "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" + ], + 374, + [ + "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" ] ], - "timestamp": "2023-10-16T14:33:08.038830506" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:52:02.774016" }, - "test_cat_one_file_unzipped_zipped_lines": { + "test_cat_unzipped_zipped": { "content": [ [ ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", @@ -102,20 +132,16 @@ "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" + ], + 375, + [ + "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" ] ], - "timestamp": "2023-10-16T14:33:21.39642399" - }, - "test_cat_zipped_zipped_size": { - "content": [ - 78 - ], - "timestamp": "2023-10-16T14:32:33.641869244" - }, - "test_cat_one_file_unzipped_zipped_size": { - "content": [ - 374 - ], - "timestamp": "2023-10-16T14:33:21.4094373" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:51:57.581523" } } \ No newline at end of file diff --git a/modules/nf-core/chromograph/environment.yml b/modules/nf-core/chromograph/environment.yml index 4fe69462a..47881b1fb 100644 --- a/modules/nf-core/chromograph/environment.yml +++ b/modules/nf-core/chromograph/environment.yml @@ -1,7 +1,5 @@ -name: chromograph channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::chromograph=1.3.1 diff --git a/modules/nf-core/chromograph/meta.yml b/modules/nf-core/chromograph/meta.yml index 6540d9f07..4a986dbbb 100644 --- a/modules/nf-core/chromograph/meta.yml +++ b/modules/nf-core/chromograph/meta.yml @@ -1,7 +1,7 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "chromograph" -description: Chromograph is a python package to create PNG images from genetics data such as BED and WIG files. +description: Chromograph is a python package to create PNG images from genetics data + such as BED and WIG files. keywords: - chromosome_visualization - bed @@ -9,83 +9,87 @@ keywords: - png tools: - "chromograph": - description: "Chromograph is a python package to create PNG images from genetics data such as BED and WIG files." + description: "Chromograph is a python package to create PNG images from genetics + data such as BED and WIG files." homepage: "https://github.com/Clinical-Genomics/chromograph" documentation: "https://github.com/Clinical-Genomics/chromograph/blob/master/README.md" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta3: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta4: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta5: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta6: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta7: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - autozyg: - type: file - description: Bed file containing the regions of autozygosity - - coverage: - type: file - description: Wig file containing the coverage information - - exome: - type: file - description: Bed file containing the coverage for exome. - - fracsnp: - type: file - description: Wig file containing the fraction of homozygous SNPs - - ideogram: - type: file - description: | - Bed file containing information necessary for ideogram plots. - Format ['chrom', 'start', 'end', 'name', 'gStain'] - - regions: - type: file - description: Bed file containing UPD regions - - sites: - type: file - description: Bed file containing UPD sites + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - autozyg: + type: file + description: Bed file containing the regions of autozygosity + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - coverage: + type: file + description: Wig file containing the coverage information + - - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - exome: + type: file + description: Bed file containing the coverage for exome. + - - meta4: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fracsnp: + type: file + description: Wig file containing the fraction of homozygous SNPs + - - meta5: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ideogram: + type: file + description: | + Bed file containing information necessary for ideogram plots. + Format ['chrom', 'start', 'end', 'name', 'gStain'] + - - meta6: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - regions: + type: file + description: Bed file containing UPD regions + - - meta7: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sites: + type: file + description: Bed file containing UPD sites output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - plots: - type: file - description: Directory containing the plots in png format - pattern: "*.png" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}: + type: file + description: Directory containing the plots in png format + pattern: "*.png" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/chromograph/tests/main.nf.test b/modules/nf-core/chromograph/tests/main.nf.test index caba88296..8643afe3a 100644 --- a/modules/nf-core/chromograph/tests/main.nf.test +++ b/modules/nf-core/chromograph/tests/main.nf.test @@ -20,7 +20,7 @@ nextflow_process { input[5] = [[:],[]] input[6] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['genome']['updsites_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/updsites.bed', checkIfExists: true) ] """ } diff --git a/modules/nf-core/cnvnator/cnvnator/environment.yml b/modules/nf-core/cnvnator/cnvnator/environment.yml index 8b7ecaef9..9cd8ebf35 100644 --- a/modules/nf-core/cnvnator/cnvnator/environment.yml +++ b/modules/nf-core/cnvnator/cnvnator/environment.yml @@ -1,7 +1,5 @@ -name: cnvnator_cnvnator channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::cnvnator=0.4.1 diff --git a/modules/nf-core/cnvnator/cnvnator/meta.yml b/modules/nf-core/cnvnator/cnvnator/meta.yml index 2afbacdea..7ad6b4068 100644 --- a/modules/nf-core/cnvnator/cnvnator/meta.yml +++ b/modules/nf-core/cnvnator/cnvnator/meta.yml @@ -1,5 +1,6 @@ name: "cnvnator_cnvnator" -description: CNVnator is a command line tool for CNV/CNA analysis from depth-of-coverage by mapped reads. +description: CNVnator is a command line tool for CNV/CNA analysis from depth-of-coverage + by mapped reads. keywords: - cnvnator - cnv @@ -10,66 +11,75 @@ tools: homepage: "https://github.com/abyzovlab/CNVnator" documentation: "https://github.com/abyzovlab/CNVnator/blob/master/README.md" tool_dev_url: "https://github.com/abyzovlab/CNVnator" - licence: "['MIT']" + licence: ["MIT"] + identifier: biotools:cnvnator input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. `[ id:'test' ]` - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. `[ id:'test' ]` - - bam: - type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.bam" - - bai: - type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.bam" - - root: - type: file - description: ROOT file - pattern: "*.root" - - fasta: - type: file - description: Path to a directory containing fasta files or a fasta file - pattern: "*.fa" - - fai: - type: file - description: Path to a fasta file index - pattern: "*.fai" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.bam" + - bai: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.bam" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - root: + type: file + description: ROOT file + pattern: "*.root" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. `[ id:'test' ]` + - fasta: + type: file + description: Path to a directory containing fasta files or a fasta file + pattern: "*.fa" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. `[ id:'test' ]` + - fai: + type: file + description: Path to a fasta file index + pattern: "*.fai" output: - - output_meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - root: - type: file - description: A ROOT file - pattern: "*.root" + - output_meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - ${prefix}.root: + type: file + description: A ROOT file + pattern: "*.root" - tab: - type: file - description: A tab file containing cnvnator calls - pattern: "*.tab" + - output_meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - ${prefix}.tab: + type: file + description: A tab file containing cnvnator calls + pattern: "*.tab" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/cnvnator/convert2vcf/environment.yml b/modules/nf-core/cnvnator/convert2vcf/environment.yml index d324fb045..9cd8ebf35 100644 --- a/modules/nf-core/cnvnator/convert2vcf/environment.yml +++ b/modules/nf-core/cnvnator/convert2vcf/environment.yml @@ -1,7 +1,5 @@ -name: cnvnator_convert2vcf channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::cnvnator=0.4.1 diff --git a/modules/nf-core/cnvnator/convert2vcf/meta.yml b/modules/nf-core/cnvnator/convert2vcf/meta.yml index 8e8c80064..3d686c2f1 100644 --- a/modules/nf-core/cnvnator/convert2vcf/meta.yml +++ b/modules/nf-core/cnvnator/convert2vcf/meta.yml @@ -1,5 +1,6 @@ name: "cnvnator_convert2vcf" -description: convert2vcf.pl is command line tool to convert CNVnator calls to vcf format. +description: convert2vcf.pl is command line tool to convert CNVnator calls to vcf + format. keywords: - cnvnator - cnv @@ -10,31 +11,34 @@ tools: homepage: "https://github.com/abyzovlab/CNVnator" documentation: "https://github.com/abyzovlab/CNVnator/blob/master/README.md" tool_dev_url: "https://github.com/abyzovlab/CNVnator" - licence: "['MIT']" + licence: ["MIT"] + identifier: biotools:cnvnator input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - calls: - type: file - description: A tab file containing CNVnator calls - pattern: "*.tab" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - calls: + type: file + description: A tab file containing CNVnator calls + pattern: "*.tab" output: - - meta: - type: map - 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: CNVnator calls in vcf format - pattern: "*.vcf" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*.vcf": + type: file + description: CNVnator calls in vcf format + pattern: "*.vcf" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/deepvariant/callvariants/main.nf b/modules/nf-core/deepvariant/callvariants/main.nf new file mode 100644 index 000000000..668b51ae4 --- /dev/null +++ b/modules/nf-core/deepvariant/callvariants/main.nf @@ -0,0 +1,58 @@ + +process DEEPVARIANT_CALLVARIANTS { + tag "$meta.id" + label 'process_high' + + //Conda is not supported at the moment + container "nf-core/deepvariant:1.6.1" + + input: + tuple val(meta), path(make_examples_tfrecords) + + output: + tuple val(meta), path("${prefix}.call-*-of-*.tfrecord.gz"), emit: call_variants_tfrecords + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + + def matcher = make_examples_tfrecords[0].baseName =~ /^(.+)-\d{5}-of-(\d{5})$/ + if (!matcher.matches()) { + throw new IllegalArgumentException("tfrecord baseName '" + make_examples_tfrecords[0].baseName + "' doesn't match the expected pattern") + } + def examples_tfrecord_name = matcher[0][1] + def shardCount = matcher[0][2] + // Reconstruct the logical name - ${tfrecord_name}.examples.tfrecord@${task.cpus}.gz + def examples_tfrecords_logical_name = "${examples_tfrecord_name}@${shardCount}.gz" + + """ + /opt/deepvariant/bin/call_variants \\ + ${args} \\ + --outfile "${prefix}.call.tfrecord.gz" \\ + --examples "${examples_tfrecords_logical_name}" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant_callvariants: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + echo "" | gzip > ${prefix}.call-00000-of-00001.tfrecord.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant_callvariants: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepvariant/callvariants/meta.yml b/modules/nf-core/deepvariant/callvariants/meta.yml new file mode 100644 index 000000000..4507192ca --- /dev/null +++ b/modules/nf-core/deepvariant/callvariants/meta.yml @@ -0,0 +1,48 @@ +name: deepvariant_callvariants +description: Call variants from the examples produced by make_examples +keywords: + - variant calling + - machine learning + - neural network +tools: + - deepvariant: + description: DeepVariant is an analysis pipeline that uses a deep neural network + to call genetic variants from next-generation DNA sequencing data + homepage: https://github.com/google/deepvariant + documentation: https://github.com/google/deepvariant + tool_dev_url: https://github.com/google/deepvariant + doi: "10.1038/nbt.4235" + licence: ["BSD-3-clause"] + identifier: biotools:deepvariant +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - make_examples_tfrecords: + type: file + description: The actual sharded input files, from DEEPVARIANT_MAKEEXAMPLES process + pattern: "*.gz" +output: + - call_variants_tfrecords: + - meta: + type: list + description: | + Each output contains: unique ID string from input channel, meta, tfrecord file with variant calls. + - ${prefix}.call-*-of-*.tfrecord.gz: + type: list + description: | + Each output contains: unique ID string from input channel, meta, tfrecord file with variant calls. + - versions: + - versions.yml: + type: file + description: File containing software version + pattern: "versions.yml" +authors: + - "@abhi18av" + - "@ramprasadn" + - "@fa2k" +maintainers: + - "@abhi18av" + - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/callvariants/tests/main.nf.test b/modules/nf-core/deepvariant/callvariants/tests/main.nf.test new file mode 100644 index 000000000..72f04b51f --- /dev/null +++ b/modules/nf-core/deepvariant/callvariants/tests/main.nf.test @@ -0,0 +1,85 @@ +nextflow_process { + + name "Test Process DEEPVARIANT_CALLVARIANTS" + script "../main.nf" + config "./nextflow.config" + process "DEEPVARIANT_CALLVARIANTS" + + tag "deepvariant/makeexamples" + tag "deepvariant/callvariants" + tag "deepvariant" + tag "modules" + tag "modules_nfcore" + + test("homo_sapiens - wgs") { + setup { + run("DEEPVARIANT_MAKEEXAMPLES") { + script "../../makeexamples/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + } + when { + process { + """ + input[0] = DEEPVARIANT_MAKEEXAMPLES.out.examples + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.call_variants_tfrecords.get(0).get(0) == [ id:'test', single_end:false ] }, + // The tfrecord binary representation is not stable, but we check the name of the output. + { assert snapshot(file(process.out.call_variants_tfrecords.get(0).get(1)).name).match("homo_sapiens-wgs-call_variants_tfrecords-filenames")}, + { assert snapshot(process.out.versions).match("versions") }, + ) + } + } + + test("homo_sapiens - wgs - stub") { + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta + [] // No input paths are needed in stub mode + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap b/modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap new file mode 100644 index 000000000..8f04ede70 --- /dev/null +++ b/modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap @@ -0,0 +1,59 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,5ff99ffba1e56e4e919d3dfc2d0f3cbb" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-09T16:38:47.927241" + }, + "homo_sapiens-wgs-call_variants_tfrecords-filenames": { + "content": [ + "test.call-00000-of-00001.tfrecord.gz" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T17:04:33.276938" + }, + "homo_sapiens - wgs - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.call-00000-of-00001.tfrecord.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + "versions.yml:md5,5ff99ffba1e56e4e919d3dfc2d0f3cbb" + ], + "call_variants_tfrecords": [ + [ + { + "id": "test", + "single_end": false + }, + "test.call-00000-of-00001.tfrecord.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,5ff99ffba1e56e4e919d3dfc2d0f3cbb" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-13T21:07:17.335788301" + } +} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/callvariants/tests/nextflow.config b/modules/nf-core/deepvariant/callvariants/tests/nextflow.config new file mode 100644 index 000000000..590aa0602 --- /dev/null +++ b/modules/nf-core/deepvariant/callvariants/tests/nextflow.config @@ -0,0 +1,11 @@ +process { + withName: "DEEPVARIANT_CALLVARIANTS" { + ext.args = '--checkpoint "/opt/models/wgs"' + cpus = 2 // Keep CPUs fixed so the number of output files is reproducible + } +} +process { + withName: "DEEPVARIANT_MAKEEXAMPLES" { + ext.args = '--channels "insert_size"' + } +} diff --git a/modules/nf-core/deepvariant/callvariants/tests/tags.yml b/modules/nf-core/deepvariant/callvariants/tests/tags.yml new file mode 100644 index 000000000..02e63f508 --- /dev/null +++ b/modules/nf-core/deepvariant/callvariants/tests/tags.yml @@ -0,0 +1,2 @@ +deepvariant/callvariants: + - modules/nf-core/deepvariant/callvariants/** diff --git a/modules/nf-core/deepvariant/makeexamples/main.nf b/modules/nf-core/deepvariant/makeexamples/main.nf new file mode 100644 index 000000000..022d0bf28 --- /dev/null +++ b/modules/nf-core/deepvariant/makeexamples/main.nf @@ -0,0 +1,66 @@ +process DEEPVARIANT_MAKEEXAMPLES { + tag "$meta.id" + label 'process_high' + + //Conda is not supported at the moment + container "nf-core/deepvariant:1.6.1" + + input: + tuple val(meta), path(input), path(index), path(intervals) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(gzi) + tuple val(meta5), path(par_bed) + + output: + tuple val(meta), path("${prefix}.examples.tfrecord-*-of-*.gz{,.example_info.json}"), emit: examples + tuple val(meta), path("${prefix}.gvcf.tfrecord-*-of-*.gz"), emit: gvcf + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def regions = intervals ? "--regions ${intervals}" : "" + def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : "" + + """ + seq 0 ${task.cpus - 1} | parallel -q --halt 2 --line-buffer /opt/deepvariant/bin/make_examples \\ + --mode calling \\ + --ref "${fasta}" \\ + --reads "${input}" \\ + --examples "./${prefix}.examples.tfrecord@${task.cpus}.gz" \\ + --gvcf "./${prefix}.gvcf.tfrecord@${task.cpus}.gz" \\ + ${regions} \\ + ${par_regions} \\ + ${args} \\ + --task {} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant_makeexamples: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + printf -v SHARD_COUNT "%04d" ${task.cpus} + for i in \$( seq -f "%04g" 0 ${task.cpus-1} ) + do + touch ${prefix}.examples.tfrecord-\$i-of-\$SHARD_COUNT.tfrecord.gz{,.example_info.json} + touch ${prefix}.gvcf.tfrecord-\$i-of-\$SHARD_COUNT.tfrecord.gz + done + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant_makeexamples: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepvariant/makeexamples/meta.yml b/modules/nf-core/deepvariant/makeexamples/meta.yml new file mode 100644 index 000000000..6fb9f1b81 --- /dev/null +++ b/modules/nf-core/deepvariant/makeexamples/meta.yml @@ -0,0 +1,102 @@ +name: deepvariant_makeexamples +description: Transforms the input alignments to a format suitable for the deep neural + network variant caller +keywords: + - variant calling + - machine learning + - neural network +tools: + - deepvariant: + description: DeepVariant is an analysis pipeline that uses a deep neural network + to call genetic variants from next-generation DNA sequencing data + homepage: https://github.com/google/deepvariant + documentation: https://github.com/google/deepvariant + tool_dev_url: https://github.com/google/deepvariant + doi: "10.1038/nbt.4235" + licence: ["BSD-3-clause"] + identifier: biotools:deepvariant +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.bam/cram" + - index: + type: file + description: Index of BAM/CRAM file + pattern: "*.bai/crai" + - intervals: + type: file + description: Interval file for targeted regions + pattern: "*.bed" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - gzi: + type: file + description: GZI index of reference fasta file + - - meta5: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + pattern: "*.gzi" + - par_bed: + type: file + description: BED file containing PAR regions + pattern: "*.bed" +output: + - examples: + - meta: + type: list + description: | + Tuple containing sample metadata and examples that can be used for calling + - ${prefix}.examples.tfrecord-*-of-*.gz{,.example_info.json}: + type: list + description: | + Tuple containing sample metadata and examples that can be used for calling + - gvcf: + - meta: + type: list + description: | + Tuple containing sample metadata and the GVCF data in tfrecord format + - ${prefix}.gvcf.tfrecord-*-of-*.gz: + type: list + description: | + Tuple containing sample metadata and the GVCF data in tfrecord format + - versions: + - versions.yml: + type: file + description: File containing the DeepVariant software version + pattern: "versions.yml" +authors: + - "@abhi18av" + - "@ramprasadn" + - "@fa2k" +maintainers: + - "@abhi18av" + - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test b/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test new file mode 100644 index 000000000..d46dbe6d5 --- /dev/null +++ b/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test @@ -0,0 +1,228 @@ +nextflow_process { + + name "Test Process DEEPVARIANT_MAKEEXAMPLES" + script "../main.nf" + config "./nextflow.config" + process "DEEPVARIANT_MAKEEXAMPLES" + + tag "deepvariant/makeexamples" + tag "deepvariant" + tag "modules" + tag "modules_nfcore" + + test("homo_sapiens - [bam, bai] - fasta - fai") { + 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.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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + // Test string values and versions. The tfrecords contents are not stable, but we check the names. + { assert process.out.examples.get(0).get(0) == [ id:'test', single_end:false ] }, + { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, + { assert process.out.examples.get(0).get(1).size() == 4 }, + { assert snapshot( // Check examples (tfrecord / json) file name list + file(process.out.examples.get(0).get(1).get(0)).name, + file(process.out.examples.get(0).get(1).get(1)).name, + file(process.out.examples.get(0).get(1).get(2)).name, + file(process.out.examples.get(0).get(1).get(3)).name, + ).match("test1-exaamples-filenames")}, + + { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, + { assert process.out.gvcf.get(0).get(1).size() == 2 }, + { assert snapshot( // Check gvcf file name list + file(process.out.gvcf.get(0).get(1).get(0)).name, + file(process.out.gvcf.get(0).get(1).get(1)).name, + ).match("test1-gvcf-filenames")}, + { assert snapshot(process.out.versions).match("test1-versions") }, + ) + } + } + + test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.examples.get(0).get(0) == [ id:'test', single_end:false ] }, + // The test is always run with 2 cpus + { assert process.out.examples.get(0).get(1).size() == 4 }, + { assert snapshot( // Check examples (tfrecord / json) file names + file(process.out.examples.get(0).get(1).get(0)).name, + file(process.out.examples.get(0).get(1).get(1)).name, + file(process.out.examples.get(0).get(1).get(2)).name, + file(process.out.examples.get(0).get(1).get(3)).name, + ).match("test2-examples-filenames")}, + + { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, + { assert process.out.gvcf.get(0).get(1).size() == 2 }, + { assert snapshot( // Check gvcf tfrecord file names + file(process.out.gvcf.get(0).get(1).get(0)).name, + file(process.out.gvcf.get(0).get(1).get(1)).name, + ).match("test2-gvcf-filenames")}, + { assert snapshot(process.out.versions).match("test2-versions") }, + ) + } + } + + test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai") { + 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.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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.fai', checkIfExists: true) + ] + input[3] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true) + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + + { assert process.out.examples.get(0).get(0) == [ id:'test', single_end:false ] }, + // The test is always run with 2 cpus + { assert process.out.examples.get(0).get(1).size() == 4 }, + { assert snapshot( // Check examples (tfrecord / json) file name list + file(process.out.examples.get(0).get(1).get(0)).name, + file(process.out.examples.get(0).get(1).get(1)).name, + file(process.out.examples.get(0).get(1).get(2)).name, + file(process.out.examples.get(0).get(1).get(3)).name, + ).match("test3-examples-filenames")}, + + { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, + { assert process.out.gvcf.get(0).get(1).size() == 2 }, + { assert snapshot( // Check gvcf file name list + file(process.out.gvcf.get(0).get(1).get(0)).name, + file(process.out.gvcf.get(0).get(1).get(1)).name, + ).match("test3-gvcf-filenames")}, + { assert snapshot(process.out.versions).match("test3-versions") }, + ) + } + } + + test("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.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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.examples.get(0).get(1).size() == 4 }, + { assert snapshot( // Check examples (tfrecord / json) file name list + file(process.out.examples.get(0).get(1).get(0)).name, + file(process.out.examples.get(0).get(1).get(1)).name, + file(process.out.examples.get(0).get(1).get(2)).name, + file(process.out.examples.get(0).get(1).get(3)).name, + ).match("test4-examples-filenames")}, + + { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, + { assert process.out.gvcf.get(0).get(1).size() == 2 }, + { assert snapshot( // Check gvcf file name list + file(process.out.gvcf.get(0).get(1).get(0)).name, + file(process.out.gvcf.get(0).get(1).get(1)).name, + ).match("test4-gvcf-filenames")}, + ) + } + } + +} diff --git a/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test.snap b/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test.snap new file mode 100644 index 000000000..24182c54a --- /dev/null +++ b/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test.snap @@ -0,0 +1,134 @@ +{ + "test1-gvcf-filenames": { + "content": [ + "test.gvcf.tfrecord-00000-of-00002.gz", + "test.gvcf.tfrecord-00001-of-00002.gz" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T16:09:47.885995" + }, + "test2-examples-filenames": { + "content": [ + "test.examples.tfrecord-00000-of-00002.gz", + "test.examples.tfrecord-00000-of-00002.gz.example_info.json", + "test.examples.tfrecord-00001-of-00002.gz", + "test.examples.tfrecord-00001-of-00002.gz.example_info.json" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T16:10:02.757227" + }, + "test2-versions": { + "content": [ + [ + "versions.yml:md5,842dca9323f25aa3cfd67789d18e7e33" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-09T16:39:28.960959" + }, + "test4-examples-filenames": { + "content": [ + "test.examples.tfrecord-0000-of-0002.tfrecord.gz", + "test.examples.tfrecord-0000-of-0002.tfrecord.gz.example_info.json", + "test.examples.tfrecord-0001-of-0002.tfrecord.gz", + "test.examples.tfrecord-0001-of-0002.tfrecord.gz.example_info.json" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T16:10:27.41698" + }, + "test1-versions": { + "content": [ + [ + "versions.yml:md5,842dca9323f25aa3cfd67789d18e7e33" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-09T16:39:13.57526" + }, + "test3-examples-filenames": { + "content": [ + "test.examples.tfrecord-00000-of-00002.gz", + "test.examples.tfrecord-00000-of-00002.gz.example_info.json", + "test.examples.tfrecord-00001-of-00002.gz", + "test.examples.tfrecord-00001-of-00002.gz.example_info.json" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T16:10:17.705948" + }, + "test2-gvcf-filenames": { + "content": [ + "test.gvcf.tfrecord-00000-of-00002.gz", + "test.gvcf.tfrecord-00001-of-00002.gz" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T16:10:02.765863" + }, + "test4-gvcf-filenames": { + "content": [ + "test.gvcf.tfrecord-0000-of-0002.tfrecord.gz", + "test.gvcf.tfrecord-0001-of-0002.tfrecord.gz" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T16:10:27.423442" + }, + "test3-versions": { + "content": [ + [ + "versions.yml:md5,842dca9323f25aa3cfd67789d18e7e33" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-09T16:39:44.83616" + }, + "test1-exaamples-filenames": { + "content": [ + "test.examples.tfrecord-00000-of-00002.gz", + "test.examples.tfrecord-00000-of-00002.gz.example_info.json", + "test.examples.tfrecord-00001-of-00002.gz", + "test.examples.tfrecord-00001-of-00002.gz.example_info.json" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T16:09:47.874585" + }, + "test3-gvcf-filenames": { + "content": [ + "test.gvcf.tfrecord-00000-of-00002.gz", + "test.gvcf.tfrecord-00001-of-00002.gz" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T16:10:17.714443" + } +} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/makeexamples/tests/nextflow.config b/modules/nf-core/deepvariant/makeexamples/tests/nextflow.config new file mode 100644 index 000000000..5f071fcb3 --- /dev/null +++ b/modules/nf-core/deepvariant/makeexamples/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: "DEEPVARIANT_MAKEEXAMPLES" { + ext.args = '--channels "insert_size"' + cpus = 2 // The number of output files is determined by cpus - keep it the same for tests + } +} diff --git a/modules/nf-core/deepvariant/makeexamples/tests/tags.yml b/modules/nf-core/deepvariant/makeexamples/tests/tags.yml new file mode 100644 index 000000000..6a13da095 --- /dev/null +++ b/modules/nf-core/deepvariant/makeexamples/tests/tags.yml @@ -0,0 +1,2 @@ +deepvariant/makeexamples: + - modules/nf-core/deepvariant/makeexamples/** diff --git a/modules/nf-core/deepvariant/postprocessvariants/main.nf b/modules/nf-core/deepvariant/postprocessvariants/main.nf new file mode 100644 index 000000000..90e8563de --- /dev/null +++ b/modules/nf-core/deepvariant/postprocessvariants/main.nf @@ -0,0 +1,77 @@ +process DEEPVARIANT_POSTPROCESSVARIANTS { + tag "$meta.id" + label 'process_medium' + + //Conda is not supported at the moment + container "nf-core/deepvariant:1.6.1" + + input: + tuple val(meta), path(variant_calls_tfrecord_files), path(gvcf_tfrecords) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(gzi) + + output: + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi + tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf + tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi + + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + + def variant_calls_tfrecord_name = variant_calls_tfrecord_files[0].name.replaceFirst(/-\d{5}-of-\d{5}/, "") + + def gvcf_matcher = gvcf_tfrecords[0].baseName =~ /^(.+)-\d{5}-of-(\d{5})$/ + if (!gvcf_matcher.matches()) { + throw new IllegalArgumentException("tfrecord baseName '" + gvcf_tfrecords[0].baseName + "' doesn't match the expected pattern") + } + def gvcf_tfrecord_name = gvcf_matcher[0][1] + def gvcf_shardCount = gvcf_matcher[0][2] + // Reconstruct the logical name - ${tfrecord_name}.examples.tfrecord@${task.cpus}.gz + def gvcf_tfrecords_logical_name = "${gvcf_tfrecord_name}@${gvcf_shardCount}.gz" + + """ + /opt/deepvariant/bin/postprocess_variants \\ + ${args} \\ + --ref "${fasta}" \\ + --infile "${variant_calls_tfrecord_name}" \\ + --outfile "${prefix}.vcf.gz" \\ + --nonvariant_site_tfrecord_path "${gvcf_tfrecords_logical_name}" \\ + --gvcf_outfile "${prefix}.g.vcf.gz" \\ + --cpus $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant_postprocessvariants: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ + + stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + prefix = task.ext.prefix ?: "${meta.id}" + """ + echo "" | gzip > ${prefix}.vcf.gz + touch ${prefix}.vcf.gz.tbi + echo "" | gzip > ${prefix}.g.vcf.gz + touch ${prefix}.g.vcf.gz.tbi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant_callvariants: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepvariant/postprocessvariants/meta.yml b/modules/nf-core/deepvariant/postprocessvariants/meta.yml new file mode 100644 index 000000000..132a52632 --- /dev/null +++ b/modules/nf-core/deepvariant/postprocessvariants/meta.yml @@ -0,0 +1,113 @@ +name: deepvariant_postprocessvariants +description: DeepVariant is an analysis pipeline that uses a deep neural network to + call genetic variants from next-generation DNA sequencing data +keywords: + - variant calling + - machine learning + - neural network +tools: + - deepvariant: + description: DeepVariant is an analysis pipeline that uses a deep neural network + to call genetic variants from next-generation DNA sequencing data + homepage: https://github.com/google/deepvariant + documentation: https://github.com/google/deepvariant + tool_dev_url: https://github.com/google/deepvariant + doi: "10.1038/nbt.4235" + licence: ["BSD-3-clause"] + identifier: biotools:deepvariant +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - variant_calls_tfrecord_files: + type: file + description: | + One or more data files containing variant calls from DEEPVARIANT_CALLVARIANTS + pattern: "*.tfrecord.gz" + - gvcf_tfrecords: + type: file + description: | + Sharded tfrecord file from DEEPVARIANT_MAKEEXAMPLES with the coverage information used for GVCF output + pattern: "*.gz" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - gzi: + type: file + description: GZI index of reference fasta file + pattern: "*.gzi" +output: + - vcf: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.vcf.gz: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + - vcf_tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.vcf.gz.tbi: + type: file + description: Index for VCF + pattern: "*.vcf.gz.tbi" + - gvcf: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.g.vcf.gz: + type: file + description: Compressed GVCF file + pattern: "*.g.vcf.gz" + - gvcf_tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.g.vcf.gz.tbi: + type: file + description: Index for GVCF + pattern: "*.g.vcf.gz.tbi" + - versions: + - versions.yml: + type: file + description: File containing software version + pattern: "versions.yml" +authors: + - "@abhi18av" + - "@ramprasadn" + - "@fa2k" +maintainers: + - "@abhi18av" + - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test b/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test new file mode 100644 index 000000000..e4e9b5570 --- /dev/null +++ b/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test @@ -0,0 +1,118 @@ +nextflow_process { + + name "Test Process DEEPVARIANT_POSTPROCESSVARIANTS" + script "../main.nf" + process "DEEPVARIANT_POSTPROCESSVARIANTS" + config "./nextflow.config" + + tag "deepvariant/makeexamples" + tag "deepvariant/callvariants" + tag "deepvariant/postprocessvariants" + tag "deepvariant" + tag "modules" + tag "modules_nfcore" + + test("homo_sapiens - wgs") { + setup { + run("DEEPVARIANT_MAKEEXAMPLES") { + script "../../makeexamples/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + run("DEEPVARIANT_CALLVARIANTS") { + script "../../callvariants/main.nf" + process { + """ + input[0] = DEEPVARIANT_MAKEEXAMPLES.out.examples + """ + } + } + } + when { + process { + """ + input[0] = DEEPVARIANT_CALLVARIANTS.out.call_variants_tfrecords.join( + DEEPVARIANT_MAKEEXAMPLES.out.gvcf, + failOnMismatch: true + ) + input[1] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens - wgs - stub") { + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [], + [], + [], + ] + input[1] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("stub") } + ) + } + } + +} diff --git a/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test.snap b/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test.snap new file mode 100644 index 000000000..5a29c624e --- /dev/null +++ b/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test.snap @@ -0,0 +1,180 @@ +{ + "stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.g.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.g.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,37f0e454a6983de82f7a93eb39849985" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test.g.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.g.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,37f0e454a6983de82f7a93eb39849985" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-09T16:40:38.231189" + }, + "homo_sapiens - wgs": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "4": [ + "versions.yml:md5,b1d5ddb90c4a59a1a3fdace9dcc8445c" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "versions": [ + "versions.yml:md5,b1d5ddb90c4a59a1a3fdace9dcc8445c" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-09T16:46:15.793662" + } +} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/postprocessvariants/tests/nextflow.config b/modules/nf-core/deepvariant/postprocessvariants/tests/nextflow.config new file mode 100644 index 000000000..070b4892f --- /dev/null +++ b/modules/nf-core/deepvariant/postprocessvariants/tests/nextflow.config @@ -0,0 +1,10 @@ +process { + withName: "DEEPVARIANT_CALLVARIANTS" { + ext.args = '--checkpoint "/opt/models/wgs"' + } +} +process { + withName: "DEEPVARIANT_MAKEEXAMPLES" { + ext.args = '--channels "insert_size"' + } +} diff --git a/modules/nf-core/deepvariant/postprocessvariants/tests/tags.yml b/modules/nf-core/deepvariant/postprocessvariants/tests/tags.yml new file mode 100644 index 000000000..d26188cd7 --- /dev/null +++ b/modules/nf-core/deepvariant/postprocessvariants/tests/tags.yml @@ -0,0 +1,2 @@ +deepvariant/postprocessvariants: + - modules/nf-core/deepvariant/postprocessvariants/** diff --git a/modules/nf-core/deepvariant/rundeepvariant/main.nf b/modules/nf-core/deepvariant/rundeepvariant/main.nf new file mode 100644 index 000000000..7f99c53f6 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/main.nf @@ -0,0 +1,78 @@ +process DEEPVARIANT_RUNDEEPVARIANT { + tag "$meta.id" + label 'process_high' + + // FIXME Conda is not supported at the moment + // BUG https://github.com/nf-core/modules/issues/1754 + // BUG https://github.com/bioconda/bioconda-recipes/issues/30310 + container "nf-core/deepvariant:1.6.1" + + input: + tuple val(meta), path(input), path(index), path(intervals) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(gzi) + tuple val(meta5), path(par_bed) + + output: + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi + tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf + tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def regions = intervals ? "--regions=${intervals}" : "" + def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : "" + // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 + // FIXME Revert this on next version bump + def VERSION = '1.6.1' + + """ + /opt/deepvariant/bin/run_deepvariant \\ + --ref=${fasta} \\ + --reads=${input} \\ + --output_vcf=${prefix}.vcf.gz \\ + --output_gvcf=${prefix}.g.vcf.gz \\ + ${args} \\ + ${regions} \\ + ${par_regions} \\ + --intermediate_results_dir=tmp \\ + --num_shards=${task.cpus} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: $VERSION + END_VERSIONS + """ + + stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + prefix = task.ext.prefix ?: "${meta.id}" + // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 + // FIXME Revert this on next version bump + def VERSION = '1.6.1' + """ + touch ${prefix}.vcf.gz + touch ${prefix}.vcf.gz.tbi + touch ${prefix}.g.vcf.gz + touch ${prefix}.g.vcf.gz.tbi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/meta.yml b/modules/nf-core/deepvariant/rundeepvariant/meta.yml new file mode 100644 index 000000000..29b45ff91 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/meta.yml @@ -0,0 +1,122 @@ +name: deepvariant_rundeepvariant +description: DeepVariant is an analysis pipeline that uses a deep neural network to + call genetic variants from next-generation DNA sequencing data +keywords: + - variant calling + - machine learning + - neural network +tools: + - deepvariant: + description: DeepVariant is an analysis pipeline that uses a deep neural network + to call genetic variants from next-generation DNA sequencing data + homepage: https://github.com/google/deepvariant + documentation: https://github.com/google/deepvariant + tool_dev_url: https://github.com/google/deepvariant + doi: "10.1038/nbt.4235" + licence: ["BSD-3-clause"] + identifier: biotools:deepvariant +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.bam/cram" + - index: + type: file + description: Index of BAM/CRAM file + pattern: "*.bai/crai" + - intervals: + type: file + description: file containing intervals + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - gzi: + type: file + description: GZI index of reference fasta file + pattern: "*.gzi" + - - meta5: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - par_bed: + type: file + description: BED file containing PAR regions + pattern: "*.bed" +output: + - vcf: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.vcf.gz: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + - vcf_tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.vcf.gz.tbi: + type: file + description: Tabix index file of compressed VCF + pattern: "*.vcf.gz.tbi" + - gvcf: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.g.vcf.gz: + type: file + description: Compressed GVCF file + pattern: "*.g.vcf.gz" + - gvcf_tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.g.vcf.gz.tbi: + type: file + description: Tabix index file of compressed GVCF + pattern: "*.g.vcf.gz.tbi" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@abhi18av" + - "@ramprasadn" +maintainers: + - "@abhi18av" + - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test new file mode 100644 index 000000000..0790fb813 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test @@ -0,0 +1,166 @@ +nextflow_process { + + name "Test Process DEEPVARIANT_RUNDEEPVARIANT" + script "../main.nf" + process "DEEPVARIANT_RUNDEEPVARIANT" + + tag "deepvariant/rundeepvariant" + tag "deepvariant" + tag "modules" + tag "modules_nfcore" + + test("homo_sapiens - [bam, bai] - fasta - fai") { + when { + config "./nextflow.config" + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai") { + config "./nextflow-intervals.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed") { + config "./nextflow-non-autosomal-calling.config" + tag "test" + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.blacklist_intervals.bed', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai") { + when { + config "./nextflow.config" + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.fai', checkIfExists: true) + ] + input[3] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true) + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap new file mode 100644 index 000000000..1ec351eec --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap @@ -0,0 +1,358 @@ +{ + "homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "4": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "versions": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T11:36:27.325363" + }, + "homo_sapiens - [bam, bai] - fasta - fai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "4": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "versions": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T11:34:41.779153" + }, + "homo_sapiens - [cram, crai, genome_bed] - fasta - fai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "4": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "versions": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T11:35:16.993129" + }, + "homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" + ] + ], + "4": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" + ] + ], + "versions": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T11:35:52.23093" + } +} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config new file mode 100644 index 000000000..78d8d5982 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config @@ -0,0 +1,8 @@ +process { + + withName: DEEPVARIANT_RUNDEEPVARIANT { + ext.args = '--model_type=WGS ' + ext.prefix = { "${meta.id}_out" } + } + +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config new file mode 100644 index 000000000..6d265292a --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config @@ -0,0 +1,8 @@ +process { + + withName: DEEPVARIANT_RUNDEEPVARIANT { + ext.args = '--model_type=WGS --haploid_contigs chr22' + ext.prefix = { "${meta.id}_out" } + } + +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config new file mode 100644 index 000000000..77e355cae --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config @@ -0,0 +1,8 @@ +process { + + withName: DEEPVARIANT_RUNDEEPVARIANT { + ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS ' + ext.prefix = { "${meta.id}_out" } + } + +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml b/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml new file mode 100644 index 000000000..958b8e414 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml @@ -0,0 +1,2 @@ +deepvariant/rundeepvariant: + - modules/nf-core/deepvariant/rundeepvariant/** diff --git a/modules/nf-core/eklipse/environment.yml b/modules/nf-core/eklipse/environment.yml index e33007095..b638fba1d 100644 --- a/modules/nf-core/eklipse/environment.yml +++ b/modules/nf-core/eklipse/environment.yml @@ -1,7 +1,5 @@ -name: eklipse channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::eklipse=1.8 diff --git a/modules/nf-core/eklipse/meta.yml b/modules/nf-core/eklipse/meta.yml index 0f5e88a88..cf3191959 100644 --- a/modules/nf-core/eklipse/meta.yml +++ b/modules/nf-core/eklipse/meta.yml @@ -1,4 +1,3 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "eklipse" description: tool for detection and quantification of large mtDNA rearrangements. @@ -17,42 +16,62 @@ tools: tool_dev_url: "https://github.com/dooguypapua/eKLIPse/tree/master" doi: "10.1038/s41436-018-0350-8" licence: ["GNU General Public v3 or later (GPL v3+)"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: MT BAM/SAM file - pattern: "*.{bam,sam}" - - bai: - type: file - description: MT BAM/SAM index file - pattern: "*.{bai,sai}" - - ref_gb: - type: file - description: mtDNA reference genome in Genbank format, optional if empty NC_012920.1.gb will be used - pattern: "*.{gb}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: MT BAM/SAM file + pattern: "*.{bam,sam}" + - bai: + type: file + description: MT BAM/SAM index file + pattern: "*.{bai,sai}" + - - ref_gb: + type: file + description: mtDNA reference genome in Genbank format, optional if empty NC_012920.1.gb + will be used + pattern: "*.{gb}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - csv: - type: file - description: csv file containing deletions - pattern: "*.{csv}" + - deletions: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*deletions.csv": + type: file + description: csv file with deletion information + pattern: "*deletions.csv" + - genes: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*genes.csv": + type: file + description: csv file with gene information + pattern: "*genes.csv" - circos: - type: file - description: png file with circos plot of mt - pattern: "*.{png}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.png": + type: file + description: png file with circos plot of mt + pattern: "*.{png}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@Lucpen" maintainers: diff --git a/modules/nf-core/eklipse/tests/main.nf.test b/modules/nf-core/eklipse/tests/main.nf.test index 73cf11888..fb0be6d43 100644 --- a/modules/nf-core/eklipse/tests/main.nf.test +++ b/modules/nf-core/eklipse/tests/main.nf.test @@ -14,10 +14,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_illumina_mt_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_illumina_mt_bam_bai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam.bai', checkIfExists: true) ] - input[1] = [ file(params.test_data['homo_sapiens']['genome']['genome_mt_gb'], checkIfExists: true) ] + input[1] = [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.NC_012920_1.gb', checkIfExists: true) ] """ } } diff --git a/modules/nf-core/ensemblvep/filtervep/meta.yml b/modules/nf-core/ensemblvep/filtervep/meta.yml index bde3aa165..a73e3b7a7 100644 --- a/modules/nf-core/ensemblvep/filtervep/meta.yml +++ b/modules/nf-core/ensemblvep/filtervep/meta.yml @@ -13,33 +13,37 @@ tools: homepage: https://www.ensembl.org/info/docs/tools/vep/index.html documentation: https://www.ensembl.org/info/docs/tools/vep/script/index.html licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - input: - type: file - description: VCF/TAB file annotated with vep - pattern: "*.{vcf,tab,tsv,txt}" - - feature_file: - type: file - description: File containing features on separate lines. To be used with --filter option. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - input: + type: file + description: VCF/TAB file annotated with vep + pattern: "*.{vcf,tab,tsv,txt}" + - - feature_file: + type: file + description: File containing features on separate lines. To be used with --filter + option. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - output: - type: file - description: VCF/TAB file - pattern: "*.{vcf,tab,txt,tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*.${extension}": + type: file + description: VCF/TAB file + pattern: "*.{vcf,tab,txt,tsv}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/ensemblvep/vep/meta.yml b/modules/nf-core/ensemblvep/vep/meta.yml index d8ff8d144..9288a9384 100644 --- a/modules/nf-core/ensemblvep/vep/meta.yml +++ b/modules/nf-core/ensemblvep/vep/meta.yml @@ -1,5 +1,6 @@ name: ensemblvep_vep -description: Ensembl Variant Effect Predictor (VEP). The output-file-format is controlled through `task.ext.args`. +description: Ensembl Variant Effect Predictor (VEP). The output-file-format is controlled + through `task.ext.args`. keywords: - annotation - vcf @@ -13,75 +14,96 @@ tools: homepage: https://www.ensembl.org/info/docs/tools/vep/index.html documentation: https://www.ensembl.org/info/docs/tools/vep/script/index.html licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: | - vcf to annotate - - custom_extra_files: - type: file - description: | - extra sample-specific files to be used with the `--custom` flag to be configured with ext.args - (optional) - - genome: - type: string - description: | - which genome to annotate with - - species: - type: string - description: | - which species to annotate with - - cache_version: - type: integer - description: | - which version of the cache to annotate with - - cache: - type: file - description: | - path to VEP cache (optional) - - meta2: - type: map - description: | - Groovy Map containing fasta reference information - e.g. [ id:'test' ] - - fasta: - type: file - description: | - reference FASTA file (optional) - pattern: "*.{fasta,fa}" - - extra_files: - type: file - description: | - path to file(s) needed for plugins (optional) + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - custom_extra_files: + type: file + description: | + extra sample-specific files to be used with the `--custom` flag to be configured with ext.args + (optional) + - - genome: + type: string + description: | + which genome to annotate with + - - species: + type: string + description: | + which species to annotate with + - - cache_version: + type: integer + description: | + which version of the cache to annotate with + - - cache: + type: file + description: | + path to VEP cache (optional) + - - meta2: + type: map + description: | + Groovy Map containing fasta reference information + e.g. [ id:'test' ] + - fasta: + type: file + description: | + reference FASTA file (optional) + pattern: "*.{fasta,fa}" + - - extra_files: + type: file + description: | + path to file(s) needed for plugins (optional) output: - vcf: - type: file - description: | - annotated vcf (optional) - pattern: "*.ann.vcf.gz" + - meta: + type: file + description: | + annotated vcf (optional) + pattern: "*.ann.vcf.gz" + - "*.vcf.gz": + type: file + description: | + annotated vcf (optional) + pattern: "*.ann.vcf.gz" - tab: - type: file - description: | - tab file with annotated variants (optional) - pattern: "*.ann.tab.gz" + - meta: + type: file + description: | + tab file with annotated variants (optional) + pattern: "*.ann.tab.gz" + - "*.tab.gz": + type: file + description: | + tab file with annotated variants (optional) + pattern: "*.ann.tab.gz" - json: - type: file - description: | - json file with annotated variants (optional) - pattern: "*.ann.json.gz" + - meta: + type: file + description: | + json file with annotated variants (optional) + pattern: "*.ann.json.gz" + - "*.json.gz": + type: file + description: | + json file with annotated variants (optional) + pattern: "*.ann.json.gz" - report: - type: file - description: VEP report file - pattern: "*.html" + - "*.html": + type: file + description: VEP report file + pattern: "*.html" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@maxulysse" - "@matthdsm" diff --git a/modules/nf-core/expansionhunter/environment.yml b/modules/nf-core/expansionhunter/environment.yml index 90a3bfff2..07db4374d 100644 --- a/modules/nf-core/expansionhunter/environment.yml +++ b/modules/nf-core/expansionhunter/environment.yml @@ -1,9 +1,6 @@ -name: expansionhunter - channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::expansionhunter=5.0.0 diff --git a/modules/nf-core/expansionhunter/meta.yml b/modules/nf-core/expansionhunter/meta.yml index 698529dcc..4d55fe260 100644 --- a/modules/nf-core/expansionhunter/meta.yml +++ b/modules/nf-core/expansionhunter/meta.yml @@ -14,69 +14,84 @@ tools: documentation: https://github.com/Illumina/ExpansionHunter/blob/master/docs/01_Introduction.md doi: "10.1093/bioinformatics/btz431" licence: ["Apache-2.0"] + identifier: biotools:ExpansionHunter input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram}" - - bai: - type: file - description: Index of BAM/CRAM file - pattern: "*.{bai,crai}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - fasta: - type: file - description: Reference genome - pattern: "*.{fna,fa,fasta}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - fasta_fai: - type: file - description: Reference genome index - pattern: "*.fai" - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - variant_catalog: - type: file - description: JSON file with repeat expansion sites to genotype - pattern: "*.json" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - bai: + type: file + description: Index of BAM/CRAM file + pattern: "*.{bai,crai}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fasta: + type: file + description: Reference genome + pattern: "*.{fna,fa,fasta}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fasta_fai: + type: file + description: Reference genome index + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - variant_catalog: + type: file + description: JSON file with repeat expansion sites to genotype + pattern: "*.json" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', gender:'female' ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - bam: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram}" - vcf: - type: file - description: VCF with repeat expansions - pattern: "*.vcf.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', gender:'female' ] + - "*.vcf.gz": + type: file + description: VCF with repeat expansions + pattern: "*.vcf.gz" - json: - type: file - description: JSON with repeat expansions - pattern: "*.json.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', gender:'female' ] + - "*.json.gz": + type: file + description: JSON with repeat expansions + pattern: "*.json.gz" + - bam: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', gender:'female' ] + - "*_realigned.bam": + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jemten" maintainers: diff --git a/modules/nf-core/expansionhunter/tests/main.nf.test b/modules/nf-core/expansionhunter/tests/main.nf.test index ef15e133e..40c0f2361 100644 --- a/modules/nf-core/expansionhunter/tests/main.nf.test +++ b/modules/nf-core/expansionhunter/tests/main.nf.test @@ -13,12 +13,12 @@ nextflow_process { process { """ input[0] = [ [ 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.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:'fasta'],file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] - input[2] = [[id:'fasta_fai'],file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)] - input[3] = [[id:'catalogue'],file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true)] + input[1] = [[id:'fasta'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] + input[2] = [[id:'fasta_fai'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] + input[3] = [[id:'catalogue'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/loci/repeat_expansions.json', checkIfExists: true)] """ } } @@ -40,12 +40,12 @@ nextflow_process { process { """ input[0] = [ [ 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.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:'fasta'],file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] - input[2] = [[id:'fasta_fai'],file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)] - input[3] = [[id:'catalogue'],file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true)] + input[1] = [[id:'fasta'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] + input[2] = [[id:'fasta_fai'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] + input[3] = [[id:'catalogue'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/loci/repeat_expansions.json', checkIfExists: true)] """ } } diff --git a/modules/nf-core/fastp/environment.yml b/modules/nf-core/fastp/environment.yml index 70389e664..26d4aca5d 100644 --- a/modules/nf-core/fastp/environment.yml +++ b/modules/nf-core/fastp/environment.yml @@ -1,7 +1,5 @@ -name: fastp channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::fastp=0.23.4 diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf index 4fc19b744..e1b9f5656 100644 --- a/modules/nf-core/fastp/main.nf +++ b/modules/nf-core/fastp/main.nf @@ -10,6 +10,7 @@ process FASTP { input: tuple val(meta), path(reads) path adapter_fasta + val discard_trimmed_pass val save_trimmed_fail val save_merged @@ -18,9 +19,9 @@ process FASTP { tuple val(meta), path('*.json') , emit: json tuple val(meta), path('*.html') , emit: html tuple val(meta), path('*.log') , emit: log - path "versions.yml" , emit: versions tuple val(meta), path('*.fail.fastq.gz') , optional:true, emit: reads_fail tuple val(meta), path('*.merged.fastq.gz'), optional:true, emit: reads_merged + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -30,6 +31,8 @@ process FASTP { def prefix = task.ext.prefix ?: "${meta.id}" def adapter_list = adapter_fasta ? "--adapter_fasta ${adapter_fasta}" : "" def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--failed_out ${prefix}.paired.fail.fastq.gz --unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : '' + def out_fq1 = discard_trimmed_pass ?: ( meta.single_end ? "--out1 ${prefix}.fastp.fastq.gz" : "--out1 ${prefix}_1.fastp.fastq.gz" ) + def out_fq2 = discard_trimmed_pass ?: "--out2 ${prefix}_2.fastp.fastq.gz" // Added soft-links to original fastqs for consistent naming in MultiQC // Use single ended for interleaved. Add --interleaved_in in config. if ( task.ext.args?.contains('--interleaved_in') ) { @@ -59,7 +62,7 @@ process FASTP { fastp \\ --in1 ${prefix}.fastq.gz \\ - --out1 ${prefix}.fastp.fastq.gz \\ + $out_fq1 \\ --thread $task.cpus \\ --json ${prefix}.fastp.json \\ --html ${prefix}.fastp.html \\ @@ -81,8 +84,8 @@ process FASTP { fastp \\ --in1 ${prefix}_1.fastq.gz \\ --in2 ${prefix}_2.fastq.gz \\ - --out1 ${prefix}_1.fastp.fastq.gz \\ - --out2 ${prefix}_2.fastp.fastq.gz \\ + $out_fq1 \\ + $out_fq2 \\ --json ${prefix}.fastp.json \\ --html ${prefix}.fastp.html \\ $adapter_list \\ @@ -103,14 +106,16 @@ process FASTP { stub: def prefix = task.ext.prefix ?: "${meta.id}" def is_single_output = task.ext.args?.contains('--interleaved_in') || meta.single_end - def touch_reads = is_single_output ? "${prefix}.fastp.fastq.gz" : "${prefix}_1.fastp.fastq.gz ${prefix}_2.fastp.fastq.gz" - def touch_merged = (!is_single_output && save_merged) ? "touch ${prefix}.merged.fastq.gz" : "" + def touch_reads = (discard_trimmed_pass) ? "" : (is_single_output) ? "echo '' | gzip > ${prefix}.fastp.fastq.gz" : "echo '' | gzip > ${prefix}_1.fastp.fastq.gz ; echo '' | gzip > ${prefix}_2.fastp.fastq.gz" + def touch_merged = (!is_single_output && save_merged) ? "echo '' | gzip > ${prefix}.merged.fastq.gz" : "" + def touch_fail_fastq = (!save_trimmed_fail) ? "" : meta.single_end ? "echo '' | gzip > ${prefix}.fail.fastq.gz" : "echo '' | gzip > ${prefix}.paired.fail.fastq.gz ; echo '' | gzip > ${prefix}_1.fail.fastq.gz ; echo '' | gzip > ${prefix}_2.fail.fastq.gz" """ - touch $touch_reads + $touch_reads + $touch_fail_fastq + $touch_merged touch "${prefix}.fastp.json" touch "${prefix}.fastp.html" touch "${prefix}.fastp.log" - $touch_merged cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/fastp/meta.yml b/modules/nf-core/fastp/meta.yml index c22a16abd..159404d08 100644 --- a/modules/nf-core/fastp/meta.yml +++ b/modules/nf-core/fastp/meta.yml @@ -11,62 +11,100 @@ tools: documentation: https://github.com/OpenGene/fastp doi: 10.1093/bioinformatics/bty560 licence: ["MIT"] + identifier: biotools:fastp input: - - meta: - type: map - description: | - Groovy Map containing sample information. Use 'single_end: true' to specify single ended or interleaved FASTQs. Use 'single_end: false' for paired-end reads. - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. If you wish to run interleaved paired-end data, supply as single-end data - but with `--interleaved_in` in your `modules.conf`'s `ext.args` for the module. - - adapter_fasta: - type: file - description: File in FASTA format containing possible adapters to remove. - pattern: "*.{fasta,fna,fas,fa}" - - save_trimmed_fail: - type: boolean - description: Specify true to save files that failed to pass trimming thresholds ending in `*.fail.fastq.gz` - - save_merged: - type: boolean - description: Specify true to save all merged reads to the a file ending in `*.merged.fastq.gz` + - - meta: + type: map + description: | + Groovy Map containing sample information. Use 'single_end: true' to specify single ended or interleaved FASTQs. Use 'single_end: false' for paired-end reads. + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. If you wish to run interleaved paired-end data, supply as single-end data + but with `--interleaved_in` in your `modules.conf`'s `ext.args` for the module. + - - adapter_fasta: + type: file + description: File in FASTA format containing possible adapters to remove. + pattern: "*.{fasta,fna,fas,fa}" + - - discard_trimmed_pass: + type: boolean + description: Specify true to not write any reads that pass trimming thresholds. + | This can be used to use fastp for the output report only. + - - save_trimmed_fail: + type: boolean + description: Specify true to save files that failed to pass trimming thresholds + ending in `*.fail.fastq.gz` + - - save_merged: + type: boolean + description: Specify true to save all merged reads to a file ending in `*.merged.fastq.gz` output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - reads: - type: file - description: The trimmed/modified/unmerged fastq reads - pattern: "*fastp.fastq.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fastp.fastq.gz": + type: file + description: The trimmed/modified/unmerged fastq reads + pattern: "*fastp.fastq.gz" - json: - type: file - description: Results in JSON format - pattern: "*.json" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.json": + type: file + description: Results in JSON format + pattern: "*.json" - html: - type: file - description: Results in HTML format - pattern: "*.html" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.html": + type: file + description: Results in HTML format + pattern: "*.html" - log: - type: file - description: fastq log file - pattern: "*.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: fastq log file + pattern: "*.log" - reads_fail: - type: file - description: Reads the failed the preprocessing - pattern: "*fail.fastq.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fail.fastq.gz": + type: file + description: Reads the failed the preprocessing + pattern: "*fail.fastq.gz" - reads_merged: - type: file - description: Reads that were successfully merged - pattern: "*.{merged.fastq.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.merged.fastq.gz": + type: file + description: Reads that were successfully merged + pattern: "*.{merged.fastq.gz}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@kevinmenden" diff --git a/modules/nf-core/fastp/tests/main.nf.test b/modules/nf-core/fastp/tests/main.nf.test index 6f1f48978..30dbb8aab 100644 --- a/modules/nf-core/fastp/tests/main.nf.test +++ b/modules/nf-core/fastp/tests/main.nf.test @@ -10,221 +10,290 @@ nextflow_process { test("test_fastp_single_end") { when { - params { - outdir = "$outputDir" - } + process { """ - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - input[0] = Channel.of([ [ id:'test', single_end:true ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = false + input[3] = false + input[4] = false """ } } then { - def html_text = [ "Q20 bases:12.922000 K (92.984097%)", - "single end (151 cycles)" ] - def log_text = [ "Q20 bases: 12922(92.9841%)", - "reads passed filter: 99" ] - def read_lines = ["@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1", - "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT", - "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE - { assert path(process.out.reads.get(0).get(1)).linesGzip.contains(read_line) } - } - }, - { html_text.each { html_part -> - { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) } - } - }, - { assert snapshot(process.out.json).match("test_fastp_single_end_json") }, - { log_text.each { log_part -> - { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) } - } - }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { file(it[1]).getName() } + - process.out.json.collect { file(it[1]).getName() } + - process.out.html.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.reads_fail.collect { file(it[1]).getName() } + - process.out.reads_merged.collect { file(it[1]).getName() } - ).sort() - ).match("test_fastp_single_end-_match") - }, - { assert snapshot(process.out.versions).match("versions_single_end") } + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() } ) } } - test("test_fastp_single_end-stub") { - - options '-stub' + test("test_fastp_paired_end") { when { - params { - outdir = "$outputDir" - } + process { """ adapter_fasta = [] + save_trimmed_pass = true save_trimmed_fail = false save_merged = false input[0] = Channel.of([ - [ id:'test', single_end:true ], - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = false + input[3] = false + input[4] = false """ } } then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() } + ) + } + } + test("fastp test_fastp_interleaved") { + + config './nextflow.interleaved.config' + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] + ]) + input[1] = [] + input[2] = false + input[3] = false + input[4] = false + """ + } + } + + then { assertAll( { assert process.success }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { file(it[1]).getName() } + - process.out.json.collect { file(it[1]).getName() } + - process.out.html.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.reads_fail.collect { file(it[1]).getName() } + - process.out.reads_merged.collect { file(it[1]).getName() } - ).sort() - ).match("test_fastp_single_end-for_stub_match") - }, - { assert snapshot(process.out.versions).match("versions_single_end_stub") } + { assert path(process.out.html.get(0).get(1)).getText().contains("paired end (151 cycles + 151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, + { assert process.out.reads_fail == [] }, + { assert process.out.reads_merged == [] }, + { assert snapshot( + process.out.reads, + process.out.json, + process.out.versions).match() } ) } } - test("test_fastp_paired_end") { + test("test_fastp_single_end_trim_fail") { when { - params { - outdir = "$outputDir" + + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ]) + input[1] = [] + input[2] = false + input[3] = true + input[4] = false + """ } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() } + ) + } + } + + test("test_fastp_paired_end_trim_fail") { + + config './nextflow.save_failed.config' + when { process { """ - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + input[1] = [] + input[2] = false + input[3] = true + input[4] = false + """ + } + } + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, + { assert snapshot( + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.json, + process.out.versions).match() } + ) + } + } + + test("test_fastp_paired_end_merged") { + + when { + process { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = false + input[3] = false + input[4] = true """ } } then { - def html_text = [ "Q20 bases:25.719000 K (93.033098%)", - "The input has little adapter percentage (~0.000000%), probably it's trimmed before."] - def log_text = [ "No adapter detected for read1", - "Q30 bases: 12281(88.3716%)"] - def json_text = ['"passed_filter_reads": 198'] - def read1_lines = ["@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1", - "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT", - "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE - { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) } - } - }, - { read2_lines.each { read2_line -> - { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) } - } - }, - { html_text.each { html_part -> - { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) } - } - }, - { json_text.each { json_part -> - { assert path(process.out.json.get(0).get(1)).getText().contains(json_part) } - } - }, - { log_text.each { log_part -> - { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) } - } - }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { it[1].collect { item -> file(item).getName() } } + - process.out.json.collect { file(it[1]).getName() } + - process.out.html.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.reads_fail.collect { file(it[1]).getName() } + - process.out.reads_merged.collect { file(it[1]).getName() } - ).sort() - ).match("test_fastp_paired_end_match") - }, - { assert snapshot(process.out.versions).match("versions_paired_end") } + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("total reads: 75") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() }, ) } } - test("test_fastp_paired_end-stub") { - - options '-stub' + test("test_fastp_paired_end_merged_adapterlist") { 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/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + ]) + input[1] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) + input[2] = false + input[3] = false + input[4] = true + """ } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("
") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("total bases: 13683") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() } + ) + } + } + + test("test_fastp_single_end_qc_only") { + + when { process { """ - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ]) + input[1] = [] + input[2] = true + input[3] = false + input[4] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads, + process.out.reads_fail, + process.out.reads_fail, + process.out.reads_merged, + process.out.reads_merged, + process.out.versions).match() } + ) + } + } + test("test_fastp_paired_end_qc_only") { + + when { + process { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = true + input[3] = false + input[4] = false """ } } @@ -232,114 +301,99 @@ nextflow_process { then { assertAll( { assert process.success }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { it[1].collect { item -> file(item).getName() } } + - process.out.json.collect { file(it[1]).getName() } + - process.out.html.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.reads_fail.collect { file(it[1]).getName() } + - process.out.reads_merged.collect { file(it[1]).getName() } - ).sort() - ).match("test_fastp_paired_end-for_stub_match") - }, - { assert snapshot(process.out.versions).match("versions_paired_end-stub") } + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads, + process.out.reads_fail, + process.out.reads_fail, + process.out.reads_merged, + process.out.reads_merged, + process.out.versions).match() } ) } } - test("fastp test_fastp_interleaved") { + test("test_fastp_single_end - stub") { + + options "-stub" - config './nextflow.interleaved.config' when { - params { - outdir = "$outputDir" + + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ]) + input[1] = [] + input[2] = false + input[3] = false + input[4] = false + """ } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end - stub") { + + options "-stub" + + when { + process { """ adapter_fasta = [] + save_trimmed_pass = true save_trimmed_fail = false save_merged = false input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = false + input[3] = false + input[4] = false """ } } then { - def html_text = [ "Q20 bases:25.719000 K (93.033098%)", - "paired end (151 cycles + 151 cycles)"] - def log_text = [ "Q20 bases: 12922(92.9841%)", - "reads passed filter: 162"] - def read_lines = [ "@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1", - "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT", - "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE - { assert path(process.out.reads.get(0).get(1)).linesGzip.contains(read_line) } - } - }, - { html_text.each { html_part -> - { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) } - } - }, - { assert snapshot(process.out.json).match("fastp test_fastp_interleaved_json") }, - { log_text.each { log_part -> - { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) } - } - }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { file(it[1]).getName() } + - process.out.json.collect { file(it[1]).getName() } + - process.out.html.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.reads_fail.collect { file(it[1]).getName() } + - process.out.reads_merged.collect { file(it[1]).getName() } - ).sort() - ).match("test_fastp_interleaved-_match") - }, - { assert snapshot(process.out.versions).match("versions_interleaved") } + { assert snapshot(process.out).match() } ) } } - test("fastp test_fastp_interleaved-stub") { + test("fastp - stub test_fastp_interleaved") { - options '-stub' + options "-stub" config './nextflow.interleaved.config' when { - params { - outdir = "$outputDir" - } process { """ - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - input[0] = Channel.of([ [ id:'test', single_end:true ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = false + input[3] = false + input[4] = false """ } } @@ -347,277 +401,112 @@ nextflow_process { then { assertAll( { assert process.success }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { file(it[1]).getName() } + - process.out.json.collect { file(it[1]).getName() } + - process.out.html.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.reads_fail.collect { file(it[1]).getName() } + - process.out.reads_merged.collect { file(it[1]).getName() } - ).sort() - ).match("test_fastp_interleaved-for_stub_match") - }, - { assert snapshot(process.out.versions).match("versions_interleaved-stub") } + { assert snapshot(process.out).match() } ) } } - test("test_fastp_single_end_trim_fail") { + test("test_fastp_single_end_trim_fail - stub") { + + options "-stub" when { - params { - outdir = "$outputDir" - } + process { """ - adapter_fasta = [] - save_trimmed_fail = true - save_merged = false - input[0] = Channel.of([ [ id:'test', single_end:true ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = false + input[3] = true + input[4] = false """ } } then { - def html_text = [ "Q20 bases:12.922000 K (92.984097%)", - "single end (151 cycles)"] - def log_text = [ "Q20 bases: 12922(92.9841%)", - "reads passed filter: 99" ] - def read_lines = [ "@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1", - "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT", - "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE - { assert path(process.out.reads.get(0).get(1)).linesGzip.contains(read_line) } - } - }, - { failed_read_lines.each { failed_read_line -> - { assert path(process.out.reads_fail.get(0).get(1)).linesGzip.contains(failed_read_line) } - } - }, - { html_text.each { html_part -> - { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) } - } - }, - { assert snapshot(process.out.json).match("test_fastp_single_end_trim_fail_json") }, - { log_text.each { log_part -> - { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) } - } - }, - { assert snapshot(process.out.versions).match("versions_single_end_trim_fail") } + { assert snapshot(process.out).match() } ) } } - test("test_fastp_paired_end_trim_fail") { + test("test_fastp_paired_end_trim_fail - stub") { + + options "-stub" config './nextflow.save_failed.config' when { - params { - outdir = "$outputDir" - } process { """ - adapter_fasta = [] - save_trimmed_fail = true - save_merged = false - input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = false + input[3] = true + input[4] = false """ } } then { - def html_text = [ "Q20 bases:25.719000 K (93.033098%)", - "The input has little adapter percentage (~0.000000%), probably it's trimmed before."] - def log_text = [ "No adapter detected for read1", - "Q30 bases: 12281(88.3716%)"] - def json_text = ['"passed_filter_reads": 162'] - def read1_lines = ["@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1", - "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT", - "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE - { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) } - } - }, - { read2_lines.each { read2_line -> - { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) } - } - }, - { failed_read2_lines.each { failed_read2_line -> - { assert path(process.out.reads_fail.get(0).get(1).get(2)).linesGzip.contains(failed_read2_line) } - } - }, - { html_text.each { html_part -> - { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) } - } - }, - { json_text.each { json_part -> - { assert path(process.out.json.get(0).get(1)).getText().contains(json_part) } - } - }, - { log_text.each { log_part -> - { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) } - } - }, - { assert snapshot(process.out.versions).match("versions_paired_end_trim_fail") } + { assert snapshot(process.out).match() } ) } } - test("test_fastp_paired_end_merged") { + test("test_fastp_paired_end_merged - stub") { + + options "-stub" when { - params { - outdir = "$outputDir" - } process { """ - adapter_fasta = [] - save_trimmed_fail = false - save_merged = true input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = false + input[3] = false + input[4] = true """ } } then { - def html_text = [ "
"] - def log_text = [ "Merged and filtered:", - "total reads: 75", - "total bases: 13683"] - def json_text = ['"merged_and_filtered": {', '"total_reads": 75', '"total_bases": 13683'] - def read1_lines = [ "@ERR5069949.1066259 NS500628:121:HK3MMAFX2:1:11312:18369:8333/1", - "CCTTATGACAGCAAGAACTGTGTATGATGATGGTGCTAGGAGAGTGTGGACACTTATGAATGTCTTGACACTCGTTTATAAAGTTTATTATGGTAATGCTTTAGATCAAGCCATTTCCATGTGGGCTCTTATAATCTCTGTTACTTC", - "AAAAAEAEEAEEEEEEEEEEEEEEEEAEEEEAEEEEEEEEAEEEEEEEEEEEEEEEEE/EAEEEEEE/6EEEEEEEEEEAEEAEEE/EE/AEEAEEEEEAEEEA/EEAAEAE - { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) } - } - }, - { read2_lines.each { read2_line -> - { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) } - } - }, - { read_merged_lines.each { read_merged_line -> - { assert path(process.out.reads_merged.get(0).get(1)).linesGzip.contains(read_merged_line) } - } - }, - { html_text.each { html_part -> - { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) } - } - }, - { json_text.each { json_part -> - { assert path(process.out.json.get(0).get(1)).getText().contains(json_part) } - } - }, - { log_text.each { log_part -> - { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) } - } - }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { it[1].collect { item -> file(item).getName() } } + - process.out.json.collect { file(it[1]).getName() } + - process.out.html.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.reads_fail.collect { file(it[1]).getName() } + - process.out.reads_merged.collect { file(it[1]).getName() } - ).sort() - ).match("test_fastp_paired_end_merged_match") - }, - { assert snapshot(process.out.versions).match("versions_paired_end_merged") } + { assert snapshot(process.out).match() } ) } } - test("test_fastp_paired_end_merged-stub") { + test("test_fastp_paired_end_merged_adapterlist - stub") { - options '-stub' + options "-stub" when { - params { - outdir = "$outputDir" - } process { """ - adapter_fasta = [] - save_trimmed_fail = false - save_merged = true - input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) + input[2] = false + input[3] = false + input[4] = true """ } } @@ -625,101 +514,63 @@ nextflow_process { then { assertAll( { assert process.success }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { it[1].collect { item -> file(item).getName() } } + - process.out.json.collect { file(it[1]).getName() } + - process.out.html.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.reads_fail.collect { file(it[1]).getName() } + - process.out.reads_merged.collect { file(it[1]).getName() } - ).sort() - ).match("test_fastp_paired_end_merged-for_stub_match") - }, - { assert snapshot(process.out.versions).match("versions_paired_end_merged_stub") } + { assert snapshot(process.out).match() } ) } } - test("test_fastp_paired_end_merged_adapterlist") { + test("test_fastp_single_end_qc_only - stub") { + + options "-stub" when { - params { - outdir = "$outputDir" - } process { """ - adapter_fasta = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) - save_trimmed_fail = false - save_merged = true + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ]) + input[1] = [] + input[2] = true + input[3] = false + input[4] = false + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end_qc_only - 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/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = adapter_fasta - input[2] = save_trimmed_fail - input[3] = save_merged + input[1] = [] + input[2] = true + input[3] = false + input[4] = false """ } } then { - def html_text = [ "
"] - def log_text = [ "Merged and filtered:", - "total reads: 75", - "total bases: 13683"] - def json_text = ['"merged_and_filtered": {', '"total_reads": 75', '"total_bases": 13683',"--adapter_fasta"] - def read1_lines = ["@ERR5069949.1066259 NS500628:121:HK3MMAFX2:1:11312:18369:8333/1", - "CCTTATGACAGCAAGAACTGTGTATGATGATGGTGCTAGGAGAGTGTGGACACTTATGAATGTCTTGACACTCGTTTATAAAGTTTATTATGGTAATGCTTTAGATCAAGCCATTTCCATGTGGGCTCTTATAATCTCTGTTACTTC", - "AAAAAEAEEAEEEEEEEEEEEEEEEEAEEEEAEEEEEEEEAEEEEEEEEEEEEEEEEE/EAEEEEEE/6EEEEEEEEEEAEEAEEE/EE/AEEAEEEEEAEEEA/EEAAEAE - { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) } - } - }, - { read2_lines.each { read2_line -> - { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) } - } - }, - { read_merged_lines.each { read_merged_line -> - { assert path(process.out.reads_merged.get(0).get(1)).linesGzip.contains(read_merged_line) } - } - }, - { html_text.each { html_part -> - { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) } - } - }, - { json_text.each { json_part -> - { assert path(process.out.json.get(0).get(1)).getText().contains(json_part) } - } - }, - { log_text.each { log_part -> - { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) } - } - }, - { assert snapshot(process.out.versions).match("versions_paired_end_merged_adapterlist") } + { assert snapshot(process.out).match() } ) } } -} +} \ No newline at end of file diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap index 3e8762889..54be7e45f 100644 --- a/modules/nf-core/fastp/tests/main.nf.test.snap +++ b/modules/nf-core/fastp/tests/main.nf.test.snap @@ -1,55 +1,178 @@ { - "fastp test_fastp_interleaved_json": { + "test_fastp_single_end_qc_only - stub": { "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,b24e0624df5cc0b11cd5ba21b726fb22" + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] - ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-18T16:19:15.063001" + "timestamp": "2024-07-05T14:31:10.841098" }, - "test_fastp_paired_end_merged-for_stub_match": { + "test_fastp_paired_end": { "content": [ [ [ - "test_1.fastp.fastq.gz", - "test_2.fastp.fastq.gz" - ], - "test.fastp.html", - "test.fastp.json", - "test.fastp.log", - "test.merged.fastq.gz", - "{id=test, single_end=false}" + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + ] + ] + ], + [ + + ], + [ + + ], + [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-01-17T18:10:13.467574" + "timestamp": "2024-07-05T13:43:28.665779" }, - "versions_interleaved": { + "test_fastp_paired_end_merged_adapterlist": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,5914ca3f21ce162123a824e33e8564f6" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + ] + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" + ] + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:56:24.615634793" + "timestamp": "2024-07-05T13:44:18.210375" }, - "test_fastp_single_end_json": { + "test_fastp_single_end_qc_only": { "content": [ [ [ @@ -57,274 +180,1152 @@ "id": "test", "single_end": true }, - "test.fastp.json:md5,c852d7a6dba5819e4ac8d9673bedcacc" + "test.fastp.json:md5,5cc5f01e449309e0e689ed6f51a2294a" ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-18T16:18:43.526412" - }, - "versions_paired_end": { - "content": [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:55:42.333545689" + "timestamp": "2024-07-05T13:44:27.380974" }, - "test_fastp_paired_end_match": { + "test_fastp_paired_end_trim_fail": { "content": [ [ [ - "test_1.fastp.fastq.gz", - "test_2.fastp.fastq.gz" - ], - "test.fastp.html", - "test.fastp.json", - "test.fastp.log", - "{id=test, single_end=false}" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-01T12:03:06.431833729" - }, - "test_fastp_interleaved-_match": { - "content": [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", + "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" + ] + ] + ], [ - "test.fastp.fastq.gz", - "test.fastp.html", - "test.fastp.json", - "test.fastp.log", - "{id=test, single_end=true}" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-18T16:19:15.111894" - }, - "test_fastp_paired_end_merged_match": { - "content": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", + "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", + "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" + ] + ] + ], + [ + + ], [ [ - "test_1.fastp.fastq.gz", - "test_2.fastp.fastq.gz" - ], - "test.fastp.html", - "test.fastp.json", - "test.fastp.log", - "test.merged.fastq.gz", - "{id=test, single_end=false}" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-01T12:08:44.496251446" - }, - "versions_single_end_stub": { - "content": [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,4c3268ddb50ea5b33125984776aa3519" + ] + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:55:27.354051299" + "timestamp": "2024-07-05T13:43:58.749589" }, - "versions_interleaved-stub": { + "fastp - stub test_fastp_interleaved": { "content": [ - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:56:46.535528418" + "timestamp": "2024-07-05T13:50:00.270029" }, - "versions_single_end_trim_fail": { + "test_fastp_single_end - stub": { "content": [ - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:59:03.724591407" + "timestamp": "2024-07-05T13:49:42.502789" }, - "test_fastp_paired_end-for_stub_match": { + "test_fastp_paired_end_merged_adapterlist - stub": { "content": [ - [ - [ - "test_1.fastp.fastq.gz", - "test_2.fastp.fastq.gz" + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] ], - "test.fastp.html", - "test.fastp.json", - "test.fastp.log", - "{id=test, single_end=false}" - ] + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-01-17T18:07:15.398827" + "timestamp": "2024-07-05T13:54:53.458252" }, - "versions_paired_end-stub": { + "test_fastp_paired_end_merged - stub": { "content": [ - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:56:06.50017282" + "timestamp": "2024-07-05T13:50:27.689379" }, - "versions_single_end": { + "test_fastp_paired_end_merged": { "content": [ [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-01T11:55:07.67921647" - }, - "versions_paired_end_merged_stub": { - "content": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + ] + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" + ] + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:59:47.350653154" + "timestamp": "2024-07-05T13:44:08.68476" }, - "test_fastp_interleaved-for_stub_match": { + "test_fastp_paired_end - stub": { "content": [ - [ - "test.fastp.fastq.gz", - "test.fastp.html", - "test.fastp.json", - "test.fastp.log", - "{id=test, single_end=true}" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-01-17T18:08:06.127974" + "timestamp": "2024-07-05T13:49:51.679221" }, - "versions_paired_end_trim_fail": { + "test_fastp_single_end": { "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,c852d7a6dba5819e4ac8d9673bedcacc" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7" + ] + ], + [ + + ], + [ + + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:59:18.140484878" + "timestamp": "2024-07-05T13:43:18.834322" }, - "test_fastp_single_end-for_stub_match": { + "test_fastp_single_end_trim_fail - stub": { "content": [ - [ - "test.fastp.fastq.gz", - "test.fastp.html", - "test.fastp.json", - "test.fastp.log", - "{id=test, single_end=true}" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_fail": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-01-17T18:06:00.244202" + "timestamp": "2024-07-05T14:05:36.898142" }, - "test_fastp_single_end-_match": { + "test_fastp_paired_end_trim_fail - stub": { "content": [ - [ - "test.fastp.fastq.gz", - "test.fastp.html", - "test.fastp.json", - "test.fastp.log", - "{id=test, single_end=true}" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-18T16:18:43.580336" + "timestamp": "2024-07-05T14:05:49.212847" }, - "versions_paired_end_merged_adapterlist": { + "fastp test_fastp_interleaved": { "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,217d62dc13a23e92513a1bd8e1bcea39" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,b24e0624df5cc0b11cd5ba21b726fb22" + ] + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T12:05:37.845370554" + "timestamp": "2024-07-05T13:43:38.910832" }, - "versions_paired_end_merged": { + "test_fastp_single_end_trim_fail": { "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,9a7ee180f000e8d00c7fb67f06293eb5" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fail.fastq.gz:md5,3e4aaadb66a5b8fc9b881bf39c227abd" + ] + ], + [ + + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-01T11:59:32.860543858" + "timestamp": "2024-07-05T13:43:48.22378" }, - "test_fastp_single_end_trim_fail_json": { + "test_fastp_paired_end_qc_only": { "content": [ [ [ { "id": "test", - "single_end": true + "single_end": false }, - "test.fastp.json:md5,9a7ee180f000e8d00c7fb67f06293eb5" + "test.fastp.json:md5,623064a45912dac6f2b64e3f2e9901df" ] + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T13:44:36.334938" + }, + "test_fastp_paired_end_qc_only - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" }, - "timestamp": "2024-01-17T18:08:41.942317" + "timestamp": "2024-07-05T14:31:27.096468" } } \ No newline at end of file diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml index 1787b38a9..691d4c763 100644 --- a/modules/nf-core/fastqc/environment.yml +++ b/modules/nf-core/fastqc/environment.yml @@ -1,7 +1,5 @@ -name: fastqc channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::fastqc=0.12.1 diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index d79f1c862..d8989f481 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -26,7 +26,10 @@ process FASTQC { def rename_to = old_new_pairs*.join(' ').join(' ') def renamed_files = old_new_pairs.collect{ old_name, new_name -> new_name }.join(' ') - def memory_in_mb = MemoryUnit.of("${task.memory}").toUnit('MB') + // The total amount of allocated RAM by FastQC is equal to the number of threads defined (--threads) time the amount of RAM defined (--memory) + // https://github.com/s-andrews/FastQC/blob/1faeea0412093224d7f6a07f777fad60a5650795/fastqc#L211-L222 + // Dividing the task.memory by task.cpu allows to stick to requested amount of RAM in the label + def memory_in_mb = MemoryUnit.of("${task.memory}").toUnit('MB') / task.cpus // FastQC memory value allowed range (100 - 10000) def fastqc_memory = memory_in_mb > 10000 ? 10000 : (memory_in_mb < 100 ? 100 : memory_in_mb) diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml index ee5507e06..4827da7af 100644 --- a/modules/nf-core/fastqc/meta.yml +++ b/modules/nf-core/fastqc/meta.yml @@ -16,35 +16,44 @@ tools: homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ licence: ["GPL-2.0-only"] + identifier: biotools:fastqc input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - html: - type: file - description: FastQC report - pattern: "*_{fastqc.html}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.html": + type: file + description: FastQC report + pattern: "*_{fastqc.html}" - zip: - type: file - description: FastQC report archive - pattern: "*_{fastqc.zip}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.zip": + type: file + description: FastQC report archive + pattern: "*_{fastqc.zip}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@grst" diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test index 70edae4d9..e9d79a074 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -23,17 +23,14 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. - // looks like this:
Mon 2 Oct 2023
test.gz
- // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 - - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_single") } + { assert process.success }, + // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. + // looks like this:
Mon 2 Oct 2023
test.gz
+ // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -54,16 +51,14 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, - { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, - { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, - { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, - { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_paired") } + { assert process.success }, + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -83,13 +78,11 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_interleaved") } + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -109,13 +102,11 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_bam") } + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -138,22 +129,20 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, - { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, - { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, - { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, - { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, - { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, - { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, - { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, - { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_multiple") } + { assert process.success }, + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, + { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, + { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -173,21 +162,18 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_custom_prefix") } + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } test("sarscov2 single-end [fastq] - stub") { - options "-stub" - + options "-stub" when { process { """ @@ -201,12 +187,123 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out.html.collect { file(it[1]).getName() } + - process.out.zip.collect { file(it[1]).getName() } + - process.out.versions ).match("fastqc_stub") } + { assert process.success }, + { assert snapshot(process.out).match() } ) } } + test("sarscov2 paired-end [fastq] - 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/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 interleaved [fastq] - 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/fastq/test_interleaved.fastq.gz', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 paired-end [bam] - 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("sarscov2 multiple [fastq] - 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/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 custom_prefix - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'mysample', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } } diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap index 86f7c3115..d5db3092f 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test.snap +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -1,88 +1,392 @@ { - "fastqc_versions_interleaved": { + "sarscov2 custom_prefix": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:40:07.293713" + "timestamp": "2024-07-22T11:02:16.374038" }, - "fastqc_stub": { + "sarscov2 single-end [fastq] - stub": { "content": [ - [ - "test.html", - "test.zip", - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": true + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:24.993809" + }, + "sarscov2 custom_prefix - stub": { + "content": [ + { + "0": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:31:01.425198" + "timestamp": "2024-07-22T11:03:10.93942" }, - "fastqc_versions_multiple": { + "sarscov2 interleaved [fastq]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:40:55.797907" + "timestamp": "2024-07-22T11:01:42.355718" }, - "fastqc_versions_bam": { + "sarscov2 paired-end [bam]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:40:26.795862" + "timestamp": "2024-07-22T11:01:53.276274" }, - "fastqc_versions_single": { + "sarscov2 multiple [fastq]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:39:27.043675" + "timestamp": "2024-07-22T11:02:05.527626" }, - "fastqc_versions_paired": { + "sarscov2 paired-end [fastq]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:31.188871" + }, + "sarscov2 paired-end [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:34.273566" + }, + "sarscov2 multiple [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:39:47.584191" + "timestamp": "2024-07-22T11:03:02.304411" }, - "fastqc_versions_custom_prefix": { + "sarscov2 single-end [fastq]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:19.095607" + }, + "sarscov2 interleaved [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:44.640184" + }, + "sarscov2 paired-end [bam] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:41:14.576531" + "timestamp": "2024-07-22T11:02:53.550742" } } \ No newline at end of file diff --git a/modules/nf-core/gatk4/bedtointervallist/environment.yml b/modules/nf-core/gatk4/bedtointervallist/environment.yml index d6fbe2e77..55993f440 100644 --- a/modules/nf-core/gatk4/bedtointervallist/environment.yml +++ b/modules/nf-core/gatk4/bedtointervallist/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_bedtointervallist channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/bedtointervallist/meta.yml b/modules/nf-core/gatk4/bedtointervallist/meta.yml index 187da8850..25348e162 100644 --- a/modules/nf-core/gatk4/bedtointervallist/meta.yml +++ b/modules/nf-core/gatk4/bedtointervallist/meta.yml @@ -15,34 +15,45 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test'] - - bed: - type: file - description: Input bed file - pattern: "*.bed" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - dict: - type: file - description: Sequence dictionary - pattern: "*.dict" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - bed: + type: file + description: Input bed file + pattern: "*.bed" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - dict: + type: file + description: Sequence dictionary + pattern: "*.dict" output: - interval_list: - type: file - description: gatk interval list file - pattern: "*.interval_list" + - meta: + type: file + description: gatk interval list file + pattern: "*.interval_list" + - "*.interval_list": + type: file + description: gatk interval list file + pattern: "*.interval_list" + - _list: + type: file + description: gatk interval list file + pattern: "*.interval_list" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@kevinmenden" - "@ramprasadn" diff --git a/modules/nf-core/gatk4/collectreadcounts/environment.yml b/modules/nf-core/gatk4/collectreadcounts/environment.yml index d09cd8903..55993f440 100644 --- a/modules/nf-core/gatk4/collectreadcounts/environment.yml +++ b/modules/nf-core/gatk4/collectreadcounts/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_collectreadcounts channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/collectreadcounts/meta.yml b/modules/nf-core/gatk4/collectreadcounts/meta.yml index 25fb8b8cf..cf8c7731d 100644 --- a/modules/nf-core/gatk4/collectreadcounts/meta.yml +++ b/modules/nf-core/gatk4/collectreadcounts/meta.yml @@ -1,5 +1,6 @@ name: "gatk4_collectreadcounts" -description: Collects read counts at specified intervals. The count for each interval is calculated by counting the number of read starts that lie in the interval. +description: Collects read counts at specified intervals. The count for each interval + is calculated by counting the number of read starts that lie in the interval. keywords: - collectreadcounts - bam @@ -7,75 +8,88 @@ keywords: - gatk4 tools: - gatk4: - description: Genome Analysis Toolkit (GATK4). Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools with a primary focus on variant discovery and genotyping. Its powerful processing engine and high-performance computing features make it capable of taking on projects of any size. + description: Genome Analysis Toolkit (GATK4). Developed in the Data Sciences Platform + at the Broad Institute, the toolkit offers a wide variety of tools with a primary + focus on variant discovery and genotyping. Its powerful processing engine and + high-performance computing features make it capable of taking on projects of + any size. homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037593911-CombineGVCFs tool_dev_url: https://github.com/broadinstitute/gatk doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - input: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - input_index: - type: file - description: BAM/CRAM/SAM index file - pattern: "*.{bai,crai,sai}" - - intervals: - type: file - description: A file containing the specified intervals - pattern: "*.{bed,intervals}" - - fasta: - type: file - description: Optional - Reference FASTA - pattern: "*.{fasta,fa}" - - fai: - type: file - description: Optional - Index of the reference FASTA file - pattern: "*.fai" - - dict: - type: file - description: Optional - Sequence dictionary of the reference FASTA file - pattern: "*.dict" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - input_index: + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" + - intervals: + type: file + description: A file containing the specified intervals + pattern: "*.{bed,intervals}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fasta: + type: file + description: Optional - Reference FASTA + pattern: "*.{fasta,fa}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fai: + type: file + description: Optional - Index of the reference FASTA file + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - dict: + type: file + description: Optional - Sequence dictionary of the reference FASTA file + pattern: "*.dict" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - hdf5: - type: file - description: The read counts in hdf5 format - pattern: "*.hdf5" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.hdf5": + type: file + description: The read counts in hdf5 format + pattern: "*.hdf5" - tsv: - type: file - description: The read counts in TSV format - pattern: "*.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: The read counts in TSV format + pattern: "*.tsv" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@nvnieuwk" maintainers: diff --git a/modules/nf-core/gatk4/collectreadcounts/tests/main.nf.test b/modules/nf-core/gatk4/collectreadcounts/tests/main.nf.test new file mode 100644 index 000000000..0832cf85a --- /dev/null +++ b/modules/nf-core/gatk4/collectreadcounts/tests/main.nf.test @@ -0,0 +1,104 @@ + +nextflow_process { + + name "Test Process GATK4_COLLECTREADCOUNTS" + script "../main.nf" + process "GATK4_COLLECTREADCOUNTS" + + tag "modules" + tag "modules_nfcore" + tag "gatk4" + tag "gatk4/collectreadcounts" + + test("test-gatk4-collectreadcounts-hdf5") { + + config "./nextflow.hdf5.config" + + 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.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] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.hdf5[0][1]).name, + process.out.tsv, + ).match() + } + ) + } + } + + test("test-gatk4-collectreadcounts-tsv") { + + config "./nextflow.tsv.config" + + 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.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] = [[],[]] + input[2] = [[],[]] + input[3] = [[],[]] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-gatk4-collectreadcounts-cram") { + + config "./nextflow.cram.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] + input[2] = [[id:'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] + input[3] = [[id:'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/gatk4/collectreadcounts/tests/main.nf.test.snap b/modules/nf-core/gatk4/collectreadcounts/tests/main.nf.test.snap new file mode 100644 index 000000000..28a3a6e15 --- /dev/null +++ b/modules/nf-core/gatk4/collectreadcounts/tests/main.nf.test.snap @@ -0,0 +1,97 @@ +{ + "test-gatk4-collectreadcounts-cram": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d9a32039b7a84f5bb74e8382e5427670" + ] + ], + "2": [ + "versions.yml:md5,ebf23f4ab63948ba97df07035f8d2659" + ], + "hdf5": [ + + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d9a32039b7a84f5bb74e8382e5427670" + ] + ], + "versions": [ + "versions.yml:md5,ebf23f4ab63948ba97df07035f8d2659" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T12:58:19.610687" + }, + "test-gatk4-collectreadcounts-hdf5": { + "content": [ + "test.hdf5", + [ + + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T13:02:48.607644" + }, + "test-gatk4-collectreadcounts-tsv": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,8e45a6164916c303387f39f02ce45841" + ] + ], + "2": [ + "versions.yml:md5,ebf23f4ab63948ba97df07035f8d2659" + ], + "hdf5": [ + + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,8e45a6164916c303387f39f02ce45841" + ] + ], + "versions": [ + "versions.yml:md5,ebf23f4ab63948ba97df07035f8d2659" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T12:58:07.500024" + } +} \ No newline at end of file diff --git a/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.cram.config b/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.cram.config new file mode 100644 index 000000000..682bdcad1 --- /dev/null +++ b/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.cram.config @@ -0,0 +1,5 @@ +process { + withName: 'GATK4_COLLECTREADCOUNTS' { + ext.args = "--format TSV --interval-merging-rule OVERLAPPING_ONLY" + } +} diff --git a/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.hdf5.config b/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.hdf5.config new file mode 100644 index 000000000..d6ca881b7 --- /dev/null +++ b/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.hdf5.config @@ -0,0 +1,5 @@ +process { + withName: 'GATK4_COLLECTREADCOUNTS'{ + ext.args = "--interval-merging-rule OVERLAPPING_ONLY" + } +} diff --git a/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.tsv.config b/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.tsv.config new file mode 100644 index 000000000..682bdcad1 --- /dev/null +++ b/modules/nf-core/gatk4/collectreadcounts/tests/nextflow.tsv.config @@ -0,0 +1,5 @@ +process { + withName: 'GATK4_COLLECTREADCOUNTS' { + ext.args = "--format TSV --interval-merging-rule OVERLAPPING_ONLY" + } +} diff --git a/modules/nf-core/gatk4/createsequencedictionary/environment.yml b/modules/nf-core/gatk4/createsequencedictionary/environment.yml index 78822ad03..55993f440 100644 --- a/modules/nf-core/gatk4/createsequencedictionary/environment.yml +++ b/modules/nf-core/gatk4/createsequencedictionary/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_createsequencedictionary channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/createsequencedictionary/meta.yml b/modules/nf-core/gatk4/createsequencedictionary/meta.yml index f9d70be09..7b5156bb3 100644 --- a/modules/nf-core/gatk4/createsequencedictionary/meta.yml +++ b/modules/nf-core/gatk4/createsequencedictionary/meta.yml @@ -15,25 +15,32 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Input fasta file - pattern: "*.{fasta,fa}" + - - meta: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Input fasta file + pattern: "*.{fasta,fa}" output: - dict: - type: file - description: gatk dictionary file - pattern: "*.{dict}" + - meta: + type: file + description: gatk dictionary file + pattern: "*.{dict}" + - "*.dict": + type: file + description: gatk dictionary file + pattern: "*.{dict}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@maxulysse" - "@ramprasadn" diff --git a/modules/nf-core/gatk4/denoisereadcounts/environment.yml b/modules/nf-core/gatk4/denoisereadcounts/environment.yml index a03cf4a97..55993f440 100644 --- a/modules/nf-core/gatk4/denoisereadcounts/environment.yml +++ b/modules/nf-core/gatk4/denoisereadcounts/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_denoisereadcounts channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/denoisereadcounts/meta.yml b/modules/nf-core/gatk4/denoisereadcounts/meta.yml index f2bd853f5..367321ba2 100644 --- a/modules/nf-core/gatk4/denoisereadcounts/meta.yml +++ b/modules/nf-core/gatk4/denoisereadcounts/meta.yml @@ -15,43 +15,52 @@ tools: doi: 10.1158/1538-7445.AM2017-3590 tool_dev_url: "https://github.com/broadinstitute/gatk" licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - counts: - type: file - description: Read counts in hdf5 or tsv format. - pattern: "*.{hdf5,tsv}" - - pon: - type: file - description: Panel of normals file hdf5 or tsv format. - pattern: "*.{hdf5}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - counts: + type: file + description: Read counts in hdf5 or tsv format. + pattern: "*.{hdf5,tsv}" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - pon: + type: file + description: Panel of normals file hdf5 or tsv format. + pattern: "*.{hdf5}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - standardized: - type: file - description: Standardized copy ratios file. - pattern: "*.{tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*_standardizedCR.tsv": + type: file + description: Standardized copy ratios file. + pattern: "*.{tsv}" - denoised: - type: file - description: Denoised copy ratios file - pattern: "*.{tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*_denoisedCR.tsv": + type: file + description: Denoised copy ratios file + pattern: "*.{tsv}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/gatk4/denoisereadcounts/tests/main.nf.test b/modules/nf-core/gatk4/denoisereadcounts/tests/main.nf.test index 35ad8f791..e5fef2a2a 100644 --- a/modules/nf-core/gatk4/denoisereadcounts/tests/main.nf.test +++ b/modules/nf-core/gatk4/denoisereadcounts/tests/main.nf.test @@ -19,9 +19,9 @@ nextflow_process { script "../../preprocessintervals/main.nf" process { """ - input[0] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)]) - input[1] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)]) - input[2] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)]) + input[0] = Channel.value([ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)]) + input[1] = Channel.value([ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)]) + input[2] = Channel.value([ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)]) input[3] = [[],[]] input[4] = [[],[]] """ @@ -33,12 +33,12 @@ nextflow_process { """ intervals = GATK4_PREPROCESSINTERVALS.out.interval_list.map {meta, list -> list} input[0] = Channel.of( - [[ id:'test', single_end:false ], 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)], + [[ id:'test', single_end:false ], 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)], ) .combine( intervals) - input[1] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)]) - input[2] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)]) - input[3] = Channel.value([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)]) + input[1] = Channel.value([ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)]) + input[2] = Channel.value([ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)]) + input[3] = Channel.value([ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)]) """ } } @@ -66,7 +66,8 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.standardized, - process.out.denoised + process.out.denoised, + process.out.versions ).match() } ) } diff --git a/modules/nf-core/gatk4/denoisereadcounts/tests/main.nf.test.snap b/modules/nf-core/gatk4/denoisereadcounts/tests/main.nf.test.snap index 000283b39..f35eb283d 100644 --- a/modules/nf-core/gatk4/denoisereadcounts/tests/main.nf.test.snap +++ b/modules/nf-core/gatk4/denoisereadcounts/tests/main.nf.test.snap @@ -18,12 +18,15 @@ }, "test_denoisedCR.tsv:md5,f9e56b8e12b4dadc91a6d977fa79c6a8" ] + ], + [ + "versions.yml:md5,140780e1af7318cc9259b8970bc70c81" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T14:45:41.834159" + "timestamp": "2024-08-16T12:34:12.568925" } } \ No newline at end of file diff --git a/modules/nf-core/gatk4/determinegermlinecontigploidy/meta.yml b/modules/nf-core/gatk4/determinegermlinecontigploidy/meta.yml index 56eb40890..828628b28 100644 --- a/modules/nf-core/gatk4/determinegermlinecontigploidy/meta.yml +++ b/modules/nf-core/gatk4/determinegermlinecontigploidy/meta.yml @@ -1,5 +1,6 @@ name: "gatk4_determinegermlinecontigploidy" -description: Determines the baseline contig ploidy for germline samples given counts data +description: Determines the baseline contig ploidy for germline samples given counts + data keywords: - copy number - counts @@ -15,59 +16,70 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - counts: - type: file - description: One or more count TSV files created with gatk/collectreadcounts - pattern: "*.tsv" - - bed: - type: file - description: Optional - A bed file containing the intervals to include in the process - pattern: "*.bed" - - exclude_beds: - type: file - description: Optional - One or more bed files containing intervals to exclude from the process - pattern: "*.bed" - - contig_ploidy_table: - type: file - description: The contig ploidy priors table - pattern: "*.tsv" - - ploidy_model: - type: directory - description: | - Optional - A folder containing the ploidy model. - When a model is supplied to tool will run in CASE mode. - pattern: '*-model/' + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - counts: + type: file + description: One or more count TSV files created with gatk/collectreadcounts + pattern: "*.tsv" + - bed: + type: file + description: Optional - A bed file containing the intervals to include in the + process + pattern: "*.bed" + - exclude_beds: + type: file + description: Optional - One or more bed files containing intervals to exclude + from the process + pattern: "*.bed" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - ploidy_model: + type: directory + description: | + Optional - A folder containing the ploidy model. + When a model is supplied to tool will run in CASE mode. + pattern: '*-model/' + - - contig_ploidy_table: + type: file + description: The contig ploidy priors table + pattern: "*.tsv" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - calls: - type: directory - description: A folder containing the calls from the input files - pattern: "*-calls/" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}-calls: + type: directory + description: A folder containing the calls from the input files + pattern: "*-calls/" - model: - type: directory - description: | - A folder containing the model from the input files. - This will only be created in COHORT mode (when no model is supplied to the process). - pattern: "*-model/" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}-model: + type: directory + description: | + A folder containing the model from the input files. + This will only be created in COHORT mode (when no model is supplied to the process). + pattern: "*-model/" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@nvnieuwk" maintainers: diff --git a/modules/nf-core/gatk4/filtermutectcalls/environment.yml b/modules/nf-core/gatk4/filtermutectcalls/environment.yml index 7494d84db..55993f440 100644 --- a/modules/nf-core/gatk4/filtermutectcalls/environment.yml +++ b/modules/nf-core/gatk4/filtermutectcalls/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_filtermutectcalls channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/filtermutectcalls/meta.yml b/modules/nf-core/gatk4/filtermutectcalls/meta.yml index 736c83862..9287277eb 100644 --- a/modules/nf-core/gatk4/filtermutectcalls/meta.yml +++ b/modules/nf-core/gatk4/filtermutectcalls/meta.yml @@ -16,83 +16,103 @@ tools: homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - vcf: - type: file - description: compressed vcf file of mutect2calls - pattern: "*.vcf.gz" - - vcf_tbi: - type: file - description: Tabix index of vcf file - pattern: "*vcf.gz.tbi" - - stats: - type: file - description: Stats file that pairs with output vcf file - pattern: "*vcf.gz.stats" - - orientationbias: - type: file - description: files containing artifact priors for input vcf. Optional input. - pattern: "*.artifact-prior.tar.gz" - - segmentation: - type: file - description: tables containing segmentation information for input vcf. Optional input. - pattern: "*.segmentation.table" - - table: - type: file - description: table(s) containing contamination data for input vcf. Optional input, takes priority over estimate. - pattern: "*.contamination.table" - - estimate: - type: float - description: estimation of contamination value as a double. Optional input, will only be used if table is not specified. - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: The reference fasta file - pattern: "*.fasta" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Index of reference fasta file - pattern: "*.fasta.fai" - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - dict: - type: file - description: GATK sequence dictionary - pattern: "*.dict" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - vcf: + type: file + description: compressed vcf file of mutect2calls + pattern: "*.vcf.gz" + - vcf_tbi: + type: file + description: Tabix index of vcf file + pattern: "*vcf.gz.tbi" + - stats: + type: file + description: Stats file that pairs with output vcf file + pattern: "*vcf.gz.stats" + - orientationbias: + type: file + description: files containing artifact priors for input vcf. Optional input. + pattern: "*.artifact-prior.tar.gz" + - segmentation: + type: file + description: tables containing segmentation information for input vcf. Optional + input. + pattern: "*.segmentation.table" + - table: + type: file + description: table(s) containing contamination data for input vcf. Optional + input, takes priority over estimate. + pattern: "*.contamination.table" + - estimate: + type: float + description: estimation of contamination value as a double. Optional input, + will only be used if table is not specified. + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fasta.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - dict: + type: file + description: GATK sequence dictionary + pattern: "*.dict" output: - vcf: - type: file - description: file containing filtered mutect2 calls. - pattern: "*.vcf.gz" + - meta: + type: file + description: file containing filtered mutect2 calls. + pattern: "*.vcf.gz" + - "*.vcf.gz": + type: file + description: file containing filtered mutect2 calls. + pattern: "*.vcf.gz" - tbi: - type: file - description: tbi file that pairs with vcf. - pattern: "*.vcf.gz.tbi" + - meta: + type: file + description: tbi file that pairs with vcf. + pattern: "*.vcf.gz.tbi" + - "*.vcf.gz.tbi": + type: file + description: tbi file that pairs with vcf. + pattern: "*.vcf.gz.tbi" - stats: - type: file - description: file containing statistics of the filtermutectcalls run. - pattern: "*.filteringStats.tsv" + - meta: + type: file + description: file containing statistics of the filtermutectcalls run. + pattern: "*.filteringStats.tsv" + - "*.filteringStats.tsv": + type: file + description: file containing statistics of the filtermutectcalls run. + pattern: "*.filteringStats.tsv" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@GCJMackenzie" - "@maxulysse" diff --git a/modules/nf-core/gatk4/germlinecnvcaller/meta.yml b/modules/nf-core/gatk4/germlinecnvcaller/meta.yml index d4715ff0f..a185d9d10 100644 --- a/modules/nf-core/gatk4/germlinecnvcaller/meta.yml +++ b/modules/nf-core/gatk4/germlinecnvcaller/meta.yml @@ -1,60 +1,85 @@ name: "gatk4_germlinecnvcaller" -description: Calls copy-number variants in germline samples given their counts and the output of DetermineGermlineContigPloidy. +description: Calls copy-number variants in germline samples given their counts and + the output of DetermineGermlineContigPloidy. keywords: - gatk - germline contig ploidy - germlinecnvcaller tools: - "gatk4": - description: Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools with a primary focus on variant discovery and genotyping. Its powerful processing engine and high-performance computing features make it capable of taking on projects of any size. + description: Developed in the Data Sciences Platform at the Broad Institute, the + toolkit offers a wide variety of tools with a primary focus on variant discovery + and genotyping. Its powerful processing engine and high-performance computing + features make it capable of taking on projects of any size. homepage: https://gatk.broadinstitute.org/hc/en-us documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: "10.1158/1538-7445.AM2017-3590" licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - tsv: - type: file - description: One or more count TSV files created with gatk/collectreadcounts - pattern: "*.tsv" - - intervals: - type: file - description: Optional - A bed file containing the intervals to include in the process - pattern: "*.bed" - - model: - type: directory - description: Optional - directory containing the model produced by germlinecnvcaller cohort mode - pattern: "*-cnv-model/*-model" - - ploidy: - type: directory - description: Directory containing ploidy calls produced by determinegermlinecontigploidy case or cohort mode - pattern: "*-calls" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tsv: + type: file + description: One or more count TSV files created with gatk/collectreadcounts + pattern: "*.tsv" + - intervals: + type: file + description: Optional - A bed file containing the intervals to include in the + process + pattern: "*.bed" + - ploidy: + type: directory + description: Directory containing ploidy calls produced by determinegermlinecontigploidy + case or cohort mode + pattern: "*-calls" + - model: + type: directory + description: Optional - directory containing the model produced by germlinecnvcaller + cohort mode + pattern: "*-cnv-model/*-model" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - cohortcalls: - type: directory - description: Tar gzipped directory containing calls produced by germlinecnvcaller case mode - pattern: "*-cnv-model/*-calls" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*-cnv-model/*-calls": + type: directory + description: Tar gzipped directory containing calls produced by germlinecnvcaller + case mode + pattern: "*-cnv-model/*-calls" - cohortmodel: - type: directory - description: Optional - Tar gzipped directory containing the model produced by germlinecnvcaller cohort mode - pattern: "*-cnv-model/*-model" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*-cnv-model/*-model": + type: directory + description: Optional - Tar gzipped directory containing the model produced + by germlinecnvcaller cohort mode + pattern: "*-cnv-model/*-model" - casecalls: - type: directory - description: Tar gzipped directory containing calls produced by germlinecnvcaller case mode - pattern: "*-cnv-calls/*-calls" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*-cnv-calls/*-calls": + type: directory + description: Tar gzipped directory containing calls produced by germlinecnvcaller + case mode + pattern: "*-cnv-calls/*-calls" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ryanjameskennedy" - "@ViktorHy" diff --git a/modules/nf-core/gatk4/intervallisttools/environment.yml b/modules/nf-core/gatk4/intervallisttools/environment.yml index a4026f98f..55993f440 100644 --- a/modules/nf-core/gatk4/intervallisttools/environment.yml +++ b/modules/nf-core/gatk4/intervallisttools/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_intervallisttools channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/intervallisttools/meta.yml b/modules/nf-core/gatk4/intervallisttools/meta.yml index 748dccfc5..8ee15a297 100644 --- a/modules/nf-core/gatk4/intervallisttools/meta.yml +++ b/modules/nf-core/gatk4/intervallisttools/meta.yml @@ -1,5 +1,6 @@ name: gatk4_intervallisttools -description: Splits the interval list file into unique, equally-sized interval files and place it under a directory +description: Splits the interval list file into unique, equally-sized interval files + and place it under a directory keywords: - bed - gatk4 @@ -15,30 +16,36 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - interval_list: - type: file - description: Interval list file - pattern: "*.interval_list" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - intervals: + type: file + description: Interval file output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - interval_list: - type: file - description: Interval list files - pattern: "*.interval_list" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_split/*/*.interval_list": + type: file + description: Interval list files + pattern: "*.interval_list" + - _list: + type: file + description: Interval list files + pattern: "*.interval_list" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@praveenraj2018" maintainers: diff --git a/modules/nf-core/gatk4/mergebamalignment/environment.yml b/modules/nf-core/gatk4/mergebamalignment/environment.yml index 0ea7b0d78..55993f440 100644 --- a/modules/nf-core/gatk4/mergebamalignment/environment.yml +++ b/modules/nf-core/gatk4/mergebamalignment/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_mergebamalignment channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/mergebamalignment/meta.yml b/modules/nf-core/gatk4/mergebamalignment/meta.yml index af4a3f18b..7bde93459 100644 --- a/modules/nf-core/gatk4/mergebamalignment/meta.yml +++ b/modules/nf-core/gatk4/mergebamalignment/meta.yml @@ -16,45 +16,52 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test'] - - aligned: - type: file - description: The aligned bam file - pattern: "*.{bam}" - - unaligned: - type: file - description: The unmaped bam file - pattern: "*.{bam}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: The reference fasta file - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - dict: - type: file - description: GATK sequence dictionary + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - aligned: + type: file + description: The aligned bam file + pattern: "*.{bam}" + - unmapped: + type: file + description: The unmapped bam file + pattern: "*.{bam}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: The reference fasta file + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - dict: + type: file + description: GATK sequence dictionary output: - bam: - type: file - description: The merged bam file - pattern: "*.bam" + - meta: + type: file + description: The merged bam file + pattern: "*.bam" + - "*.bam": + type: file + description: The merged bam file + pattern: "*.bam" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@kevinmenden" - "@ramprasadn" diff --git a/modules/nf-core/gatk4/mergebamalignment/tests/main.nf.test b/modules/nf-core/gatk4/mergebamalignment/tests/main.nf.test new file mode 100644 index 000000000..96e93bb19 --- /dev/null +++ b/modules/nf-core/gatk4/mergebamalignment/tests/main.nf.test @@ -0,0 +1,73 @@ + +nextflow_process { + + name "Test Process GATK4_MERGEBAMALIGNMENT" + script "../main.nf" + process "GATK4_MERGEBAMALIGNMENT" + + tag "modules" + tag "modules_nfcore" + tag "gatk4" + tag "gatk4/mergebamalignment" + + test("test-gatk4-mergebamalignment") { + + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.unaligned.bam', checkIfExists: true) + ] + input[1] = [ [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.versions + ).match() + } + ) + } + } + + test("test-gatk4-mergebamalignment-stubs") { + options '-stub' + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.unaligned.bam', checkIfExists: true) + ] + input[1] = [ [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/gatk4/mergebamalignment/tests/main.nf.test.snap b/modules/nf-core/gatk4/mergebamalignment/tests/main.nf.test.snap new file mode 100644 index 000000000..719a7bb33 --- /dev/null +++ b/modules/nf-core/gatk4/mergebamalignment/tests/main.nf.test.snap @@ -0,0 +1,48 @@ +{ + "test-gatk4-mergebamalignment-stubs": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,a72cfce8c9d171260cbb82b492be4372" + ], + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,a72cfce8c9d171260cbb82b492be4372" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T12:02:15.41024" + }, + "test-gatk4-mergebamalignment": { + "content": [ + "30c325e1e032eb1782a280d34c0fb1c7", + [ + "versions.yml:md5,a72cfce8c9d171260cbb82b492be4372" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T12:02:08.379035" + } +} \ No newline at end of file diff --git a/modules/nf-core/gatk4/mergevcfs/environment.yml b/modules/nf-core/gatk4/mergevcfs/environment.yml index efd9faa22..55993f440 100644 --- a/modules/nf-core/gatk4/mergevcfs/environment.yml +++ b/modules/nf-core/gatk4/mergevcfs/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_mergevcfs channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/mergevcfs/meta.yml b/modules/nf-core/gatk4/mergevcfs/meta.yml index 996053fcc..b4f61d780 100644 --- a/modules/nf-core/gatk4/mergevcfs/meta.yml +++ b/modules/nf-core/gatk4/mergevcfs/meta.yml @@ -14,38 +14,50 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test'] - - vcf: - type: list - description: Two or more VCF files - pattern: "*.{vcf,vcf.gz}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome'] - - dict: - type: file - description: Optional Sequence Dictionary as input - pattern: "*.dict" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - vcf: + type: list + description: Two or more VCF files + pattern: "*.{vcf,vcf.gz}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome'] + - dict: + type: file + description: Optional Sequence Dictionary as input + pattern: "*.dict" output: - vcf: - type: file - description: merged vcf file - pattern: "*.vcf.gz" + - meta: + type: file + description: merged vcf file + pattern: "*.vcf.gz" + - "*.vcf.gz": + type: file + description: merged vcf file + pattern: "*.vcf.gz" - tbi: - type: file - description: index files for the merged vcf files - pattern: "*.tbi" + - meta: + type: file + description: index files for the merged vcf files + pattern: "*.tbi" + - "*.tbi": + type: file + description: index files for the merged vcf files + pattern: "*.tbi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@kevinmenden" maintainers: diff --git a/modules/nf-core/gatk4/mutect2/environment.yml b/modules/nf-core/gatk4/mutect2/environment.yml index 86f4bfae9..55993f440 100644 --- a/modules/nf-core/gatk4/mutect2/environment.yml +++ b/modules/nf-core/gatk4/mutect2/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_mutect2 channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/mutect2/meta.yml b/modules/nf-core/gatk4/mutect2/meta.yml index 21c928ed9..27fd63a24 100644 --- a/modules/nf-core/gatk4/mutect2/meta.yml +++ b/modules/nf-core/gatk4/mutect2/meta.yml @@ -17,88 +17,113 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test'] - - input: - type: list - description: list of BAM files, also able to take CRAM as an input - pattern: "*.{bam/cram}" - - input_index: - type: list - description: list of BAM file indexes, also able to take CRAM indexes as an input - pattern: "*.{bam.bai/cram.crai}" - - intervals: - type: file - description: Specify region the tools is run on. - pattern: ".{bed,interval_list}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: The reference fasta file - pattern: "*.fasta" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Index of reference fasta file - pattern: "*.fasta.fai" - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - dict: - type: file - description: GATK sequence dictionary - pattern: "*.dict" - - germline_resource: - type: file - description: Population vcf of germline sequencing, containing allele fractions. - pattern: "*.vcf.gz" - - germline_resource_tbi: - type: file - description: Index file for the germline resource. - pattern: "*.vcf.gz.tbi" - - panel_of_normals: - type: file - description: vcf file to be used as a panel of normals. - pattern: "*.vcf.gz" - - panel_of_normals_tbi: - type: file - description: Index for the panel of normals. - pattern: "*.vcf.gz.tbi" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - input: + type: list + description: list of BAM files, also able to take CRAM as an input + pattern: "*.{bam/cram}" + - input_index: + type: list + description: list of BAM file indexes, also able to take CRAM indexes as an + input + pattern: "*.{bam.bai/cram.crai}" + - intervals: + type: file + description: Specify region the tools is run on. + pattern: ".{bed,interval_list}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fasta.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - dict: + type: file + description: GATK sequence dictionary + pattern: "*.dict" + - - germline_resource: + type: file + description: Population vcf of germline sequencing, containing allele fractions. + pattern: "*.vcf.gz" + - - germline_resource_tbi: + type: file + description: Index file for the germline resource. + pattern: "*.vcf.gz.tbi" + - - panel_of_normals: + type: file + description: vcf file to be used as a panel of normals. + pattern: "*.vcf.gz" + - - panel_of_normals_tbi: + type: file + description: Index for the panel of normals. + pattern: "*.vcf.gz.tbi" output: - vcf: - type: file - description: compressed vcf file - pattern: "*.vcf.gz" + - meta: + type: file + description: compressed vcf file + pattern: "*.vcf.gz" + - "*.vcf.gz": + type: file + description: compressed vcf file + pattern: "*.vcf.gz" - tbi: - type: file - description: Index of vcf file - pattern: "*vcf.gz.tbi" + - meta: + type: file + description: Index of vcf file + pattern: "*vcf.gz.tbi" + - "*.tbi": + type: file + description: Index of vcf file + pattern: "*vcf.gz.tbi" - stats: - type: file - description: Stats file that pairs with output vcf file - pattern: "*vcf.gz.stats" + - meta: + type: file + description: Stats file that pairs with output vcf file + pattern: "*vcf.gz.stats" + - "*.stats": + type: file + description: Stats file that pairs with output vcf file + pattern: "*vcf.gz.stats" - f1r2: - type: file - description: file containing information to be passed to LearnReadOrientationModel (only outputted when tumor_normal_pair mode is run) - pattern: "*.f1r2.tar.gz" + - meta: + type: file + description: file containing information to be passed to LearnReadOrientationModel + (only outputted when tumor_normal_pair mode is run) + pattern: "*.f1r2.tar.gz" + - "*.f1r2.tar.gz": + type: file + description: file containing information to be passed to LearnReadOrientationModel + (only outputted when tumor_normal_pair mode is run) + pattern: "*.f1r2.tar.gz" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@GCJMackenzie" - "@ramprasadn" diff --git a/modules/nf-core/gatk4/mutect2/tests/main.nf.test b/modules/nf-core/gatk4/mutect2/tests/main.nf.test index d247ee357..aea8d2269 100644 --- a/modules/nf-core/gatk4/mutect2/tests/main.nf.test +++ b/modules/nf-core/gatk4/mutect2/tests/main.nf.test @@ -21,31 +21,31 @@ nextflow_process { tumor_id:'tumour' ], [ - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true) ], [ - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true) ], [] ] input[1] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ] input[2] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) ] input[3] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) ] - input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) - input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) - input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz', checkIfExists: true) + input[5] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz.tbi', checkIfExists: true) + input[6] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz', checkIfExists: true) + input[7] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz.tbi', checkIfExists: true) """ } } @@ -78,31 +78,31 @@ nextflow_process { tumor_id:'tumour' ], [ - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true) ], [ - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true) ], [] ] input[1] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ] input[2] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) ] input[3] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) ] - input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) - input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) - input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz', checkIfExists: true) + input[5] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz.tbi', checkIfExists: true) + input[6] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz', checkIfExists: true) + input[7] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz.tbi', checkIfExists: true) """ } } @@ -127,26 +127,26 @@ nextflow_process { """ input[0] = [ [ id:'test'], - [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)], - [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true)], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true)], [] ] input[1] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ] input[2] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) ] input[3] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) ] - input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) - input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) - input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz', checkIfExists: true) + input[5] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz.tbi', checkIfExists: true) + input[6] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz', checkIfExists: true) + input[7] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz.tbi', checkIfExists: true) """ } } @@ -171,26 +171,26 @@ nextflow_process { """ input[0] = [ [ id:'test'], - [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true)], - [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true)], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram', checkIfExists: true)], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram.crai', checkIfExists: true)], [] ] input[1] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ] input[2] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) ] input[3] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) ] - input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) - input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) - input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz', checkIfExists: true) + input[5] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz.tbi', checkIfExists: true) + input[6] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz', checkIfExists: true) + input[7] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz.tbi', checkIfExists: true) """ } } @@ -216,21 +216,21 @@ nextflow_process { """ input[0] = [ [ id:'test'], - [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true)], - [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true)], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true)], [] ] input[1] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ] input[2] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) ] input[3] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) ] input[4] = [] input[5] = [] @@ -261,21 +261,21 @@ nextflow_process { """ input[0] = [ [ id:'test'], - [ file(params.test_data['homo_sapiens']['illumina']['mitochon_standin_recalibrated_sorted_bam'], checkIfExists: true)], - [ file(params.test_data['homo_sapiens']['illumina']['mitochon_standin_recalibrated_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/mitochon_standin.recalibrated.sorted.bam', checkIfExists: true)], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam.bai', checkIfExists: true)], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true)] ] input[1] = [ [ id:'genome' ], - 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:'genome' ], - 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) ] input[3] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] input[4] = [] input[5] = [] @@ -312,31 +312,31 @@ nextflow_process { tumor_id:'tumour' ], [ - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true) ], [ - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true) ], [] ] input[1] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ] input[2] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) ] input[3] = [ [ id:'genome' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true) ] - input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) - input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) - input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz', checkIfExists: true) + input[5] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/gnomAD.r2.1.1.vcf.gz.tbi', checkIfExists: true) + input[6] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz', checkIfExists: true) + input[7] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz.tbi', checkIfExists: true) """ } } diff --git a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/meta.yml b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/meta.yml index a724da11c..d090169ab 100644 --- a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/meta.yml +++ b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/meta.yml @@ -1,5 +1,6 @@ name: "gatk4_postprocessgermlinecnvcalls" -description: Postprocesses the output of GermlineCNVCaller and generates VCFs and denoised copy ratios +description: Postprocesses the output of GermlineCNVCaller and generates VCFs and + denoised copy ratios keywords: - copy number - gatk4 @@ -14,50 +15,69 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037593411-PostprocessGermlineCNVCalls doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ploidy: - type: directory - description: | - Optional - A folder containing the ploidy model. - When a model is supplied to tool will run in CASE mode. - pattern: "*-calls/" - - calls: - type: directory - description: A folder containing the calls from the input files - pattern: "*-cnv-calls/*-calls" - - model: - type: directory - description: | - A folder containing the model from the input files. - This will only be created in COHORT mode (when no model is supplied to the process). - pattern: "*-cnv-model/*-model" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - calls: + type: directory + description: A folder containing the calls from the input files + pattern: "*-cnv-calls/*-calls" + - model: + type: directory + description: | + A folder containing the model from the input files. + This will only be created in COHORT mode (when no model is supplied to the process). + pattern: "*-cnv-model/*-model" + - ploidy: + type: directory + description: | + Optional - A folder containing the ploidy model. + When a model is supplied to tool will run in CASE mode. + pattern: "*-calls/" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - denoised: - type: file - description: Denoised copy ratio file - pattern: "*.vcf.gz" - - segments: - type: file - description: Segments VCF file - pattern: "*.vcf.gz" - intervals: - type: file - description: Intervals VCF file - pattern: "*.vcf.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_genotyped_intervals.vcf.gz": + type: file + description: Intervals VCF file + pattern: "*.vcf.gz" + - s: + type: file + description: Intervals VCF file + pattern: "*.vcf.gz" + - segments: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_genotyped_segments.vcf.gz": + type: file + description: Segments VCF file + pattern: "*.vcf.gz" + - denoised: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_denoised.vcf.gz": + type: file + description: Denoised copy ratio file + pattern: "*.vcf.gz" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ryanjameskennedy" maintainers: diff --git a/modules/nf-core/gatk4/printreads/environment.yml b/modules/nf-core/gatk4/printreads/environment.yml index d1dd0b3e9..55993f440 100644 --- a/modules/nf-core/gatk4/printreads/environment.yml +++ b/modules/nf-core/gatk4/printreads/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_printreads channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/printreads/meta.yml b/modules/nf-core/gatk4/printreads/meta.yml index aca7e1887..de8da7c56 100644 --- a/modules/nf-core/gatk4/printreads/meta.yml +++ b/modules/nf-core/gatk4/printreads/meta.yml @@ -16,69 +16,84 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - index: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bai,crai,sai}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: reference fasta file - pattern: "*.{fa,fasta}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: reference fasta index file - pattern: "*.{fai}" - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - dict: - type: file - description: reference fasta dictionary file - pattern: "*.{dict}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - index: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bai,crai,sai}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: reference fasta file + pattern: "*.{fa,fasta}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: reference fasta index file + pattern: "*.{fai}" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - dict: + type: file + description: reference fasta dictionary file + pattern: "*.{dict}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - bam: - type: file - description: Sorted BAM file - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.bam: + type: file + description: Sorted BAM file + pattern: "*.{bam}" - cram: - type: file - description: Sorted CRAM file - pattern: "*.{cram}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.cram: + type: file + description: Sorted CRAM file + pattern: "*.{cram}" - sam: - type: file - description: Sorted SAM file - pattern: "*.{sam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.sam: + type: file + description: Sorted SAM file + pattern: "*.{sam}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/gatk4/printreads/tests/main.nf.test b/modules/nf-core/gatk4/printreads/tests/main.nf.test new file mode 100644 index 000000000..c07886197 --- /dev/null +++ b/modules/nf-core/gatk4/printreads/tests/main.nf.test @@ -0,0 +1,95 @@ + +nextflow_process { + + name "Test Process GATK4_PRINTREADS" + script "../main.nf" + process "GATK4_PRINTREADS" + + tag "modules" + tag "modules_nfcore" + tag "gatk4" + tag "gatk4/printreads" + + test("test-gatk4-printreads-bam") { + + when { + process { + """ + input[0] = [ + [ 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] = [ [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + + input[2] = [ [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + + input[3] = [ [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.cram, + process.out.sam, + process.out.versions + ).match() + } + ) + } + } + + test("test-gatk4-printreads-cram") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'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 + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.bam, + bam(process.out.cram[0][1]).getHeaderMD5(), + process.out.sam, + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/gatk4/printreads/tests/main.nf.test.snap b/modules/nf-core/gatk4/printreads/tests/main.nf.test.snap new file mode 100644 index 000000000..7f1266f26 --- /dev/null +++ b/modules/nf-core/gatk4/printreads/tests/main.nf.test.snap @@ -0,0 +1,40 @@ +{ + "test-gatk4-printreads-bam": { + "content": [ + "894549ee3ced6b5ca2eed2563a985217", + [ + + ], + [ + + ], + [ + "versions.yml:md5,9b368270d802ed95c530a7f0105f6453" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T11:48:53.871683" + }, + "test-gatk4-printreads-cram": { + "content": [ + [ + + ], + "591299d00e262474250c5ccc241bba59", + [ + + ], + [ + "versions.yml:md5,9b368270d802ed95c530a7f0105f6453" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T13:42:29.968056" + } +} \ No newline at end of file diff --git a/modules/nf-core/gatk4/revertsam/environment.yml b/modules/nf-core/gatk4/revertsam/environment.yml index f169a89a0..55993f440 100644 --- a/modules/nf-core/gatk4/revertsam/environment.yml +++ b/modules/nf-core/gatk4/revertsam/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_revertsam channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/revertsam/meta.yml b/modules/nf-core/gatk4/revertsam/meta.yml index ac6c0d0f0..fb73b13f7 100644 --- a/modules/nf-core/gatk4/revertsam/meta.yml +++ b/modules/nf-core/gatk4/revertsam/meta.yml @@ -14,25 +14,32 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test'] - - bam: - type: file - description: The input bam/sam file - pattern: "*.{bam,sam}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - bam: + type: file + description: The input bam/sam file + pattern: "*.{bam,sam}" output: - bam: - type: file - description: The reverted bam/sam file - pattern: "*.reverted.bam" + - meta: + type: file + description: The reverted bam/sam file + pattern: "*.reverted.bam" + - "*.bam": + type: file + description: The reverted bam/sam file + pattern: "*.reverted.bam" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@kevinmenden" maintainers: diff --git a/modules/nf-core/gatk4/revertsam/tests/main.nf.test b/modules/nf-core/gatk4/revertsam/tests/main.nf.test new file mode 100644 index 000000000..b52680485 --- /dev/null +++ b/modules/nf-core/gatk4/revertsam/tests/main.nf.test @@ -0,0 +1,59 @@ + +nextflow_process { + + name "Test Process GATK4_REVERTSAM" + script "../main.nf" + process "GATK4_REVERTSAM" + + tag "modules" + tag "modules_nfcore" + tag "gatk4" + tag "gatk4/revertsam" + + test("test-gatk4-revertsam") { + + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.versions + ).match() + } + ) + } + } + + test("test-gatk4-revertsam-stubs") { + options '-stub' + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/gatk4/revertsam/tests/main.nf.test.snap b/modules/nf-core/gatk4/revertsam/tests/main.nf.test.snap new file mode 100644 index 000000000..1cbb5ce6e --- /dev/null +++ b/modules/nf-core/gatk4/revertsam/tests/main.nf.test.snap @@ -0,0 +1,48 @@ +{ + "test-gatk4-revertsam": { + "content": [ + "e3cfa46b13cc4fc425cccae944f43b10", + [ + "versions.yml:md5,ee8dfa21abb49349e4865984cc122b9e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T11:45:39.712635" + }, + "test-gatk4-revertsam-stubs": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.reverted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,ee8dfa21abb49349e4865984cc122b9e" + ], + "bam": [ + [ + { + "id": "test" + }, + "test.reverted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,ee8dfa21abb49349e4865984cc122b9e" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T11:45:46.856318" + } +} \ No newline at end of file diff --git a/modules/nf-core/gatk4/samtofastq/environment.yml b/modules/nf-core/gatk4/samtofastq/environment.yml index 1f881bb7c..55993f440 100644 --- a/modules/nf-core/gatk4/samtofastq/environment.yml +++ b/modules/nf-core/gatk4/samtofastq/environment.yml @@ -1,7 +1,5 @@ -name: gatk4_samtofastq channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gatk4=4.5.0.0 diff --git a/modules/nf-core/gatk4/samtofastq/meta.yml b/modules/nf-core/gatk4/samtofastq/meta.yml index b61ef4fc9..91a8e503f 100644 --- a/modules/nf-core/gatk4/samtofastq/meta.yml +++ b/modules/nf-core/gatk4/samtofastq/meta.yml @@ -14,25 +14,32 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s doi: 10.1158/1538-7445.AM2017-3590 licence: ["Apache-2.0"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test'] - - bam: - type: file - description: Input SAM/BAM file - pattern: "*.{bam,sam}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - bam: + type: file + description: Input SAM/BAM file + pattern: "*.{bam,sam}" output: - fastq: - type: file - description: converted fastq file - pattern: "*.fastq" + - meta: + type: file + description: converted fastq file + pattern: "*.fastq" + - "*.fastq.gz": + type: file + description: converted fastq file + pattern: "*.fastq" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@kevinmenden" maintainers: diff --git a/modules/nf-core/gatk4/samtofastq/tests/main.nf.test b/modules/nf-core/gatk4/samtofastq/tests/main.nf.test new file mode 100644 index 000000000..30a41addd --- /dev/null +++ b/modules/nf-core/gatk4/samtofastq/tests/main.nf.test @@ -0,0 +1,88 @@ + +nextflow_process { + + name "Test Process GATK4_SAMTOFASTQ" + script "../main.nf" + process "GATK4_SAMTOFASTQ" + + tag "modules" + tag "modules_nfcore" + tag "gatk4" + tag "gatk4/samtofastq" + + test("test-gatk4-samtofastq-single-end") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end: true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.bam', checkIfExists: true) ] + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.fastq[0][1]).linesGzip[3..7], + process.out.versions + ).match() + } + ) + } + } + + test("test-gatk4-samtofastq-paired-end") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end: false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) ] + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.fastq[0][1].collect { path(it).linesGzip[3..7] }, + process.out.versions + ).match() + } + ) + } + } + + test("test-gatk4-samtofastq-paired-end-stubs") { + options '-stub' + when { + process { + """ + input[0] = [ [ id:'test', single_end: true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.bam', checkIfExists: true) ] + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.fastq[0][1].collect { file(it).name }, + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/gatk4/samtofastq/tests/main.nf.test.snap b/modules/nf-core/gatk4/samtofastq/tests/main.nf.test.snap new file mode 100644 index 000000000..0e1ec4b79 --- /dev/null +++ b/modules/nf-core/gatk4/samtofastq/tests/main.nf.test.snap @@ -0,0 +1,66 @@ +{ + "test-gatk4-samtofastq-single-end": { + "content": [ + [ + "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE ${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/meta.yml b/modules/nf-core/mosdepth/meta.yml index 9caaf2cdb..dc783c900 100644 --- a/modules/nf-core/mosdepth/meta.yml +++ b/modules/nf-core/mosdepth/meta.yml @@ -12,91 +12,161 @@ tools: documentation: https://github.com/brentp/mosdepth doi: 10.1093/bioinformatics/btx699 licence: ["MIT"] + identifier: biotools:mosdepth input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Input BAM/CRAM file - pattern: "*.{bam,cram}" - - bai: - type: file - description: Index for BAM/CRAM file - pattern: "*.{bai,crai}" - - bed: - type: file - description: BED file with intersected intervals - pattern: "*.{bed}" - - meta2: - type: map - description: | - Groovy Map containing bed information - e.g. [ id:'test' ] - - fasta: - type: file - description: Reference genome FASTA file - pattern: "*.{fa,fasta}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input BAM/CRAM file + pattern: "*.{bam,cram}" + - bai: + type: file + description: Index for BAM/CRAM file + pattern: "*.{bai,crai}" + - bed: + type: file + description: BED file with intersected intervals + pattern: "*.{bed}" + - - meta2: + type: map + description: | + Groovy Map containing bed information + e.g. [ id:'test' ] + - fasta: + type: file + description: Reference genome FASTA file + pattern: "*.{fa,fasta}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - global_txt: - type: file - description: Text file with global cumulative coverage distribution - pattern: "*.{global.dist.txt}" - - regions_txt: - type: file - description: Text file with region cumulative coverage distribution - pattern: "*.{region.dist.txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.global.dist.txt": + type: file + description: Text file with global cumulative coverage distribution + pattern: "*.{global.dist.txt}" - summary_txt: - type: file - description: Text file with summary mean depths per chromosome and regions - pattern: "*.{summary.txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.summary.txt": + type: file + description: Text file with summary mean depths per chromosome and regions + pattern: "*.{summary.txt}" + - regions_txt: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.region.dist.txt": + type: file + description: Text file with region cumulative coverage distribution + pattern: "*.{region.dist.txt}" + - per_base_d4: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.per-base.d4": + type: file + description: D4 file with per-base coverage + pattern: "*.{per-base.d4}" - per_base_bed: - type: file - description: BED file with per-base coverage - pattern: "*.{per-base.bed.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.per-base.bed.gz": + type: file + description: BED file with per-base coverage + pattern: "*.{per-base.bed.gz}" - per_base_csi: - type: file - description: Index file for BED file with per-base coverage - pattern: "*.{per-base.bed.gz.csi}" - - per_base_d4: - type: file - description: D4 file with per-base coverage - pattern: "*.{per-base.d4}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.per-base.bed.gz.csi": + type: file + description: Index file for BED file with per-base coverage + pattern: "*.{per-base.bed.gz.csi}" - regions_bed: - type: file - description: BED file with per-region coverage - pattern: "*.{regions.bed.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.regions.bed.gz": + type: file + description: BED file with per-region coverage + pattern: "*.{regions.bed.gz}" - regions_csi: - type: file - description: Index file for BED file with per-region coverage - pattern: "*.{regions.bed.gz.csi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.regions.bed.gz.csi": + type: file + description: Index file for BED file with per-region coverage + pattern: "*.{regions.bed.gz.csi}" - quantized_bed: - type: file - description: BED file with binned coverage - pattern: "*.{quantized.bed.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.quantized.bed.gz": + type: file + description: BED file with binned coverage + pattern: "*.{quantized.bed.gz}" - quantized_csi: - type: file - description: Index file for BED file with binned coverage - pattern: "*.{quantized.bed.gz.csi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.quantized.bed.gz.csi": + type: file + description: Index file for BED file with binned coverage + pattern: "*.{quantized.bed.gz.csi}" - thresholds_bed: - type: file - description: BED file with the number of bases in each region that are covered at or above each threshold - pattern: "*.{thresholds.bed.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.thresholds.bed.gz": + type: file + description: BED file with the number of bases in each region that are covered + at or above each threshold + pattern: "*.{thresholds.bed.gz}" - thresholds_csi: - type: file - description: Index file for BED file with threshold coverage - pattern: "*.{thresholds.bed.gz.csi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.thresholds.bed.gz.csi": + type: file + description: Index file for BED file with threshold coverage + pattern: "*.{thresholds.bed.gz.csi}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/mosdepth/tests/main.nf.test b/modules/nf-core/mosdepth/tests/main.nf.test index d991f819a..0b3c860d3 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 dc4d95085..c604540b0 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/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index ca39fb67e..f1cd99b07 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -1,7 +1,5 @@ -name: multiqc channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::multiqc=1.21 + - bioconda::multiqc=1.24.1 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 47ac352f9..b9ccebdbb 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -3,14 +3,16 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.21--pyhdfd78af_0' : - 'biocontainers/multiqc:1.21--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.25--pyhdfd78af_0' : + 'biocontainers/multiqc:1.25--pyhdfd78af_0' }" input: path multiqc_files, stageAs: "?/*" path(multiqc_config) path(extra_multiqc_config) path(multiqc_logo) + path(replace_names) + path(sample_names) output: path "*multiqc_report.html", emit: report @@ -23,16 +25,22 @@ process MULTIQC { script: def args = task.ext.args ?: '' + def prefix = task.ext.prefix ? "--filename ${task.ext.prefix}.html" : '' def config = multiqc_config ? "--config $multiqc_config" : '' def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' - def logo = multiqc_logo ? /--cl-config 'custom_logo: "${multiqc_logo}"'/ : '' + def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : '' + def replace = replace_names ? "--replace-names ${replace_names}" : '' + def samples = sample_names ? "--sample-names ${sample_names}" : '' """ multiqc \\ --force \\ $args \\ $config \\ + $prefix \\ $extra_config \\ $logo \\ + $replace \\ + $samples \\ . cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index 45a9bc35e..b16c18792 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,5 +1,6 @@ name: multiqc -description: Aggregate results from bioinformatics analyses across many samples into a single report +description: Aggregate results from bioinformatics analyses across many samples into + a single report keywords: - QC - bioinformatics tools @@ -12,40 +13,59 @@ tools: homepage: https://multiqc.info/ documentation: https://multiqc.info/docs/ licence: ["GPL-3.0-or-later"] + identifier: biotools:multiqc input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections in multiqc_config. - pattern: "*.{yml,yaml}" - - multiqc_logo: - type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" + - - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + - - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + - - extra_multiqc_config: + type: file + description: Second optional config yml for MultiQC. Will override common sections + in multiqc_config. + pattern: "*.{yml,yaml}" + - - multiqc_logo: + type: file + description: Optional logo file for MultiQC + pattern: "*.{png}" + - - replace_names: + type: file + description: | + Optional two-column sample renaming file. First column a set of + patterns, second column a set of corresponding replacements. Passed via + MultiQC's `--replace-names` option. + pattern: "*.{tsv}" + - - sample_names: + type: file + description: | + Optional TSV file with headers, passed to the MultiQC --sample_names + argument. + pattern: "*.{tsv}" output: - report: - type: file - description: MultiQC report file - pattern: "multiqc_report.html" + - "*multiqc_report.html": + type: file + description: MultiQC report file + pattern: "multiqc_report.html" - data: - type: directory - description: MultiQC data dir - pattern: "multiqc_data" + - "*_data": + type: directory + description: MultiQC data dir + pattern: "multiqc_data" - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" + - "*_plots": + type: file + description: Plots created by MultiQC + pattern: "*_data" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" - "@bunop" diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index f1c4242ef..33316a7dd 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -8,6 +8,8 @@ nextflow_process { tag "modules_nfcore" tag "multiqc" + config "./nextflow.config" + test("sarscov2 single-end [fastqc]") { when { @@ -17,6 +19,8 @@ nextflow_process { input[1] = [] input[2] = [] input[3] = [] + input[4] = [] + input[5] = [] """ } } @@ -41,6 +45,8 @@ nextflow_process { input[1] = Channel.of(file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true)) input[2] = [] input[3] = [] + input[4] = [] + input[5] = [] """ } } @@ -66,6 +72,8 @@ nextflow_process { input[1] = [] input[2] = [] input[3] = [] + input[4] = [] + input[5] = [] """ } } diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index bfebd8029..b779e4692 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -2,14 +2,14 @@ "multiqc_versions_single": { "content": [ [ - "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" + "versions.yml:md5,8c8724363a5efe0c6f43ab34faa57efd" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-29T08:48:55.657331" + "timestamp": "2024-07-10T12:41:34.562023" }, "multiqc_stub": { "content": [ @@ -17,25 +17,25 @@ "multiqc_report.html", "multiqc_data", "multiqc_plots", - "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" + "versions.yml:md5,8c8724363a5efe0c6f43ab34faa57efd" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-29T08:49:49.071937" + "timestamp": "2024-07-10T11:27:11.933869532" }, "multiqc_versions_config": { "content": [ [ - "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" + "versions.yml:md5,8c8724363a5efe0c6f43ab34faa57efd" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-29T08:49:25.457567" + "timestamp": "2024-07-10T11:26:56.709849369" } -} \ No newline at end of file +} diff --git a/modules/nf-core/multiqc/tests/nextflow.config b/modules/nf-core/multiqc/tests/nextflow.config new file mode 100644 index 000000000..c537a6a3e --- /dev/null +++ b/modules/nf-core/multiqc/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'MULTIQC' { + ext.prefix = null + } +} diff --git a/modules/nf-core/ngsbits/samplegender/environment.yml b/modules/nf-core/ngsbits/samplegender/environment.yml index 486c233c2..932d1556a 100644 --- a/modules/nf-core/ngsbits/samplegender/environment.yml +++ b/modules/nf-core/ngsbits/samplegender/environment.yml @@ -1,7 +1,5 @@ -name: ngsbits_samplegender channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::ngs-bits=2023_02 diff --git a/modules/nf-core/ngsbits/samplegender/meta.yml b/modules/nf-core/ngsbits/samplegender/meta.yml index 961462b3f..54a611812 100644 --- a/modules/nf-core/ngsbits/samplegender/meta.yml +++ b/modules/nf-core/ngsbits/samplegender/meta.yml @@ -1,4 +1,3 @@ ---- name: "ngsbits_samplegender" description: Determines the gender of a sample from the BAM/CRAM file. keywords: @@ -13,56 +12,60 @@ tools: documentation: "https://github.com/imgag/ngs-bits" tool_dev_url: "https://github.com/imgag/ngs-bits" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: One or more BAM/CRAM files to determine the gender of - pattern: "*.{bam,cram}" - - bai: - type: file - description: The index file(s) from the input BAM/CRAM file(s) - pattern: "*.{bai,crai}" - - meta2: - type: map - description: | - Groovy Map containing reference fasta information - e.g. [ id:'test' ] - - fasta: - type: file - description: The reference FASTA to use (mandatory when CRAM files are used) - pattern: "*.{fasta,fa,fna}" - - meta3: - type: map - description: | - Groovy Map containing reference fasta index information - e.g. [ id:'test' ] - - fasta: - type: file - description: The index of the reference FASTA to use (mandatory when CRAM files are used) - pattern: "*.fai" - - method: - type: string - description: The method to use to define the gender (posibilities are 'xy', 'hetx' and 'sry') - pattern: "(xy|hetx|sry)" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: One or more BAM/CRAM files to determine the gender of + pattern: "*.{bam,cram}" + - bai: + type: file + description: The index file(s) from the input BAM/CRAM file(s) + pattern: "*.{bai,crai}" + - - meta2: + type: map + description: | + Groovy Map containing reference fasta information + e.g. [ id:'test' ] + - fasta: + type: file + description: The reference FASTA to use (mandatory when CRAM files are used) + pattern: "*.{fasta,fa,fna}" + - - meta2: + type: map + description: | + Groovy Map containing reference fasta information + e.g. [ id:'test' ] + - fai: + type: file + description: The index file from the reference FASTA + pattern: "*.fai" + - - method: + type: string + description: The method to use to define the gender (posibilities are 'xy', + 'hetx' and 'sry') + pattern: "(xy|hetx|sry)" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - tsv: - type: file - description: An output TSV file containing the results of the gender prediction - pattern: "*.tsv" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tsv": + type: file + description: An output TSV file containing the results of the gender prediction + pattern: "*.tsv" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@nvnieuwk" maintainers: diff --git a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test index 2cf4757b9..4f8379b40 100644 --- a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test +++ b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test @@ -19,8 +19,8 @@ nextflow_process { """ input[0] = [ [ 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.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:'reference'], // meta map diff --git a/modules/nf-core/peddy/environment.yml b/modules/nf-core/peddy/environment.yml index 00e7cebe6..8d7fa2b6a 100644 --- a/modules/nf-core/peddy/environment.yml +++ b/modules/nf-core/peddy/environment.yml @@ -1,7 +1,5 @@ -name: peddy channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::peddy=0.4.8 diff --git a/modules/nf-core/peddy/meta.yml b/modules/nf-core/peddy/meta.yml index 24a82e190..6b6b7347d 100644 --- a/modules/nf-core/peddy/meta.yml +++ b/modules/nf-core/peddy/meta.yml @@ -6,56 +6,78 @@ keywords: - family tools: - peddy: - description: genotype, ped correspondence check, ancestry check, sex check. directly, quickly on VCF + description: genotype, ped correspondence check, ancestry check, sex check. directly, + quickly on VCF homepage: https://github.com/brentp/peddy documentation: https://peddy.readthedocs.io/en/latest/ tool_dev_url: https://github.com/brentp/peddy doi: "10.1016/j.ajhg.2017.01.017" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF file - pattern: "*.{vcf.gz}" - - ped: - type: file - description: PED/FAM file - pattern: "*.{ped,fam}" - - vcf_tbi: - type: file - description: TBI file - pattern: "*.{vcf.gz.tbi}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file + pattern: "*.{vcf.gz}" + - vcf_tbi: + type: file + description: TBI file + pattern: "*.{vcf.gz.tbi}" + - - ped: + type: file + description: PED/FAM file + pattern: "*.{ped,fam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ped: - type: file - description: PED/FAM file - pattern: "*.peddy.{ped}" - html: - type: file - description: HTML file - pattern: "*.{html}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.html": + type: file + description: HTML file + pattern: "*.{html}" - csv: - type: file - description: CSV file - pattern: "*.{csv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csv": + type: file + description: CSV file + pattern: "*.{csv}" + - ped: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.peddy.ped": + type: file + description: PED/FAM file + pattern: "*.peddy.{ped}" - png: - type: file - description: PNG file - pattern: "*.{png}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.png": + type: file + description: PNG file + pattern: "*.{png}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@rannick" maintainers: diff --git a/modules/nf-core/peddy/tests/main.nf.test b/modules/nf-core/peddy/tests/main.nf.test index 892da6cf9..21ff538d1 100644 --- a/modules/nf-core/peddy/tests/main.nf.test +++ b/modules/nf-core/peddy/tests/main.nf.test @@ -17,10 +17,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], - file(params.test_data['homo_sapiens']['genome']['justhusky_minimal_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['justhusky_minimal_vcf_gz_tbi'], 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_minimal.vcf.gz.tbi', checkIfExists: true) ] - input[1] = file(params.test_data['homo_sapiens']['genome']['justhusky_ped'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky.ped', checkIfExists: true) """ } } diff --git a/modules/nf-core/picard/addorreplacereadgroups/environment.yml b/modules/nf-core/picard/addorreplacereadgroups/environment.yml index d7d2c6c03..ff4a85edb 100644 --- a/modules/nf-core/picard/addorreplacereadgroups/environment.yml +++ b/modules/nf-core/picard/addorreplacereadgroups/environment.yml @@ -1,7 +1,5 @@ -name: picard_addorreplacereadgroups channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/addorreplacereadgroups/main.nf b/modules/nf-core/picard/addorreplacereadgroups/main.nf index 4300ba7f8..3f03c6808 100644 --- a/modules/nf-core/picard/addorreplacereadgroups/main.nf +++ b/modules/nf-core/picard/addorreplacereadgroups/main.nf @@ -4,8 +4,8 @@ process PICARD_ADDORREPLACEREADGROUPS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta), path(reads) diff --git a/modules/nf-core/picard/addorreplacereadgroups/meta.yml b/modules/nf-core/picard/addorreplacereadgroups/meta.yml index efd5b86dc..77ce85035 100644 --- a/modules/nf-core/picard/addorreplacereadgroups/meta.yml +++ b/modules/nf-core/picard/addorreplacereadgroups/meta.yml @@ -14,56 +14,71 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037226472-AddOrReplaceReadGroups-Picard- tool_dev_url: https://github.com/broadinstitute/picard licence: ["MIT"] + identifier: biotools:picard_tools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta3: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Sequence reads file, can be SAM/BAM/CRAM format - pattern: "*.{bam,cram,sam}" - - fasta: - type: file - description: Reference genome file - pattern: "*.{fasta,fa,fasta.gz,fa.gz}" - - fasta_index: - type: file - description: Reference genome index file - pattern: "*.{fai,fasta.fai,fa.fai,fasta.gz.fai,fa.gz.fai}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Sequence reads file, can be SAM/BAM/CRAM format + pattern: "*.{bam,cram,sam}" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Reference genome file + pattern: "*.{fasta,fa,fasta.gz,fa.gz}" + - - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta_index: + type: file + description: Reference genome index file + pattern: "*.{fai,fasta.fai,fa.fai,fasta.gz.fai,fa.gz.fai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - bam: - type: file - description: Output BAM file - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: Output BAM file + pattern: "*.{bam}" - bai: - type: file - description: An optional BAM index file - pattern: "*.{bai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bai": + type: file + description: An optional BAM index file + pattern: "*.{bai}" - cram: - type: file - description: Output CRAM file - pattern: "*.{cram}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.cram": + type: file + description: Output CRAM file + pattern: "*.{cram}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@sateeshperi" - "@mjcipriano" diff --git a/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test.snap b/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test.snap index 63a55843c..f823197d2 100644 --- a/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test.snap +++ b/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test.snap @@ -3,14 +3,14 @@ "content": [ "test.replaced.cram", [ - "versions.yml:md5,0a6f049f94501dcf23aabfbc0e272891" + "versions.yml:md5,7ec6e56d1d70ed028928dc82b32b27cd" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-21T12:05:47.668865" + "timestamp": "2024-07-10T09:54:40.471730168" }, "sarscov2 - bam - stub": { "content": [ @@ -30,7 +30,7 @@ ], "3": [ - "versions.yml:md5,0a6f049f94501dcf23aabfbc0e272891" + "versions.yml:md5,7ec6e56d1d70ed028928dc82b32b27cd" ], "bai": [ @@ -47,28 +47,28 @@ ], "versions": [ - "versions.yml:md5,0a6f049f94501dcf23aabfbc0e272891" + "versions.yml:md5,7ec6e56d1d70ed028928dc82b32b27cd" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-21T10:51:24.530553" + "timestamp": "2024-07-10T09:55:08.402649243" }, "sarscov2 - bam": { "content": [ "null.replaced.bam", "null.replaced.bai", [ - "versions.yml:md5,0a6f049f94501dcf23aabfbc0e272891" + "versions.yml:md5,7ec6e56d1d70ed028928dc82b32b27cd" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-21T12:05:29.696728" + "timestamp": "2024-07-10T09:54:22.239968953" } } \ No newline at end of file diff --git a/modules/nf-core/picard/collecthsmetrics/environment.yml b/modules/nf-core/picard/collecthsmetrics/environment.yml index fbeab71bb..ff4a85edb 100644 --- a/modules/nf-core/picard/collecthsmetrics/environment.yml +++ b/modules/nf-core/picard/collecthsmetrics/environment.yml @@ -1,7 +1,5 @@ -name: picard_collecthsmetrics channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/collecthsmetrics/main.nf b/modules/nf-core/picard/collecthsmetrics/main.nf index b798452de..a9cbafd44 100644 --- a/modules/nf-core/picard/collecthsmetrics/main.nf +++ b/modules/nf-core/picard/collecthsmetrics/main.nf @@ -4,11 +4,11 @@ process PICARD_COLLECTHSMETRICS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(bai), path(bait_intervals), path(target_intervals) + tuple val(meta), path(bam), path(bai), path(bait_intervals, stageAs: "baits/*"), path(target_intervals, stageAs: 'targets/*') tuple val(meta2), path(fasta) tuple val(meta3), path(fai) tuple val(meta4), path(dict) diff --git a/modules/nf-core/picard/collecthsmetrics/meta.yml b/modules/nf-core/picard/collecthsmetrics/meta.yml index 4b296fe09..ea6deda3e 100644 --- a/modules/nf-core/picard/collecthsmetrics/meta.yml +++ b/modules/nf-core/picard/collecthsmetrics/meta.yml @@ -17,71 +17,75 @@ tools: documentation: https://broadinstitute.github.io/picard/ tool_dev_url: https://github.com/broadinstitute/picard/ licence: ["MIT"] + identifier: biotools:picard_tools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: An aligned BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - bai: - type: file - description: Optional aligned BAM/CRAM/SAM file index - pattern: "*.{bai,crai,sai}" - - bait_intervals: - type: file - description: An interval file that contains the locations of the baits used. - pattern: "*.{interval_list,bed,bed.gz}" - - target_intervals: - type: file - description: An interval file that contains the locations of the targets. - pattern: "*.{interval_list,bed,bed.gz}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: | - A reference file to calculate dropout metrics measuring reduced representation of reads. - Optional input. - pattern: "*.{fa,fasta,fna}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Index of FASTA file. Only needed when fasta is supplied. - pattern: "*.fai" - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Sequence dictionary of FASTA file. Only needed when bed interval lists are supplied. - pattern: "*.dict" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: An aligned BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - bai: + type: file + description: Optional aligned BAM/CRAM/SAM file index + pattern: "*.{bai,crai,sai}" + - bait_intervals: + type: file + description: An interval file that contains the locations of the baits used. + pattern: "*.{interval_list,bed,bed.gz}" + - target_intervals: + type: file + description: An interval file that contains the locations of the targets. + pattern: "*.{interval_list,bed,bed.gz}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: | + A reference file to calculate dropout metrics measuring reduced representation of reads. + Optional input. + pattern: "*.{fa,fasta,fna}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Index of FASTA file. Only needed when fasta is supplied. + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - dict: + type: file + description: Sequence dictionary of FASTA file. Only needed when bed interval + lists are supplied. + pattern: "*.dict" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - metrics: - type: file - description: Alignment metrics files generated by picard - pattern: "*_{metrics}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_metrics": + type: file + description: Alignment metrics files generated by picard + pattern: "*_{metrics}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@projectoriented" - "@matthdsm" diff --git a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test new file mode 100644 index 000000000..3bbbd8cf5 --- /dev/null +++ b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test @@ -0,0 +1,191 @@ +nextflow_process { + + name "Test Process PICARD_COLLECTHSMETRICS" + script "../main.nf" + process "PICARD_COLLECTHSMETRICS" + + tag "modules" + tag "modules_nfcore" + tag "picard" + tag "picard/collecthsmetrics" + + test("sarscov2 - bam") { + + when { + process { + """ + input[0] = [ + [ 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), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/targets.interval_list', checkIfExists: true) + ] + input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + """ + } + } + + then { + def size = path(process.out.metrics[0][1]).size() + def lines = path(process.out.metrics[0][1]).readLines()[0..100] + lines.remove(3) // remove timestamp + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.metrics[0][1]).name, + size, + lines, + process.out.versions + ).match() + } + ) + } + + } + + test("sarscov2 - bam - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ 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), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/targets.interval_list', checkIfExists: true) + ] + input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + + test("sarscov2 - bam - nofasta") { + + when { + process { + """ + input[0] = [ + [ 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), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/targets.interval_list', checkIfExists: true) + ] + input[1] = [[:],[]] + input[2] = [[:],[]] + input[3] = [[:],[]] + """ + } + } + + then { + def size = path(process.out.metrics[0][1]).size() + def lines = path(process.out.metrics[0][1]).readLines()[0..100] + lines.remove(3) // remove timestamp + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.metrics[0][1]).name, + size, + lines, + process.out.versions + ).match() + } + ) + } + + } + + test("sarscov2 - bam - bed") { + + when { + process { + """ + input[0] = [ + [ 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), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/baits.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) + ] + + input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + """ + } + } + + then { + def size = path(process.out.metrics[0][1]).size() + def lines = path(process.out.metrics[0][1]).readLines()[0..100] + lines.remove(3) // remove timestamp + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.metrics[0][1]).name, + size, + lines, + process.out.versions + ).match() + } + ) + } + + } + + test("sarscov2 - bam - samebed") { + + when { + process { + """ + input[0] = [ + [ 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), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/baits.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/baits.bed', checkIfExists: true) + ] + + input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] + input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + """ + } + } + + then { + def size = path(process.out.metrics[0][1]).size() + def lines = path(process.out.metrics[0][1]).readLines()[0..100] + lines.remove(3) // remove timestamp + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.metrics[0][1]).name, + size, + lines, + process.out.versions + ).match() + } + ) + } + + } +} \ No newline at end of file diff --git a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap new file mode 100644 index 000000000..53855d13b --- /dev/null +++ b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap @@ -0,0 +1,478 @@ +{ + "sarscov2 - bam - nofasta": { + "content": [ + "test.CollectHsMetrics.coverage_metrics", + 3548, + [ + "## htsjdk.samtools.metrics.StringHeader", + "# CollectHsMetrics --BAIT_INTERVALS baits/baits.interval_list --TARGET_INTERVALS targets/targets.interval_list --INPUT test.paired_end.sorted.bam --OUTPUT test.CollectHsMetrics.coverage_metrics --METRIC_ACCUMULATION_LEVEL ALL_READS --NEAR_DISTANCE 250 --MINIMUM_MAPPING_QUALITY 20 --MINIMUM_BASE_QUALITY 20 --CLIP_OVERLAPPING_READS true --INCLUDE_INDELS false --COVERAGE_CAP 200 --SAMPLE_SIZE 10000 --ALLELE_FRACTION 0.001 --ALLELE_FRACTION 0.005 --ALLELE_FRACTION 0.01 --ALLELE_FRACTION 0.02 --ALLELE_FRACTION 0.05 --ALLELE_FRACTION 0.1 --ALLELE_FRACTION 0.2 --ALLELE_FRACTION 0.3 --ALLELE_FRACTION 0.5 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "## htsjdk.samtools.metrics.StringHeader", + "", + "## METRICS CLASS\tpicard.analysis.directed.HsMetrics", + "BAIT_SET\tBAIT_TERRITORY\tBAIT_DESIGN_EFFICIENCY\tON_BAIT_BASES\tNEAR_BAIT_BASES\tOFF_BAIT_BASES\tPCT_SELECTED_BASES\tPCT_OFF_BAIT\tON_BAIT_VS_SELECTED\tMEAN_BAIT_COVERAGE\tPCT_USABLE_BASES_ON_BAIT\tPCT_USABLE_BASES_ON_TARGET\tFOLD_ENRICHMENT\tHS_LIBRARY_SIZE\tHS_PENALTY_10X\tHS_PENALTY_20X\tHS_PENALTY_30X\tHS_PENALTY_40X\tHS_PENALTY_50X\tHS_PENALTY_100X\tTARGET_TERRITORY\tGENOME_SIZE\tTOTAL_READS\tPF_READS\tPF_BASES\tPF_UNIQUE_READS\tPF_UQ_READS_ALIGNED\tPF_BASES_ALIGNED\tPF_UQ_BASES_ALIGNED\tON_TARGET_BASES\tPCT_PF_READS\tPCT_PF_UQ_READS\tPCT_PF_UQ_READS_ALIGNED\tMEAN_TARGET_COVERAGE\tMEDIAN_TARGET_COVERAGE\tMAX_TARGET_COVERAGE\tMIN_TARGET_COVERAGE\tZERO_CVG_TARGETS_PCT\tPCT_EXC_DUPE\tPCT_EXC_ADAPTER\tPCT_EXC_MAPQ\tPCT_EXC_BASEQ\tPCT_EXC_OVERLAP\tPCT_EXC_OFF_TARGET\tFOLD_80_BASE_PENALTY\tPCT_TARGET_BASES_1X\tPCT_TARGET_BASES_2X\tPCT_TARGET_BASES_10X\tPCT_TARGET_BASES_20X\tPCT_TARGET_BASES_30X\tPCT_TARGET_BASES_40X\tPCT_TARGET_BASES_50X\tPCT_TARGET_BASES_100X\tPCT_TARGET_BASES_250X\tPCT_TARGET_BASES_500X\tPCT_TARGET_BASES_1000X\tPCT_TARGET_BASES_2500X\tPCT_TARGET_BASES_5000X\tPCT_TARGET_BASES_10000X\tPCT_TARGET_BASES_25000X\tPCT_TARGET_BASES_50000X\tPCT_TARGET_BASES_100000X\tAT_DROPOUT\tGC_DROPOUT\tHET_SNP_SENSITIVITY\tHET_SNP_Q\tSAMPLE\tLIBRARY\tREAD_GROUP", + "baits\t158\t0.594937\t725\t3985\t22691\t0.171892\t0.828108\t0.153928\t4.588608\t0.026225\t0.000181\t4.995204\t\t0\t0\t0\t0\t0\t0\t94\t29829\t200\t200\t27645\t200\t197\t27401\t27401\t5\t1\t1\t0.985\t0.053191\t0\t1\t0\t0.75\t0\t0\t0.005438\t0.054487\t0.259516\t0.680377\t?\t0.053191\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0.015734\t0\t\t\t", + "", + "## HISTOGRAM\tjava.lang.Integer", + "coverage_or_base_quality\thigh_quality_coverage_count\tunfiltered_baseq_count", + "0\t89\t0", + "1\t5\t0", + "2\t0\t0", + "3\t0\t0", + "4\t0\t0", + "5\t0\t0", + "6\t0\t0", + "7\t0\t0", + "8\t0\t0", + "9\t0\t0", + "10\t0\t0", + "11\t0\t0", + "12\t0\t0", + "13\t0\t0", + "14\t0\t5", + "15\t0\t0", + "16\t0\t0", + "17\t0\t0", + "18\t0\t0", + "19\t0\t0", + "20\t0\t0", + "21\t0\t1", + "22\t0\t0", + "23\t0\t0", + "24\t0\t0", + "25\t0\t0", + "26\t0\t0", + "27\t0\t0", + "28\t0\t0", + "29\t0\t0", + "30\t0\t0", + "31\t0\t0", + "32\t0\t1", + "33\t0\t0", + "34\t0\t0", + "35\t0\t0", + "36\t0\t3", + "37\t0\t0", + "38\t0\t0", + "39\t0\t0", + "40\t0\t0", + "41\t0\t0", + "42\t0\t0", + "43\t0\t0", + "44\t0\t0", + "45\t0\t0", + "46\t0\t0", + "47\t0\t0", + "48\t0\t0", + "49\t0\t0", + "50\t0\t0", + "51\t0\t0", + "52\t0\t0", + "53\t0\t0", + "54\t0\t0", + "55\t0\t0", + "56\t0\t0", + "57\t0\t0", + "58\t0\t0", + "59\t0\t0", + "60\t0\t0", + "61\t0\t0", + "62\t0\t0", + "63\t0\t0", + "64\t0\t0", + "65\t0\t0", + "66\t0\t0", + "67\t0\t0", + "68\t0\t0", + "69\t0\t0", + "70\t0\t0", + "71\t0\t0", + "72\t0\t0", + "73\t0\t0", + "74\t0\t0", + "75\t0\t0", + "76\t0\t0", + "77\t0\t0", + "78\t0\t0", + "79\t0\t0", + "80\t0\t0", + "81\t0\t0", + "82\t0\t0", + "83\t0\t0", + "84\t0\t0", + "85\t0\t0", + "86\t0\t0", + "87\t0\t0", + "88\t0\t0", + "89\t0\t0" + ], + [ + "versions.yml:md5,e390b048af294086f56621c38ebde05a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-10T09:45:46.991614248" + }, + "versions": { + "content": [ + [ + "versions.yml:md5,e390b048af294086f56621c38ebde05a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-10T09:36:50.350567213" + }, + "sarscov2 - bam - samebed": { + "content": [ + "test.CollectHsMetrics.coverage_metrics", + 3586, + [ + "## htsjdk.samtools.metrics.StringHeader", + "# CollectHsMetrics --BAIT_INTERVALS baits/baits.interval_list --TARGET_INTERVALS targets/baits.interval_list --INPUT test.paired_end.sorted.bam --OUTPUT test.CollectHsMetrics.coverage_metrics --REFERENCE_SEQUENCE genome.fasta --METRIC_ACCUMULATION_LEVEL ALL_READS --NEAR_DISTANCE 250 --MINIMUM_MAPPING_QUALITY 20 --MINIMUM_BASE_QUALITY 20 --CLIP_OVERLAPPING_READS true --INCLUDE_INDELS false --COVERAGE_CAP 200 --SAMPLE_SIZE 10000 --ALLELE_FRACTION 0.001 --ALLELE_FRACTION 0.005 --ALLELE_FRACTION 0.01 --ALLELE_FRACTION 0.02 --ALLELE_FRACTION 0.05 --ALLELE_FRACTION 0.1 --ALLELE_FRACTION 0.2 --ALLELE_FRACTION 0.3 --ALLELE_FRACTION 0.5 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "## htsjdk.samtools.metrics.StringHeader", + "", + "## METRICS CLASS\tpicard.analysis.directed.HsMetrics", + "BAIT_SET\tBAIT_TERRITORY\tBAIT_DESIGN_EFFICIENCY\tON_BAIT_BASES\tNEAR_BAIT_BASES\tOFF_BAIT_BASES\tPCT_SELECTED_BASES\tPCT_OFF_BAIT\tON_BAIT_VS_SELECTED\tMEAN_BAIT_COVERAGE\tPCT_USABLE_BASES_ON_BAIT\tPCT_USABLE_BASES_ON_TARGET\tFOLD_ENRICHMENT\tHS_LIBRARY_SIZE\tHS_PENALTY_10X\tHS_PENALTY_20X\tHS_PENALTY_30X\tHS_PENALTY_40X\tHS_PENALTY_50X\tHS_PENALTY_100X\tTARGET_TERRITORY\tGENOME_SIZE\tTOTAL_READS\tPF_READS\tPF_BASES\tPF_UNIQUE_READS\tPF_UQ_READS_ALIGNED\tPF_BASES_ALIGNED\tPF_UQ_BASES_ALIGNED\tON_TARGET_BASES\tPCT_PF_READS\tPCT_PF_UQ_READS\tPCT_PF_UQ_READS_ALIGNED\tMEAN_TARGET_COVERAGE\tMEDIAN_TARGET_COVERAGE\tMAX_TARGET_COVERAGE\tMIN_TARGET_COVERAGE\tZERO_CVG_TARGETS_PCT\tPCT_EXC_DUPE\tPCT_EXC_ADAPTER\tPCT_EXC_MAPQ\tPCT_EXC_BASEQ\tPCT_EXC_OVERLAP\tPCT_EXC_OFF_TARGET\tFOLD_80_BASE_PENALTY\tPCT_TARGET_BASES_1X\tPCT_TARGET_BASES_2X\tPCT_TARGET_BASES_10X\tPCT_TARGET_BASES_20X\tPCT_TARGET_BASES_30X\tPCT_TARGET_BASES_40X\tPCT_TARGET_BASES_50X\tPCT_TARGET_BASES_100X\tPCT_TARGET_BASES_250X\tPCT_TARGET_BASES_500X\tPCT_TARGET_BASES_1000X\tPCT_TARGET_BASES_2500X\tPCT_TARGET_BASES_5000X\tPCT_TARGET_BASES_10000X\tPCT_TARGET_BASES_25000X\tPCT_TARGET_BASES_50000X\tPCT_TARGET_BASES_100000X\tAT_DROPOUT\tGC_DROPOUT\tHET_SNP_SENSITIVITY\tHET_SNP_Q\tSAMPLE\tLIBRARY\tREAD_GROUP", + "baits\t158\t1\t725\t3985\t22691\t0.171892\t0.828108\t0.153928\t4.588608\t0.026225\t0.013782\t4.995204\t\t0\t0\t0\t0\t0\t0\t158\t29829\t200\t200\t27645\t200\t197\t27401\t27401\t381\t1\t1\t0.985\t2.411392\t2\t3\t2\t0\t0\t0\t0.005438\t0.054487\t0.259516\t0.666655\t1.205696\t1\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t7.018506\t0\t0.394337\t2\t\t\t", + "", + "## HISTOGRAM\tjava.lang.Integer", + "coverage_or_base_quality\thigh_quality_coverage_count\tunfiltered_baseq_count", + "0\t0\t0", + "1\t0\t0", + "2\t93\t0", + "3\t65\t0", + "4\t0\t0", + "5\t0\t0", + "6\t0\t0", + "7\t0\t0", + "8\t0\t0", + "9\t0\t0", + "10\t0\t0", + "11\t0\t0", + "12\t0\t0", + "13\t0\t0", + "14\t0\t28", + "15\t0\t0", + "16\t0\t0", + "17\t0\t0", + "18\t0\t0", + "19\t0\t0", + "20\t0\t0", + "21\t0\t9", + "22\t0\t0", + "23\t0\t0", + "24\t0\t0", + "25\t0\t0", + "26\t0\t0", + "27\t0\t20", + "28\t0\t0", + "29\t0\t0", + "30\t0\t0", + "31\t0\t0", + "32\t0\t90", + "33\t0\t0", + "34\t0\t0", + "35\t0\t0", + "36\t0\t262", + "37\t0\t0", + "38\t0\t0", + "39\t0\t0", + "40\t0\t0", + "41\t0\t0", + "42\t0\t0", + "43\t0\t0", + "44\t0\t0", + "45\t0\t0", + "46\t0\t0", + "47\t0\t0", + "48\t0\t0", + "49\t0\t0", + "50\t0\t0", + "51\t0\t0", + "52\t0\t0", + "53\t0\t0", + "54\t0\t0", + "55\t0\t0", + "56\t0\t0", + "57\t0\t0", + "58\t0\t0", + "59\t0\t0", + "60\t0\t0", + "61\t0\t0", + "62\t0\t0", + "63\t0\t0", + "64\t0\t0", + "65\t0\t0", + "66\t0\t0", + "67\t0\t0", + "68\t0\t0", + "69\t0\t0", + "70\t0\t0", + "71\t0\t0", + "72\t0\t0", + "73\t0\t0", + "74\t0\t0", + "75\t0\t0", + "76\t0\t0", + "77\t0\t0", + "78\t0\t0", + "79\t0\t0", + "80\t0\t0", + "81\t0\t0", + "82\t0\t0", + "83\t0\t0", + "84\t0\t0", + "85\t0\t0", + "86\t0\t0", + "87\t0\t0", + "88\t0\t0", + "89\t0\t0" + ], + [ + "versions.yml:md5,e390b048af294086f56621c38ebde05a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-10T09:46:33.770516478" + }, + "sarscov2 - bam": { + "content": [ + "test.CollectHsMetrics.coverage_metrics", + 3598, + [ + "## htsjdk.samtools.metrics.StringHeader", + "# CollectHsMetrics --BAIT_INTERVALS baits/baits.interval_list --TARGET_INTERVALS targets/targets.interval_list --INPUT test.paired_end.sorted.bam --OUTPUT test.CollectHsMetrics.coverage_metrics --REFERENCE_SEQUENCE genome.fasta --METRIC_ACCUMULATION_LEVEL ALL_READS --NEAR_DISTANCE 250 --MINIMUM_MAPPING_QUALITY 20 --MINIMUM_BASE_QUALITY 20 --CLIP_OVERLAPPING_READS true --INCLUDE_INDELS false --COVERAGE_CAP 200 --SAMPLE_SIZE 10000 --ALLELE_FRACTION 0.001 --ALLELE_FRACTION 0.005 --ALLELE_FRACTION 0.01 --ALLELE_FRACTION 0.02 --ALLELE_FRACTION 0.05 --ALLELE_FRACTION 0.1 --ALLELE_FRACTION 0.2 --ALLELE_FRACTION 0.3 --ALLELE_FRACTION 0.5 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "## htsjdk.samtools.metrics.StringHeader", + "", + "## METRICS CLASS\tpicard.analysis.directed.HsMetrics", + "BAIT_SET\tBAIT_TERRITORY\tBAIT_DESIGN_EFFICIENCY\tON_BAIT_BASES\tNEAR_BAIT_BASES\tOFF_BAIT_BASES\tPCT_SELECTED_BASES\tPCT_OFF_BAIT\tON_BAIT_VS_SELECTED\tMEAN_BAIT_COVERAGE\tPCT_USABLE_BASES_ON_BAIT\tPCT_USABLE_BASES_ON_TARGET\tFOLD_ENRICHMENT\tHS_LIBRARY_SIZE\tHS_PENALTY_10X\tHS_PENALTY_20X\tHS_PENALTY_30X\tHS_PENALTY_40X\tHS_PENALTY_50X\tHS_PENALTY_100X\tTARGET_TERRITORY\tGENOME_SIZE\tTOTAL_READS\tPF_READS\tPF_BASES\tPF_UNIQUE_READS\tPF_UQ_READS_ALIGNED\tPF_BASES_ALIGNED\tPF_UQ_BASES_ALIGNED\tON_TARGET_BASES\tPCT_PF_READS\tPCT_PF_UQ_READS\tPCT_PF_UQ_READS_ALIGNED\tMEAN_TARGET_COVERAGE\tMEDIAN_TARGET_COVERAGE\tMAX_TARGET_COVERAGE\tMIN_TARGET_COVERAGE\tZERO_CVG_TARGETS_PCT\tPCT_EXC_DUPE\tPCT_EXC_ADAPTER\tPCT_EXC_MAPQ\tPCT_EXC_BASEQ\tPCT_EXC_OVERLAP\tPCT_EXC_OFF_TARGET\tFOLD_80_BASE_PENALTY\tPCT_TARGET_BASES_1X\tPCT_TARGET_BASES_2X\tPCT_TARGET_BASES_10X\tPCT_TARGET_BASES_20X\tPCT_TARGET_BASES_30X\tPCT_TARGET_BASES_40X\tPCT_TARGET_BASES_50X\tPCT_TARGET_BASES_100X\tPCT_TARGET_BASES_250X\tPCT_TARGET_BASES_500X\tPCT_TARGET_BASES_1000X\tPCT_TARGET_BASES_2500X\tPCT_TARGET_BASES_5000X\tPCT_TARGET_BASES_10000X\tPCT_TARGET_BASES_25000X\tPCT_TARGET_BASES_50000X\tPCT_TARGET_BASES_100000X\tAT_DROPOUT\tGC_DROPOUT\tHET_SNP_SENSITIVITY\tHET_SNP_Q\tSAMPLE\tLIBRARY\tREAD_GROUP", + "baits\t158\t0.594937\t725\t3985\t22691\t0.171892\t0.828108\t0.153928\t4.588608\t0.026225\t0.000181\t4.995204\t\t0\t0\t0\t0\t0\t0\t94\t29829\t200\t200\t27645\t200\t197\t27401\t27401\t5\t1\t1\t0.985\t0.053191\t0\t1\t0\t0.75\t0\t0\t0.005438\t0.054487\t0.259516\t0.680377\t?\t0.053191\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t76.595745\t23.404255\t0.015734\t0\t\t\t", + "", + "## HISTOGRAM\tjava.lang.Integer", + "coverage_or_base_quality\thigh_quality_coverage_count\tunfiltered_baseq_count", + "0\t89\t0", + "1\t5\t0", + "2\t0\t0", + "3\t0\t0", + "4\t0\t0", + "5\t0\t0", + "6\t0\t0", + "7\t0\t0", + "8\t0\t0", + "9\t0\t0", + "10\t0\t0", + "11\t0\t0", + "12\t0\t0", + "13\t0\t0", + "14\t0\t5", + "15\t0\t0", + "16\t0\t0", + "17\t0\t0", + "18\t0\t0", + "19\t0\t0", + "20\t0\t0", + "21\t0\t1", + "22\t0\t0", + "23\t0\t0", + "24\t0\t0", + "25\t0\t0", + "26\t0\t0", + "27\t0\t0", + "28\t0\t0", + "29\t0\t0", + "30\t0\t0", + "31\t0\t0", + "32\t0\t1", + "33\t0\t0", + "34\t0\t0", + "35\t0\t0", + "36\t0\t3", + "37\t0\t0", + "38\t0\t0", + "39\t0\t0", + "40\t0\t0", + "41\t0\t0", + "42\t0\t0", + "43\t0\t0", + "44\t0\t0", + "45\t0\t0", + "46\t0\t0", + "47\t0\t0", + "48\t0\t0", + "49\t0\t0", + "50\t0\t0", + "51\t0\t0", + "52\t0\t0", + "53\t0\t0", + "54\t0\t0", + "55\t0\t0", + "56\t0\t0", + "57\t0\t0", + "58\t0\t0", + "59\t0\t0", + "60\t0\t0", + "61\t0\t0", + "62\t0\t0", + "63\t0\t0", + "64\t0\t0", + "65\t0\t0", + "66\t0\t0", + "67\t0\t0", + "68\t0\t0", + "69\t0\t0", + "70\t0\t0", + "71\t0\t0", + "72\t0\t0", + "73\t0\t0", + "74\t0\t0", + "75\t0\t0", + "76\t0\t0", + "77\t0\t0", + "78\t0\t0", + "79\t0\t0", + "80\t0\t0", + "81\t0\t0", + "82\t0\t0", + "83\t0\t0", + "84\t0\t0", + "85\t0\t0", + "86\t0\t0", + "87\t0\t0", + "88\t0\t0", + "89\t0\t0" + ], + [ + "versions.yml:md5,e390b048af294086f56621c38ebde05a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-10T09:45:16.117386245" + }, + "sarscov2 - bam - bed": { + "content": [ + "test.CollectHsMetrics.coverage_metrics", + 3595, + [ + "## htsjdk.samtools.metrics.StringHeader", + "# CollectHsMetrics --BAIT_INTERVALS baits/baits.interval_list --TARGET_INTERVALS targets/test.interval_list --INPUT test.paired_end.sorted.bam --OUTPUT test.CollectHsMetrics.coverage_metrics --REFERENCE_SEQUENCE genome.fasta --METRIC_ACCUMULATION_LEVEL ALL_READS --NEAR_DISTANCE 250 --MINIMUM_MAPPING_QUALITY 20 --MINIMUM_BASE_QUALITY 20 --CLIP_OVERLAPPING_READS true --INCLUDE_INDELS false --COVERAGE_CAP 200 --SAMPLE_SIZE 10000 --ALLELE_FRACTION 0.001 --ALLELE_FRACTION 0.005 --ALLELE_FRACTION 0.01 --ALLELE_FRACTION 0.02 --ALLELE_FRACTION 0.05 --ALLELE_FRACTION 0.1 --ALLELE_FRACTION 0.2 --ALLELE_FRACTION 0.3 --ALLELE_FRACTION 0.5 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "## htsjdk.samtools.metrics.StringHeader", + "", + "## METRICS CLASS\tpicard.analysis.directed.HsMetrics", + "BAIT_SET\tBAIT_TERRITORY\tBAIT_DESIGN_EFFICIENCY\tON_BAIT_BASES\tNEAR_BAIT_BASES\tOFF_BAIT_BASES\tPCT_SELECTED_BASES\tPCT_OFF_BAIT\tON_BAIT_VS_SELECTED\tMEAN_BAIT_COVERAGE\tPCT_USABLE_BASES_ON_BAIT\tPCT_USABLE_BASES_ON_TARGET\tFOLD_ENRICHMENT\tHS_LIBRARY_SIZE\tHS_PENALTY_10X\tHS_PENALTY_20X\tHS_PENALTY_30X\tHS_PENALTY_40X\tHS_PENALTY_50X\tHS_PENALTY_100X\tTARGET_TERRITORY\tGENOME_SIZE\tTOTAL_READS\tPF_READS\tPF_BASES\tPF_UNIQUE_READS\tPF_UQ_READS_ALIGNED\tPF_BASES_ALIGNED\tPF_UQ_BASES_ALIGNED\tON_TARGET_BASES\tPCT_PF_READS\tPCT_PF_UQ_READS\tPCT_PF_UQ_READS_ALIGNED\tMEAN_TARGET_COVERAGE\tMEDIAN_TARGET_COVERAGE\tMAX_TARGET_COVERAGE\tMIN_TARGET_COVERAGE\tZERO_CVG_TARGETS_PCT\tPCT_EXC_DUPE\tPCT_EXC_ADAPTER\tPCT_EXC_MAPQ\tPCT_EXC_BASEQ\tPCT_EXC_OVERLAP\tPCT_EXC_OFF_TARGET\tFOLD_80_BASE_PENALTY\tPCT_TARGET_BASES_1X\tPCT_TARGET_BASES_2X\tPCT_TARGET_BASES_10X\tPCT_TARGET_BASES_20X\tPCT_TARGET_BASES_30X\tPCT_TARGET_BASES_40X\tPCT_TARGET_BASES_50X\tPCT_TARGET_BASES_100X\tPCT_TARGET_BASES_250X\tPCT_TARGET_BASES_500X\tPCT_TARGET_BASES_1000X\tPCT_TARGET_BASES_2500X\tPCT_TARGET_BASES_5000X\tPCT_TARGET_BASES_10000X\tPCT_TARGET_BASES_25000X\tPCT_TARGET_BASES_50000X\tPCT_TARGET_BASES_100000X\tAT_DROPOUT\tGC_DROPOUT\tHET_SNP_SENSITIVITY\tHET_SNP_Q\tSAMPLE\tLIBRARY\tREAD_GROUP", + "baits\t158\t0.594937\t725\t3985\t22691\t0.171892\t0.828108\t0.153928\t4.588608\t0.026225\t0.000181\t4.995204\t\t0\t0\t0\t0\t0\t0\t94\t29829\t200\t200\t27645\t200\t197\t27401\t27401\t5\t1\t1\t0.985\t0.053191\t0\t1\t0\t0.75\t0\t0\t0.005438\t0.054487\t0.259516\t0.680377\t?\t0.053191\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t76.595745\t23.404255\t0.015734\t0\t\t\t", + "", + "## HISTOGRAM\tjava.lang.Integer", + "coverage_or_base_quality\thigh_quality_coverage_count\tunfiltered_baseq_count", + "0\t89\t0", + "1\t5\t0", + "2\t0\t0", + "3\t0\t0", + "4\t0\t0", + "5\t0\t0", + "6\t0\t0", + "7\t0\t0", + "8\t0\t0", + "9\t0\t0", + "10\t0\t0", + "11\t0\t0", + "12\t0\t0", + "13\t0\t0", + "14\t0\t5", + "15\t0\t0", + "16\t0\t0", + "17\t0\t0", + "18\t0\t0", + "19\t0\t0", + "20\t0\t0", + "21\t0\t1", + "22\t0\t0", + "23\t0\t0", + "24\t0\t0", + "25\t0\t0", + "26\t0\t0", + "27\t0\t0", + "28\t0\t0", + "29\t0\t0", + "30\t0\t0", + "31\t0\t0", + "32\t0\t1", + "33\t0\t0", + "34\t0\t0", + "35\t0\t0", + "36\t0\t3", + "37\t0\t0", + "38\t0\t0", + "39\t0\t0", + "40\t0\t0", + "41\t0\t0", + "42\t0\t0", + "43\t0\t0", + "44\t0\t0", + "45\t0\t0", + "46\t0\t0", + "47\t0\t0", + "48\t0\t0", + "49\t0\t0", + "50\t0\t0", + "51\t0\t0", + "52\t0\t0", + "53\t0\t0", + "54\t0\t0", + "55\t0\t0", + "56\t0\t0", + "57\t0\t0", + "58\t0\t0", + "59\t0\t0", + "60\t0\t0", + "61\t0\t0", + "62\t0\t0", + "63\t0\t0", + "64\t0\t0", + "65\t0\t0", + "66\t0\t0", + "67\t0\t0", + "68\t0\t0", + "69\t0\t0", + "70\t0\t0", + "71\t0\t0", + "72\t0\t0", + "73\t0\t0", + "74\t0\t0", + "75\t0\t0", + "76\t0\t0", + "77\t0\t0", + "78\t0\t0", + "79\t0\t0", + "80\t0\t0", + "81\t0\t0", + "82\t0\t0", + "83\t0\t0", + "84\t0\t0", + "85\t0\t0", + "86\t0\t0", + "87\t0\t0", + "88\t0\t0", + "89\t0\t0" + ], + [ + "versions.yml:md5,e390b048af294086f56621c38ebde05a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-10T09:46:13.489487836" + } +} \ No newline at end of file diff --git a/modules/nf-core/picard/collecthsmetrics/tests/tags.yml b/modules/nf-core/picard/collecthsmetrics/tests/tags.yml new file mode 100644 index 000000000..b353f95ec --- /dev/null +++ b/modules/nf-core/picard/collecthsmetrics/tests/tags.yml @@ -0,0 +1,2 @@ +picard/collecthsmetrics: + - "modules/nf-core/picard/collecthsmetrics/**" diff --git a/modules/nf-core/picard/collectmultiplemetrics/environment.yml b/modules/nf-core/picard/collectmultiplemetrics/environment.yml index 79b332806..ff4a85edb 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/environment.yml +++ b/modules/nf-core/picard/collectmultiplemetrics/environment.yml @@ -1,7 +1,5 @@ -name: picard_collectmultiplemetrics channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index 5640ce941..c5555871d 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -4,8 +4,8 @@ process PICARD_COLLECTMULTIPLEMETRICS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta) , path(bam), path(bai) diff --git a/modules/nf-core/picard/collectmultiplemetrics/meta.yml b/modules/nf-core/picard/collectmultiplemetrics/meta.yml index 67bba57b2..2b7981ac6 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/meta.yml +++ b/modules/nf-core/picard/collectmultiplemetrics/meta.yml @@ -15,55 +15,64 @@ tools: homepage: https://broadinstitute.github.io/picard/ documentation: https://broadinstitute.github.io/picard/ licence: ["MIT"] + identifier: biotools:picard_tools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: SAM/BAM/CRAM file - pattern: "*.{sam,bam,cram}" - - bai: - type: file - description: Optional SAM/BAM/CRAM file index - pattern: "*.{sai,bai,crai}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome'] - - fasta: - type: file - description: Genome fasta file - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome'] - - fai: - type: file - description: Index of FASTA file. Only needed when fasta is supplied. - pattern: "*.fai" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: SAM/BAM/CRAM file + pattern: "*.{sam,bam,cram}" + - bai: + type: file + description: Optional SAM/BAM/CRAM file index + pattern: "*.{sai,bai,crai}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome'] + - fasta: + type: file + description: Genome fasta file + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome'] + - fai: + type: file + description: Index of FASTA file. Only needed when fasta is supplied. + pattern: "*.fai" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - metrics: - type: file - description: Alignment metrics files generated by picard - pattern: "*_{metrics}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_metrics": + type: file + description: Alignment metrics files generated by picard + pattern: "*_{metrics}" - pdf: - type: file - description: PDF plots of metrics - pattern: "*.{pdf}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.pdf": + type: file + description: PDF plots of metrics + pattern: "*.{pdf}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test new file mode 100644 index 000000000..5b67774f7 --- /dev/null +++ b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test @@ -0,0 +1,112 @@ + +nextflow_process { + + name "Test Process PICARD_COLLECTMULTIPLEMETRICS" + script "../main.nf" + process "PICARD_COLLECTMULTIPLEMETRICS" + + tag "modules" + tag "modules_nfcore" + tag "picard" + tag "picard/collectmultiplemetrics" + + test("test-picard-collectmultiplemetrics") { + + when { + process { + """ + input[0] = [ + [ 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] = [ + [id:'genome'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [[id:'genome'],[]] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.metrics[0][1].collect { file(it).name }.toSorted(), + process.out.pdf[0][1].collect { file(it).name }.toSorted(), + process.out.versions + ).match() + } + ) + } + } + + test("test-picard-collectmultiplemetrics-nofasta") { + + when { + process { + """ + input[0] = [ + [ 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] = [[id:'genome'],[]] + input[2] = [[id:'genome'],[]] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.metrics[0][1].collect { file(it).name }.toSorted(), + process.out.pdf[0][1].collect { file(it).name }.toSorted(), + process.out.versions + ).match() + } + ) + } + } + + test("test-picard-collectmultiplemetrics-cram") { + + when { + process { + """ + input[0] = [ + [ 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] = [ + [id:'genome'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [id:'genome'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.metrics[0][1].collect { file(it).name }.toSorted(), + process.out.pdf[0][1].collect { file(it).name }.toSorted(), + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap new file mode 100644 index 000000000..1859541b6 --- /dev/null +++ b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap @@ -0,0 +1,80 @@ +{ + "test-picard-collectmultiplemetrics": { + "content": [ + [ + "test.CollectMultipleMetrics.alignment_summary_metrics", + "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "test.CollectMultipleMetrics.insert_size_metrics", + "test.CollectMultipleMetrics.quality_by_cycle_metrics", + "test.CollectMultipleMetrics.quality_distribution_metrics" + ], + [ + "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "test.CollectMultipleMetrics.insert_size_histogram.pdf", + "test.CollectMultipleMetrics.quality_by_cycle.pdf", + "test.CollectMultipleMetrics.quality_distribution.pdf", + "test.CollectMultipleMetrics.read_length_histogram.pdf" + ], + [ + "versions.yml:md5,b68b83e8dd0f9360453213acad639338" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T10:03:36.631174" + }, + "test-picard-collectmultiplemetrics-cram": { + "content": [ + [ + "test.CollectMultipleMetrics.alignment_summary_metrics", + "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "test.CollectMultipleMetrics.insert_size_metrics", + "test.CollectMultipleMetrics.quality_by_cycle_metrics", + "test.CollectMultipleMetrics.quality_distribution_metrics" + ], + [ + "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "test.CollectMultipleMetrics.insert_size_histogram.pdf", + "test.CollectMultipleMetrics.quality_by_cycle.pdf", + "test.CollectMultipleMetrics.quality_distribution.pdf", + "test.CollectMultipleMetrics.read_length_histogram.pdf" + ], + [ + "versions.yml:md5,b68b83e8dd0f9360453213acad639338" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T10:04:13.955902" + }, + "test-picard-collectmultiplemetrics-nofasta": { + "content": [ + [ + "test.CollectMultipleMetrics.alignment_summary_metrics", + "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "test.CollectMultipleMetrics.insert_size_metrics", + "test.CollectMultipleMetrics.quality_by_cycle_metrics", + "test.CollectMultipleMetrics.quality_distribution_metrics" + ], + [ + "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "test.CollectMultipleMetrics.insert_size_histogram.pdf", + "test.CollectMultipleMetrics.quality_by_cycle.pdf", + "test.CollectMultipleMetrics.quality_distribution.pdf", + "test.CollectMultipleMetrics.read_length_histogram.pdf" + ], + [ + "versions.yml:md5,b68b83e8dd0f9360453213acad639338" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T10:03:54.707587" + } +} \ No newline at end of file diff --git a/modules/nf-core/picard/collectwgsmetrics/environment.yml b/modules/nf-core/picard/collectwgsmetrics/environment.yml index 6a0b9258e..58d525818 100644 --- a/modules/nf-core/picard/collectwgsmetrics/environment.yml +++ b/modules/nf-core/picard/collectwgsmetrics/environment.yml @@ -1,8 +1,6 @@ -name: picard_collectwgsmetrics channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 - r::r-base diff --git a/modules/nf-core/picard/collectwgsmetrics/main.nf b/modules/nf-core/picard/collectwgsmetrics/main.nf index 35f4129cf..6002a7ca9 100644 --- a/modules/nf-core/picard/collectwgsmetrics/main.nf +++ b/modules/nf-core/picard/collectwgsmetrics/main.nf @@ -4,8 +4,8 @@ process PICARD_COLLECTWGSMETRICS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/picard/collectwgsmetrics/meta.yml b/modules/nf-core/picard/collectwgsmetrics/meta.yml index 5576ef928..bb7480809 100644 --- a/modules/nf-core/picard/collectwgsmetrics/meta.yml +++ b/modules/nf-core/picard/collectwgsmetrics/meta.yml @@ -1,5 +1,6 @@ name: picard_collectwgsmetrics -description: Collect metrics about coverage and performance of whole genome sequencing (WGS) experiments. +description: Collect metrics about coverage and performance of whole genome sequencing + (WGS) experiments. keywords: - alignment - metrics @@ -14,55 +15,59 @@ tools: homepage: https://broadinstitute.github.io/picard/ documentation: https://broadinstitute.github.io/picard/ licence: ["MIT"] + identifier: biotools:picard_tools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Aligned reads file - pattern: "*.{bam, cram}" - - bai: - type: file - description: (Optional) Aligned reads file index - pattern: "*.{bai,crai}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Genome fasta file - pattern: "*.{fa,fasta,fna}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Genome fasta file index - pattern: "*.{fai}" - - intervallist: - type: file - description: Picard Interval List. Defines which contigs to include. Can be generated from a BED file with GATK BedToIntervalList. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Aligned reads file + pattern: "*.{bam, cram}" + - bai: + type: file + description: (Optional) Aligned reads file index + pattern: "*.{bai,crai}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Genome fasta file + pattern: "*.{fa,fasta,fna}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Genome fasta file index + pattern: "*.{fai}" + - - intervallist: + type: file + description: Picard Interval List. Defines which contigs to include. Can be + generated from a BED file with GATK BedToIntervalList. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - metrics: - type: file - description: Alignment metrics files generated by picard - pattern: "*_{metrics}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_metrics": + type: file + description: Alignment metrics files generated by picard + pattern: "*_{metrics}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@flowuenne" diff --git a/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test new file mode 100644 index 000000000..a3984566d --- /dev/null +++ b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test @@ -0,0 +1,83 @@ + +nextflow_process { + + name "Test Process PICARD_COLLECTWGSMETRICS" + script "../main.nf" + process "PICARD_COLLECTWGSMETRICS" + + tag "modules" + tag "modules_nfcore" + tag "picard" + tag "picard/collectwgsmetrics" + + test("test-picard-collectwgsmetrics") { + + when { + process { + """ + input[0] = [ [ 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] = [ + [id:'genome'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [id:'genome'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.metrics[0][1]).text.contains('coverage high_quality_coverage_count'), + process.out.versions + ).match() + } + ) + } + } + + test("test-picard-collectwgsmetrics-with-interval") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + [] + ] + input[1] = [ + [id:'genome'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [id:'genome'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.metrics[0][1]).text.contains('coverage high_quality_coverage_count'), + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap new file mode 100644 index 000000000..f188382b0 --- /dev/null +++ b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap @@ -0,0 +1,28 @@ +{ + "test-picard-collectwgsmetrics-with-interval": { + "content": [ + true, + [ + "versions.yml:md5,06b5898fb06823b736c90e1dcebe75fe" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T11:02:46.301176" + }, + "test-picard-collectwgsmetrics": { + "content": [ + true, + [ + "versions.yml:md5,06b5898fb06823b736c90e1dcebe75fe" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T11:02:25.132069" + } +} \ No newline at end of file diff --git a/modules/nf-core/picard/liftovervcf/environment.yml b/modules/nf-core/picard/liftovervcf/environment.yml index e953ec958..ff4a85edb 100644 --- a/modules/nf-core/picard/liftovervcf/environment.yml +++ b/modules/nf-core/picard/liftovervcf/environment.yml @@ -1,7 +1,5 @@ -name: picard_liftovervcf channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/liftovervcf/main.nf b/modules/nf-core/picard/liftovervcf/main.nf index ab7212a10..a4b27c88e 100644 --- a/modules/nf-core/picard/liftovervcf/main.nf +++ b/modules/nf-core/picard/liftovervcf/main.nf @@ -4,8 +4,8 @@ process PICARD_LIFTOVERVCF { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta), path(input_vcf) @@ -50,8 +50,8 @@ process PICARD_LIFTOVERVCF { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.lifted.vcf.gz - touch ${prefix}.unlifted.vcf.gz + echo | gzip > ${prefix}.lifted.vcf.gz + echo | gzip > ${prefix}.unlifted.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/picard/liftovervcf/meta.yml b/modules/nf-core/picard/liftovervcf/meta.yml index 9ccba6d24..10fbfc837 100644 --- a/modules/nf-core/picard/liftovervcf/meta.yml +++ b/modules/nf-core/picard/liftovervcf/meta.yml @@ -11,56 +11,66 @@ tools: documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037060932-LiftoverVcf-Picard tool_dev_url: https://github.com/broadinstitute/picard licence: ["MIT"] + identifier: biotools:picard_tools input: - - meta: - type: map - description: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - input_vcf: - type: file - description: VCF file - pattern: "*.{vcf,vcf.gz}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: fasta file - pattern: "*.fasta" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - dict: - type: file - description: dictionary for fasta file - pattern: "*.{dict}" - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - chain: - type: file - description: The liftover chain file + - - meta: + type: map + description: Groovy Map containing sample information e.g. [ id:'test', single_end:false + ] + - input_vcf: + type: file + description: VCF file + pattern: "*.{vcf,vcf.gz}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - dict: + type: file + description: dictionary for fasta file + pattern: "*.{dict}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: fasta file + pattern: "*.fasta" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - chain: + type: file + description: The liftover chain file output: - - meta: - type: map - 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_lifted: - type: file - description: VCF file containing successfully lifted variants - pattern: "*.{lifted.vcf.gz}" + - meta: + type: map + description: Groovy Map containing sample information e.g. [ id:'test', single_end:false + ] + - "*.lifted.vcf.gz": + type: file + description: VCF file containing successfully lifted variants + pattern: "*.{lifted.vcf.gz}" - vcf_unlifted: - type: file - description: VCF file containing unsuccessfully lifted variants - pattern: "*.{unlifted.vcf.gz}" + - meta: + type: map + description: Groovy Map containing sample information e.g. [ id:'test', single_end:false + ] + - "*.unlifted.vcf.gz": + type: file + description: VCF file containing unsuccessfully lifted variants + pattern: "*.{unlifted.vcf.gz}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@lucpen" - "@ramprasadn" diff --git a/modules/nf-core/picard/liftovervcf/tests/main.nf.test b/modules/nf-core/picard/liftovervcf/tests/main.nf.test new file mode 100644 index 000000000..7b42102de --- /dev/null +++ b/modules/nf-core/picard/liftovervcf/tests/main.nf.test @@ -0,0 +1,84 @@ + +nextflow_process { + + name "Test Process PICARD_LIFTOVERVCF" + script "../main.nf" + process "PICARD_LIFTOVERVCF" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "picard" + tag "picard/liftovervcf" + + test("test-picard-liftovervcf") { + + when { + process { + """ + input[0] = [ [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true) + ] + input[1] = [ [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) + ] + input[2] = [ [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[3] = [ [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.chain.gz', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.vcf_lifted[0][1]).vcf.summary, + path(process.out.vcf_unlifted[0][1]).vcf.variantsMD5, + process.out.versions + ).match() + } + ) + } + } + + test("test-picard-liftovervcf-stubs") { + options '-stub' + when { + process { + """ + input[0] = [ [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true) + ] + input[1] = [ [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) + ] + input[2] = [ [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[3] = [ [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.chain.gz', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.vcf_lifted[0][1]).name, + file(process.out.vcf_unlifted[0][1]).name, + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/picard/liftovervcf/tests/main.nf.test.snap b/modules/nf-core/picard/liftovervcf/tests/main.nf.test.snap new file mode 100644 index 000000000..585ea369e --- /dev/null +++ b/modules/nf-core/picard/liftovervcf/tests/main.nf.test.snap @@ -0,0 +1,30 @@ +{ + "test-picard-liftovervcf-stubs": { + "content": [ + "test.lifted.vcf.gz", + "test.unlifted.vcf.gz", + [ + "versions.yml:md5,e1aaacb3c05a0d822f7abdcf3a55fa91" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T09:38:05.840798" + }, + "test-picard-liftovervcf": { + "content": [ + "VcfFile [chromosomes=[], sampleCount=1, variantCount=0, phased=true, phasedAutodetect=true]", + "39a9de5185d94289283bd27cfcdeba97", + [ + "versions.yml:md5,e1aaacb3c05a0d822f7abdcf3a55fa91" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T09:41:33.022998" + } +} \ No newline at end of file diff --git a/modules/nf-core/picard/liftovervcf/tests/nextflow.config b/modules/nf-core/picard/liftovervcf/tests/nextflow.config new file mode 100644 index 000000000..d89d78651 --- /dev/null +++ b/modules/nf-core/picard/liftovervcf/tests/nextflow.config @@ -0,0 +1,3 @@ +process { + ext.args = "--WARN_ON_MISSING_CONTIG true" +} diff --git a/modules/nf-core/picard/markduplicates/environment.yml b/modules/nf-core/picard/markduplicates/environment.yml index 58b795f54..ff4a85edb 100644 --- a/modules/nf-core/picard/markduplicates/environment.yml +++ b/modules/nf-core/picard/markduplicates/environment.yml @@ -1,7 +1,5 @@ -name: picard_markduplicates channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/markduplicates/main.nf b/modules/nf-core/picard/markduplicates/main.nf index ad0b29636..cf18ac35c 100644 --- a/modules/nf-core/picard/markduplicates/main.nf +++ b/modules/nf-core/picard/markduplicates/main.nf @@ -4,8 +4,8 @@ process PICARD_MARKDUPLICATES { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta), path(reads) diff --git a/modules/nf-core/picard/markduplicates/meta.yml b/modules/nf-core/picard/markduplicates/meta.yml index 1f0ffe16c..bcaf91605 100644 --- a/modules/nf-core/picard/markduplicates/meta.yml +++ b/modules/nf-core/picard/markduplicates/meta.yml @@ -15,60 +15,82 @@ tools: homepage: https://broadinstitute.github.io/picard/ documentation: https://broadinstitute.github.io/picard/ licence: ["MIT"] + identifier: biotools:picard_tools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Sequence reads file, can be SAM/BAM/CRAM format - pattern: "*.{bam,cram,sam}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Reference genome fasta file, required for CRAM input - pattern: "*.{fasta,fa}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Reference genome fasta index - pattern: "*.{fai}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Sequence reads file, can be SAM/BAM/CRAM format + pattern: "*.{bam,cram,sam}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Reference genome fasta file, required for CRAM input + pattern: "*.{fasta,fa}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Reference genome fasta index + pattern: "*.{fai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - bam: - type: file - description: BAM file with duplicate reads marked/removed - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: BAM file with duplicate reads marked/removed + pattern: "*.{bam}" - bai: - type: file - description: An optional BAM index file. If desired, --CREATE_INDEX must be passed as a flag - pattern: "*.{bai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bai": + type: file + description: An optional BAM index file. If desired, --CREATE_INDEX must be + passed as a flag + pattern: "*.{bai}" - cram: - type: file - description: Output CRAM file - pattern: "*.{cram}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.cram": + type: file + description: Output CRAM file + pattern: "*.{cram}" - metrics: - type: file - description: Duplicate metrics file generated by picard - pattern: "*.{metrics.txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.metrics.txt": + type: file + description: Duplicate metrics file generated by picard + pattern: "*.{metrics.txt}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@projectoriented" diff --git a/modules/nf-core/picard/markduplicates/tests/main.nf.test b/modules/nf-core/picard/markduplicates/tests/main.nf.test index e3e97f6cc..9ed909659 100644 --- a/modules/nf-core/picard/markduplicates/tests/main.nf.test +++ b/modules/nf-core/picard/markduplicates/tests/main.nf.test @@ -27,9 +27,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("unsorted_bam_name") }, - { assert snapshot(path(process.out.metrics.get(0).get(1)).readLines()[0..2]).match("unsorted_bam_metrics") }, - { assert snapshot(process.out.versions).match("unsorted_bam_versions") } + { assert snapshot( + file(process.out.bam[0][1]).name, + path(process.out.metrics.get(0).get(1)).readLines()[0..2], + process.out.versions) + .match() } ) } } @@ -52,9 +54,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("sorted_bam_name") }, - { assert snapshot(path(process.out.metrics.get(0).get(1)).readLines()[0..2]).match("sorted_bam_metrics") }, - { assert snapshot(process.out.versions).match("sorted_bam_versions") } + { assert snapshot( + file(process.out.bam[0][1]).name, + path(process.out.metrics.get(0).get(1)).readLines()[0..2], + process.out.versions) + .match() } ) } } @@ -83,9 +87,86 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.cram[0][1]).name).match("cram_name") }, - { assert snapshot(path(process.out.metrics.get(0).get(1)).readLines()[0..2]).match("cram_metrics") }, - { assert snapshot(process.out.versions).match("cram_versions") } + { assert snapshot( + file(process.out.cram[0][1]).name, + path(process.out.metrics.get(0).get(1)).readLines()[0..2], + process.out.versions) + .match() } + ) + } + } + + test("sarscov2 [unsorted bam] - 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.bam', checkIfExists: true) + ]) + input[1] = [ [:], [] ] + input[2] = [ [:], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 [sorted bam] - 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) + ]) + input[1] = [ [:], [] ] + input[2] = [ [:], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens [cram] - 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.sorted.cram', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap b/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap index eb17111e4..8b37e65b1 100644 --- a/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap +++ b/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap @@ -1,110 +1,251 @@ { - "sorted_bam_versions": { + "sarscov2 [sorted bam] - stub": { "content": [ - [ - "versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" + ], + "bai": [ + + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + + ], + "metrics": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-03-20T15:31:50.928021" + "timestamp": "2024-07-22T11:56:32.025869" }, - "unsorted_bam_name": { + "sarscov2 [unsorted bam] - stub": { "content": [ - "test.marked.bam" + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" + ], + "bai": [ + + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + + ], + "metrics": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-19T10:26:28.100755" + "timestamp": "2024-07-22T11:56:20.497105" }, - "cram_metrics": { + "sarscov2 [unsorted bam]": { "content": [ + "test.marked.bam", [ "## htsjdk.samtools.metrics.StringHeader", - "# MarkDuplicates --INPUT test.paired_end.sorted.cram --OUTPUT test.marked.cram --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "# MarkDuplicates --INPUT test.paired_end.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_DUP_STRATEGY FLOW_QUALITY_SUM_STRATEGY --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --UNPAIRED_START_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", "## htsjdk.samtools.metrics.StringHeader" + ], + [ + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-03-20T15:25:47.518152" + "timestamp": "2024-07-22T11:50:14.881666" }, - "sorted_bam_metrics": { + "sarscov2 [sorted bam]": { "content": [ + "test.marked.bam", [ "## htsjdk.samtools.metrics.StringHeader", - "# MarkDuplicates --INPUT test.paired_end.sorted.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "# MarkDuplicates --INPUT test.paired_end.sorted.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_DUP_STRATEGY FLOW_QUALITY_SUM_STRATEGY --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --UNPAIRED_START_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", "## htsjdk.samtools.metrics.StringHeader" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-21T11:39:10.318331" - }, - "cram_name": { - "content": [ - "test.marked.cram" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-20T15:25:47.459663" - }, - "cram_versions": { - "content": [ + ], [ - "versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17" + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-19T10:27:03.26989" + "timestamp": "2024-07-22T11:52:03.11428" }, - "unsorted_bam_versions": { - "content": [ - [ - "versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-20T15:31:24.040403" - }, - "unsorted_bam_metrics": { + "homo_sapiens [cram]": { "content": [ + "test.marked.cram", [ "## htsjdk.samtools.metrics.StringHeader", - "# MarkDuplicates --INPUT test.paired_end.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "# MarkDuplicates --INPUT test.paired_end.sorted.cram --OUTPUT test.marked.cram --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_DUP_STRATEGY FLOW_QUALITY_SUM_STRATEGY --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --UNPAIRED_START_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", "## htsjdk.samtools.metrics.StringHeader" + ], + [ + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-03-21T10:51:12.831787" + "timestamp": "2024-07-22T11:53:05.403139" }, - "sorted_bam_name": { + "homo_sapiens [cram] - stub": { "content": [ - "test.marked.bam" + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" + ], + "bai": [ + + ], + "bam": [ + + ], + "cram": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "metrics": [ + [ + { + "id": "test", + "single_end": false + }, + "test.marked.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,33dd4b32140e801e0d2e50aeefd0788d" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-19T10:26:45.080116" + "timestamp": "2024-07-22T11:56:43.438188" } } \ No newline at end of file diff --git a/modules/nf-core/picard/renamesampleinvcf/environment.yml b/modules/nf-core/picard/renamesampleinvcf/environment.yml index 3e7d8eb5a..ff4a85edb 100644 --- a/modules/nf-core/picard/renamesampleinvcf/environment.yml +++ b/modules/nf-core/picard/renamesampleinvcf/environment.yml @@ -1,7 +1,5 @@ -name: picard_renamesampleinvcf channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/renamesampleinvcf/main.nf b/modules/nf-core/picard/renamesampleinvcf/main.nf index d44b1829c..3e4f38caa 100644 --- a/modules/nf-core/picard/renamesampleinvcf/main.nf +++ b/modules/nf-core/picard/renamesampleinvcf/main.nf @@ -5,8 +5,8 @@ process PICARD_RENAMESAMPLEINVCF { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/nf-core/picard/renamesampleinvcf/meta.yml b/modules/nf-core/picard/renamesampleinvcf/meta.yml index 528002d07..7c279fe1e 100644 --- a/modules/nf-core/picard/renamesampleinvcf/meta.yml +++ b/modules/nf-core/picard/renamesampleinvcf/meta.yml @@ -13,30 +13,33 @@ tools: documentation: https://broadinstitute.github.io/picard/ tool_dev_url: "https://github.com/broadinstitute/picard" licence: ["MIT"] + identifier: biotools:picard_tools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF file - pattern: "*.{vcf,vcf.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file + pattern: "*.{vcf,vcf.gz}" output: - - meta: - type: map - 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: VCF file - pattern: "*.{vcf,vcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.vcf.gz": + type: file + description: VCF file + pattern: "*.{vcf,vcf.gz}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@Lucpen" maintainers: diff --git a/modules/nf-core/picard/renamesampleinvcf/tests/main.nf.test b/modules/nf-core/picard/renamesampleinvcf/tests/main.nf.test new file mode 100644 index 000000000..f755447ff --- /dev/null +++ b/modules/nf-core/picard/renamesampleinvcf/tests/main.nf.test @@ -0,0 +1,38 @@ + +nextflow_process { + + name "Test Process PICARD_RENAMESAMPLEINVCF" + script "../main.nf" + process "PICARD_RENAMESAMPLEINVCF" + + tag "modules" + tag "modules_nfcore" + tag "picard" + tag "picard/renamesampleinvcf" + + test("test-picard-renamesampleinvcf") { + + when { + process { + """ + input[0] = [ [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.vcf[0][1]).vcf.variantsMD5, + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/picard/renamesampleinvcf/tests/main.nf.test.snap b/modules/nf-core/picard/renamesampleinvcf/tests/main.nf.test.snap new file mode 100644 index 000000000..a9bf7b7bf --- /dev/null +++ b/modules/nf-core/picard/renamesampleinvcf/tests/main.nf.test.snap @@ -0,0 +1,15 @@ +{ + "test-picard-renamesampleinvcf": { + "content": [ + "e21a2349f41663d1fc38f47fbe65a6d5", + [ + "versions.yml:md5,d4de734264e0c3b33d23e4a40de26a5f" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T09:32:02.18878" + } +} \ No newline at end of file diff --git a/modules/nf-core/picard/sortvcf/environment.yml b/modules/nf-core/picard/sortvcf/environment.yml index f1dbb6b93..ff4a85edb 100644 --- a/modules/nf-core/picard/sortvcf/environment.yml +++ b/modules/nf-core/picard/sortvcf/environment.yml @@ -1,7 +1,5 @@ -name: picard_sortvcf channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/sortvcf/main.nf b/modules/nf-core/picard/sortvcf/main.nf index 5359caae3..7133c13ae 100644 --- a/modules/nf-core/picard/sortvcf/main.nf +++ b/modules/nf-core/picard/sortvcf/main.nf @@ -4,8 +4,8 @@ process PICARD_SORTVCF { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/nf-core/picard/sortvcf/meta.yml b/modules/nf-core/picard/sortvcf/meta.yml index 62507a085..6dc28e03f 100644 --- a/modules/nf-core/picard/sortvcf/meta.yml +++ b/modules/nf-core/picard/sortvcf/meta.yml @@ -6,52 +6,56 @@ keywords: - sortvcf tools: - picard: - description: Java tools for working with NGS data in the BAM/CRAM/SAM and VCF format + description: Java tools for working with NGS data in the BAM/CRAM/SAM and VCF + format homepage: https://broadinstitute.github.io/picard/ documentation: https://broadinstitute.github.io/picard/command-line-overview.html#SortVcf licence: ["MIT"] + identifier: biotools:picard_tools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF file - pattern: "*.{vcf,vcf.gz}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Reference genome fasta file - pattern: "*.{fasta,fa}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - dict: - type: file - description: Reference genome dictionary file - pattern: "*.{dict}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file + pattern: "*.{vcf,vcf.gz}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Reference genome fasta file + pattern: "*.{fasta,fa}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - dict: + type: file + description: Reference genome dictionary file + pattern: "*.{dict}" output: - - meta: - type: map - 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: Sorted VCF file - pattern: "*.{vcf}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_sorted.vcf.gz": + type: file + description: Sorted VCF file + pattern: "*.{vcf}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/picard/sortvcf/tests/main.nf.test b/modules/nf-core/picard/sortvcf/tests/main.nf.test new file mode 100644 index 000000000..9df73ad43 --- /dev/null +++ b/modules/nf-core/picard/sortvcf/tests/main.nf.test @@ -0,0 +1,44 @@ + +nextflow_process { + + name "Test Process PICARD_SORTVCF" + script "../main.nf" + process "PICARD_SORTVCF" + + tag "modules" + tag "modules_nfcore" + tag "picard" + tag "picard/sortvcf" + + test("test-picard-sortvcf") { + + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) + ] + input[1] = [ [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ [ id:'genome' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.vcf[0][1]).linesGzip[3..7], + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/picard/sortvcf/tests/main.nf.test.snap b/modules/nf-core/picard/sortvcf/tests/main.nf.test.snap new file mode 100644 index 000000000..db80323bf --- /dev/null +++ b/modules/nf-core/picard/sortvcf/tests/main.nf.test.snap @@ -0,0 +1,21 @@ +{ + "test-picard-sortvcf": { + "content": [ + [ + "##FILTER=", + "##FORMAT=", + "##FORMAT=", + "##INFO=", + "##INFO=" + ], + [ + "versions.yml:md5,11949a1af95080dcc5bd1c75d68dee71" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T09:20:13.124551" + } +} \ No newline at end of file diff --git a/modules/nf-core/qualimap/bamqc/environment.yml b/modules/nf-core/qualimap/bamqc/environment.yml index 3f30d0cd3..4fa5f4e8e 100644 --- a/modules/nf-core/qualimap/bamqc/environment.yml +++ b/modules/nf-core/qualimap/bamqc/environment.yml @@ -1,7 +1,5 @@ -name: qualimap_bamqc channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::qualimap=2.3 diff --git a/modules/nf-core/qualimap/bamqc/meta.yml b/modules/nf-core/qualimap/bamqc/meta.yml index 7756d4975..8be33c00a 100644 --- a/modules/nf-core/qualimap/bamqc/meta.yml +++ b/modules/nf-core/qualimap/bamqc/meta.yml @@ -15,34 +15,37 @@ tools: documentation: http://qualimap.conesalab.org/doc_html/index.html doi: 10.1093/bioinformatics/bts503 licence: ["GPL-2.0-only"] + identifier: biotools:qualimap input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file - pattern: "*.{bam}" - - gff: - type: file - description: Feature file with regions of interest - pattern: "*.{gff,gtf,bed}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.{bam}" + - - gff: + type: file + description: Feature file with regions of interest + pattern: "*.{gff,gtf,bed}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - results: - type: directory - description: Qualimap results dir - pattern: "*/*" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}: + type: directory + description: Qualimap results dir + pattern: "*/*" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@phue" maintainers: diff --git a/modules/nf-core/qualimap/bamqc/tests/main.nf.test b/modules/nf-core/qualimap/bamqc/tests/main.nf.test index ba2260cae..eec1a41a1 100644 --- a/modules/nf-core/qualimap/bamqc/tests/main.nf.test +++ b/modules/nf-core/qualimap/bamqc/tests/main.nf.test @@ -9,11 +9,35 @@ nextflow_process { tag "qualimap/bamqc" test("homo_sapiens [bam]") { - when { - params { - outdir = "$outputDir" + process { + """ + gff = [] + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + input[1] = gff + """ } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + file("${process.out.results[0][1]}/qualimapReport.html").name, + path("${process.out.results[0][1]}/genome_results.txt"), + process.out.versions) + .match() } + ) + } + } + + test("homo_sapiens [bam] - stub") { + options "-stub" + when { process { """ gff = [] @@ -30,9 +54,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert path("${process.out.results[0][1]}/qualimapReport.html").exists() }, - { assert snapshot(path("${process.out.results[0][1]}/genome_results.txt")).match("genome_results") }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/qualimap/bamqc/tests/main.nf.test.snap b/modules/nf-core/qualimap/bamqc/tests/main.nf.test.snap index 25148df2b..fb6e23e49 100644 --- a/modules/nf-core/qualimap/bamqc/tests/main.nf.test.snap +++ b/modules/nf-core/qualimap/bamqc/tests/main.nf.test.snap @@ -1,16 +1,165 @@ { - "genome_results": { + "homo_sapiens [bam] - stub": { "content": [ - "genome_results.txt:md5,45103d63ba82df2b905eb04819c32dd3" + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + [ + "agogo.css:md5,d41d8cd98f00b204e9800998ecf8427e", + "ajax-loader.gif:md5,d41d8cd98f00b204e9800998ecf8427e", + "basic.css:md5,d41d8cd98f00b204e9800998ecf8427e", + "bgfooter.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "bgtop.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "comment-bright.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "comment-close.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "comment.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "doctools.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "down-pressed.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "down.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "file.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "jquery.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "minus.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "plus.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "pygments.css:md5,d41d8cd98f00b204e9800998ecf8427e", + "qualimap_logo_small.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "report.css:md5,d41d8cd98f00b204e9800998ecf8427e", + "searchtools.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "underscore.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "up-pressed.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "up.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "websupport.js:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "genome_results.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + [ + "genome_coverage_0to50_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_coverage_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_coverage_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_coverage_quotes.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_gc_content_per_window.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_homopolymer_indels.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_insert_size_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_insert_size_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_mapping_quality_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_mapping_quality_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_reads_clipping_profile.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_reads_content_per_read_position.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_uniq_read_starts_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "qualimapReport.html:md5,d41d8cd98f00b204e9800998ecf8427e", + [ + "coverage_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "coverage_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "duplication_rate_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_fraction_coverage.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "homopolymer_indels.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "insert_size_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "insert_size_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapped_reads_clipping_profile.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapped_reads_gc-content_distribution.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapped_reads_nucleotide_content.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapping_quality_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapping_quality_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ] + ], + "1": [ + "versions.yml:md5,9024d7d0a189d8be1485249ae591b907" + ], + "results": [ + [ + { + "id": "test", + "single_end": false + }, + [ + [ + "agogo.css:md5,d41d8cd98f00b204e9800998ecf8427e", + "ajax-loader.gif:md5,d41d8cd98f00b204e9800998ecf8427e", + "basic.css:md5,d41d8cd98f00b204e9800998ecf8427e", + "bgfooter.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "bgtop.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "comment-bright.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "comment-close.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "comment.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "doctools.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "down-pressed.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "down.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "file.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "jquery.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "minus.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "plus.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "pygments.css:md5,d41d8cd98f00b204e9800998ecf8427e", + "qualimap_logo_small.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "report.css:md5,d41d8cd98f00b204e9800998ecf8427e", + "searchtools.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "underscore.js:md5,d41d8cd98f00b204e9800998ecf8427e", + "up-pressed.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "up.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "websupport.js:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "genome_results.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + [ + "genome_coverage_0to50_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_coverage_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_coverage_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_coverage_quotes.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_gc_content_per_window.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_homopolymer_indels.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_insert_size_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_insert_size_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_mapping_quality_across_reference.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_mapping_quality_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_reads_clipping_profile.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_reads_content_per_read_position.png:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_uniq_read_starts_histogram.png:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "qualimapReport.html:md5,d41d8cd98f00b204e9800998ecf8427e", + [ + "coverage_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "coverage_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "duplication_rate_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome_fraction_coverage.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "homopolymer_indels.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "insert_size_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "insert_size_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapped_reads_clipping_profile.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapped_reads_gc-content_distribution.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapped_reads_nucleotide_content.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapping_quality_across_reference.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "mapping_quality_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ] + ], + "versions": [ + "versions.yml:md5,9024d7d0a189d8be1485249ae591b907" + ] + } ], - "timestamp": "2024-01-19T12:05:00.122103" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:27:15.04081" }, - "versions": { + "homo_sapiens [bam]": { "content": [ + "qualimapReport.html", + "genome_results.txt:md5,45103d63ba82df2b905eb04819c32dd3", [ "versions.yml:md5,9024d7d0a189d8be1485249ae591b907" ] ], - "timestamp": "2024-01-19T12:05:00.131485" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:21:02.541915" } -} +} \ No newline at end of file diff --git a/modules/nf-core/rhocall/annotate/environment.yml b/modules/nf-core/rhocall/annotate/environment.yml index 5a00600fd..ba95c3cbe 100644 --- a/modules/nf-core/rhocall/annotate/environment.yml +++ b/modules/nf-core/rhocall/annotate/environment.yml @@ -1,7 +1,5 @@ -name: rhocall_annotate channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::rhocall=0.5.1 diff --git a/modules/nf-core/rhocall/annotate/meta.yml b/modules/nf-core/rhocall/annotate/meta.yml index ecc8e1e43..fb041cae8 100644 --- a/modules/nf-core/rhocall/annotate/meta.yml +++ b/modules/nf-core/rhocall/annotate/meta.yml @@ -10,48 +10,51 @@ tools: homepage: "https://github.com/dnil/rhocall" documentation: "https://github.com/dnil/rhocall" tool_dev_url: "https://github.com/dnil" - licence: "['GPL v3']" + licence: ["GPL v3"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: vcf file - pattern: "*.{vcf,vcf.gz}" - - tbi: - type: file - description: vcf index file - pattern: "*.{tbi}" - - roh: - type: file - description: Bcftools roh style TSV file with CHR,POS,AZ,QUAL - pattern: "*.{roh}" - - bed: - type: file - description: BED file with AZ windows. - pattern: "*.{bed}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: vcf file + pattern: "*.{vcf,vcf.gz}" + - tbi: + type: file + description: vcf index file + pattern: "*.{tbi}" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - roh: + type: file + description: Bcftools roh style TSV file with CHR,POS,AZ,QUAL + pattern: "*.{roh}" + - - bed: + type: file + description: BED file with AZ windows. + pattern: "*.{bed}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - vcf: - type: file - description: vcf file - pattern: "*.{vcf,vcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_rhocall.vcf": + type: file + description: vcf file + pattern: "*.{vcf,vcf.gz}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/rhocall/viz/environment.yml b/modules/nf-core/rhocall/viz/environment.yml index 6e5b352f5..538db5092 100644 --- a/modules/nf-core/rhocall/viz/environment.yml +++ b/modules/nf-core/rhocall/viz/environment.yml @@ -1,7 +1,5 @@ -name: "rhocall_viz" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::rhocall=0.5.1" diff --git a/modules/nf-core/rhocall/viz/meta.yml b/modules/nf-core/rhocall/viz/meta.yml index bbcad9ba9..7efcab02a 100644 --- a/modules/nf-core/rhocall/viz/meta.yml +++ b/modules/nf-core/rhocall/viz/meta.yml @@ -11,41 +11,53 @@ tools: documentation: "https://github.com/dnil/rhocall" tool_dev_url: "https://github.com/dnil" licence: ["GPL v3"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - vcf: - type: file - description: VCF file - pattern: "*.{vcf}" - - roh: - type: file - description: Input RHO file produced from rhocall - pattern: "*.{roh}" - + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - vcf: + type: file + description: VCF file + pattern: "*.{vcf}" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - roh: + type: file + description: Input RHO file produced from rhocall + pattern: "*.{roh}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - bed: - type: file - description: Bed file containing roh calls - pattern: "*.{bed}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - ${prefix}/${prefix}.bed: + type: file + description: Bed file containing roh calls + pattern: "*.{bed}" - wig: - type: file - description: Wig file containing roh calls - pattern: "*.{wig}" - + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - ${prefix}/${prefix}.wig: + type: file + description: Wig file containing roh calls + pattern: "*.{wig}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/rhocall/viz/tests/main.nf.test b/modules/nf-core/rhocall/viz/tests/main.nf.test index 094e7d079..d2661e01b 100644 --- a/modules/nf-core/rhocall/viz/tests/main.nf.test +++ b/modules/nf-core/rhocall/viz/tests/main.nf.test @@ -21,8 +21,8 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], // 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] = [] @@ -37,7 +37,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)] input[1] = BCFTOOLS_ROH.out.roh """ } diff --git a/modules/nf-core/rtgtools/format/environment.yml b/modules/nf-core/rtgtools/format/environment.yml index 15b3df5be..8aa83cdc4 100644 --- a/modules/nf-core/rtgtools/format/environment.yml +++ b/modules/nf-core/rtgtools/format/environment.yml @@ -1,7 +1,5 @@ -name: rtgtools_format channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::rtg-tools=3.12.1 diff --git a/modules/nf-core/rtgtools/format/meta.yml b/modules/nf-core/rtgtools/format/meta.yml index 8ed18f540..e09aff3af 100644 --- a/modules/nf-core/rtgtools/format/meta.yml +++ b/modules/nf-core/rtgtools/format/meta.yml @@ -1,5 +1,6 @@ name: "rtgtools_format" -description: Converts the contents of sequence data files (FASTA/FASTQ/SAM/BAM) into the RTG Sequence Data File (SDF) format. +description: Converts the contents of sequence data files (FASTA/FASTQ/SAM/BAM) into + the RTG Sequence Data File (SDF) format. keywords: - rtg - fasta @@ -8,43 +9,49 @@ keywords: - sam tools: - "rtgtools": - description: "RealTimeGenomics Tools -- Utilities for accurate VCF comparison and manipulation" + description: "RealTimeGenomics Tools -- Utilities for accurate VCF comparison + and manipulation" 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"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input1: - type: file - description: FASTA, FASTQ, BAM or SAM file. This should be the left input file when using paired end FASTQ/FASTA data - pattern: "*.{fasta,fa,fna,fastq,fastq.gz,fq,fq.gz,bam,sam}" - - input2: - type: file - description: The right input file when using paired end FASTQ/FASTA data - pattern: "*.{fasta,fa,fna,fastq,fastq.gz,fq,fq.gz}" - - sam_rg: - type: file - description: A file containing a single readgroup header as a SAM header. This can also be supplied as a string in `task.ext.args` as `--sam-rg `. - pattern: "*.{txt,sam}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input1: + type: file + description: FASTA, FASTQ, BAM or SAM file. This should be the left input file + when using paired end FASTQ/FASTA data + pattern: "*.{fasta,fa,fna,fastq,fastq.gz,fq,fq.gz,bam,sam}" + - input2: + type: file + description: The right input file when using paired end FASTQ/FASTA data + pattern: "*.{fasta,fa,fna,fastq,fastq.gz,fq,fq.gz}" + - sam_rg: + type: file + description: A file containing a single readgroup header as a SAM header. This + can also be supplied as a string in `task.ext.args` as `--sam-rg `. + pattern: "*.{txt,sam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - sdf: - type: directory - description: The sequence dictionary format folder created from the input file(s) - pattern: "*.sdf" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.sdf": + type: directory + description: The sequence dictionary format folder created from the input file(s) + pattern: "*.sdf" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@nvnieuwk" maintainers: diff --git a/modules/nf-core/rtgtools/vcfeval/environment.yml b/modules/nf-core/rtgtools/vcfeval/environment.yml index e3c649967..8aa83cdc4 100644 --- a/modules/nf-core/rtgtools/vcfeval/environment.yml +++ b/modules/nf-core/rtgtools/vcfeval/environment.yml @@ -1,7 +1,5 @@ -name: rtgtools_vcfeval channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::rtg-tools=3.12.1 diff --git a/modules/nf-core/rtgtools/vcfeval/meta.yml b/modules/nf-core/rtgtools/vcfeval/meta.yml index f67a35c0d..9814124ee 100644 --- a/modules/nf-core/rtgtools/vcfeval/meta.yml +++ b/modules/nf-core/rtgtools/vcfeval/meta.yml @@ -1,111 +1,196 @@ name: "rtgtools_vcfeval" -description: The VCFeval tool of RTG tools. It is used to evaluate called variants for agreement with a baseline variant set +description: The VCFeval tool of RTG tools. It is used to evaluate called variants + for agreement with a baseline variant set keywords: - benchmarking - vcf - rtg-tools tools: - "rtgtools": - description: "RealTimeGenomics Tools -- Utilities for accurate VCF comparison and manipulation" + description: "RealTimeGenomics Tools -- Utilities for accurate VCF comparison + and manipulation" 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"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - query_vcf: - type: file - description: A VCF with called variants to benchmark against the standard - pattern: "*.{vcf,vcf.gz}" - - query_vcf_index: - type: file - description: The index of the called VCF (optional) - pattern: "*.tbi" - - truth_vcf: - type: file - description: A standard VCF to compare against - pattern: "*.{vcf,vcf.gz}" - - truth_vcf_index: - type: file - description: The index of the standard VCF (optional) - pattern: "*.tbi" - - truth_bed: - type: file - description: A BED file containining the strict regions where VCFeval should only evaluate the fully overlapping variants (optional) - pattern: "*.bed" - - evaluation_bed: - type: file - description: A BED file containing the regions where VCFeval will evaluate every fully and partially overlapping variant (optional) - pattern: "*.bed" - - sdf: - type: file - description: The SDF (RTG Sequence Data File) folder of the reference genome + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - query_vcf: + type: file + description: A VCF with called variants to benchmark against the standard + pattern: "*.{vcf,vcf.gz}" + - query_vcf_tbi: + type: file + description: The index of the VCF file with called variants to benchmark against the standard + pattern: "*.{vcf.gz.tbi, vcf.tbi}" + - truth_vcf: + type: file + description: A standard VCF to compare against + pattern: "*.{vcf,vcf.gz}" + - truth_vcf_tbi: + type: file + description: The index of the standard VCF to compare against + pattern: "*.{vcf.gz.tbi, vcf.tbi}" + - truth_bed: + type: file + description: A BED file containining the strict regions where VCFeval should + only evaluate the fully overlapping variants (optional) + pattern: "*.bed" + - evaluation_bed: + type: file + description: A BED file containing the regions where VCFeval will evaluate every + fully and partially overlapping variant (optional) + pattern: "*.bed" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sdf: + type: file + description: The SDF (RTG Sequence Data File) folder of the reference genome output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - tp_vcf: - type: file - description: A VCF file for the true positive variants - pattern: "*.tp.vcf.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tp.vcf.gz": + type: file + description: A VCF file for the true positive variants + pattern: "*.tp.vcf.gz" - tp_tbi: - type: file - description: The index of the VCF file for the true positive variants - pattern: "*.tp.vcf.gz.tbi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tp.vcf.gz.tbi": + type: file + description: The index of the VCF file for the true positive variants + pattern: "*.tp.vcf.gz.tbi" - fn_vcf: - type: file - description: A VCF file for the false negative variants - pattern: "*.fn.vcf.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fn.vcf.gz": + type: file + description: A VCF file for the false negative variants + pattern: "*.fn.vcf.gz" - fn_tbi: - type: file - description: The index of the VCF file for the false negative variants - pattern: "*.fn.vcf.gz.tbi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fn.vcf.gz.tbi": + type: file + description: The index of the VCF file for the false negative variants + pattern: "*.fn.vcf.gz.tbi" - fp_vcf: - type: file - description: A VCF file for the false positive variants - pattern: "*.fp.vcf.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fp.vcf.gz": + type: file + description: A VCF file for the false positive variants + pattern: "*.fp.vcf.gz" - fp_tbi: - type: file - description: The index of the VCF file for the false positive variants - pattern: "*.fp.vcf.gz.tbi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fp.vcf.gz.tbi": + type: file + description: The index of the VCF file for the false positive variants + pattern: "*.fp.vcf.gz.tbi" - baseline_vcf: - type: file - description: A VCF file for the true positive variants from the baseline - pattern: "*.tp-baseline.vcf.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tp-baseline.vcf.gz": + type: file + description: A VCF file for the true positive variants from the baseline + pattern: "*.tp-baseline.vcf.gz" - baseline_tbi: - type: file - description: The index of the VCF file for the true positive variants from the baseline - pattern: "*.tp-baseline.vcf.gz.tbi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tp-baseline.vcf.gz.tbi": + type: file + description: The index of the VCF file for the true positive variants from the + baseline + pattern: "*.tp-baseline.vcf.gz.tbi" - snp_roc: - type: file - description: TSV files containing ROC data for the SNPs - pattern: "*.snp_roc.tsv.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.snp_roc.tsv.gz": + type: file + description: TSV files containing ROC data for the SNPs + pattern: "*.snp_roc.tsv.gz" - non_snp_roc: - type: file - description: TSV files containing ROC data for all variants except SNPs - pattern: "*.non_snp_roc.tsv.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.non_snp_roc.tsv.gz": + type: file + description: TSV files containing ROC data for all variants except SNPs + pattern: "*.non_snp_roc.tsv.gz" - weighted_roc: - type: file - description: TSV files containing weighted ROC data for all variants - pattern: "*.weighted_snp_roc.tsv.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.weighted_roc.tsv.gz": + type: file + description: TSV files containing weighted ROC data for all variants + pattern: "*.weighted_snp_roc.tsv.gz" - summary: - type: file - description: A TXT file containing the summary of the evaluation - pattern: "*.summary.txt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.summary.txt": + type: file + description: A TXT file containing the summary of the evaluation + pattern: "*.summary.txt" - phasing: - type: file - description: A TXT file containing the data on the phasing - pattern: "*.phasing.txt" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.phasing.txt": + type: file + description: A TXT file containing the data on the phasing + pattern: "*.phasing.txt" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@nvnieuwk" maintainers: diff --git a/modules/nf-core/samtools/faidx/environment.yml b/modules/nf-core/samtools/faidx/environment.yml index 9c24eb0ab..62054fc97 100644 --- a/modules/nf-core/samtools/faidx/environment.yml +++ b/modules/nf-core/samtools/faidx/environment.yml @@ -1,10 +1,8 @@ -name: samtools_faidx - +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults - dependencies: - - bioconda::htslib=1.19.1 - - bioconda::samtools=1.19.2 + - bioconda::htslib=1.21 + - bioconda::samtools=1.21 diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf index cfe7ad95f..28c0a81cf 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.21--h50ea8bc_0' : + 'biocontainers/samtools:1.21--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 f3c25de20..6721b2cb8 100644 --- a/modules/nf-core/samtools/faidx/meta.yml +++ b/modules/nf-core/samtools/faidx/meta.yml @@ -14,47 +14,62 @@ tools: documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:samtools input: - - meta: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - fasta: - type: file - description: FASTA file - pattern: "*.{fa,fasta}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - fai: - type: file - description: FASTA index file - pattern: "*.{fai}" + - - meta: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fa,fasta}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - fa: - type: file - description: FASTA file - pattern: "*.{fa}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{fa,fasta}": + type: file + description: FASTA file + pattern: "*.{fa}" - fai: - type: file - description: FASTA index file - pattern: "*.{fai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fai": + type: file + description: FASTA index file + pattern: "*.{fai}" - gzi: - type: file - description: Optional gzip index file for compressed inputs - pattern: "*.gzi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.gzi": + type: file + description: Optional gzip index file for compressed inputs + pattern: "*.gzi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@ewels" diff --git a/modules/nf-core/samtools/faidx/tests/main.nf.test.snap b/modules/nf-core/samtools/faidx/tests/main.nf.test.snap index 3e651ef68..1bbb3ec2b 100644 --- a/modules/nf-core/samtools/faidx/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/faidx/tests/main.nf.test.snap @@ -18,7 +18,7 @@ ], "3": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ], "fa": [ @@ -36,15 +36,15 @@ ], "versions": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-18T16:22:39.412601" + "timestamp": "2024-09-16T07:57:47.450887871" }, "test_samtools_faidx_bgzip": { "content": [ @@ -71,7 +71,7 @@ ] ], "3": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ], "fa": [ @@ -95,15 +95,15 @@ ] ], "versions": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-18T16:23:22.427966" + "timestamp": "2024-09-16T07:58:04.804905659" }, "test_samtools_faidx_fasta": { "content": [ @@ -124,7 +124,7 @@ ], "3": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ], "fa": [ [ @@ -142,15 +142,15 @@ ], "versions": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-18T16:24:04.107537" + "timestamp": "2024-09-16T07:58:23.831268154" }, "test_samtools_faidx_stub_fasta": { "content": [ @@ -171,7 +171,7 @@ ], "3": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ], "fa": [ [ @@ -189,15 +189,15 @@ ], "versions": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-18T16:24:45.868463" + "timestamp": "2024-09-16T07:58:35.600243706" }, "test_samtools_faidx_stub_fai": { "content": [ @@ -218,7 +218,7 @@ ], "3": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ], "fa": [ @@ -236,14 +236,14 @@ ], "versions": [ - "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c" + "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-18T16:25:27.550554" + "timestamp": "2024-09-16T07:58:54.705460167" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/index/environment.yml b/modules/nf-core/samtools/index/environment.yml index a5e506498..62054fc97 100644 --- a/modules/nf-core/samtools/index/environment.yml +++ b/modules/nf-core/samtools/index/environment.yml @@ -1,8 +1,8 @@ -name: samtools_index +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::htslib=1.21 + - bioconda::samtools=1.21 diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index dc14f98d6..311756102 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.21--h50ea8bc_0' : + 'biocontainers/samtools:1.21--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/meta.yml b/modules/nf-core/samtools/index/meta.yml index 01a4ee03e..db8df0d50 100644 --- a/modules/nf-core/samtools/index/meta.yml +++ b/modules/nf-core/samtools/index/meta.yml @@ -15,38 +15,52 @@ tools: documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:samtools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: input file output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - bai: - type: file - description: BAM/CRAM/SAM index file - pattern: "*.{bai,crai,sai}" - - crai: - type: file - description: BAM/CRAM/SAM index file - pattern: "*.{bai,crai,sai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bai": + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" - csi: - type: file - description: CSI index file - pattern: "*.{csi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: CSI index file + pattern: "*.{csi}" + - crai: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.crai": + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@ewels" diff --git a/modules/nf-core/samtools/index/tests/main.nf.test b/modules/nf-core/samtools/index/tests/main.nf.test index bb7756d1c..ca34fb5cd 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 3dc8e7de8..72d65e81a 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,5e09a6fdf76de396728f877193d72315" + ], + "bai": [ + + ], + "crai": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,5e09a6fdf76de396728f877193d72315" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:12:00.324667957" + "timestamp": "2024-09-16T08:21:25.261127166" }, - "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,5e09a6fdf76de396728f877193d72315" + ], + "bai": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,5e09a6fdf76de396728f877193d72315" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:12:07.885103162" + "timestamp": "2024-09-16T08:21:12.653194876" }, - "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,5e09a6fdf76de396728f877193d72315" + ], + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,5e09a6fdf76de396728f877193d72315" ] - ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-12T18:41:38.446424" + "timestamp": "2024-09-16T08:21:01.854932651" }, - "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,5e09a6fdf76de396728f877193d72315" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-12T18:40:46.579747" + "timestamp": "2024-09-16T08:20:51.485364222" }, - "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,5e09a6fdf76de396728f877193d72315" + ], + "bai": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,5e09a6fdf76de396728f877193d72315" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T08:20:40.518873972" + }, + "bai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,5e09a6fdf76de396728f877193d72315" + ], + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ], + "crai": [ + + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,5e09a6fdf76de396728f877193d72315" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:11:51.641425452" + "timestamp": "2024-09-16T08:20:21.184050361" } } \ 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 fc669b1b6..62054fc97 100644 --- a/modules/nf-core/samtools/merge/environment.yml +++ b/modules/nf-core/samtools/merge/environment.yml @@ -1,8 +1,8 @@ -name: samtools_merge +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::htslib=1.21 + - bioconda::samtools=1.21 diff --git a/modules/nf-core/samtools/merge/main.nf b/modules/nf-core/samtools/merge/main.nf index a3048c283..34da4c7c8 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.21--h50ea8bc_0' : + 'biocontainers/samtools:1.21--h50ea8bc_0' }" input: tuple val(meta), path(input_files, stageAs: "?/*") diff --git a/modules/nf-core/samtools/merge/meta.yml b/modules/nf-core/samtools/merge/meta.yml index 2e8f3dbbb..235aa2194 100644 --- a/modules/nf-core/samtools/merge/meta.yml +++ b/modules/nf-core/samtools/merge/meta.yml @@ -15,60 +15,81 @@ tools: documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:samtools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input_files: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram,sam}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Reference file the CRAM was created with (optional) - pattern: "*.{fasta,fa}" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Index of the reference file the CRAM was created with (optional) - pattern: "*.fai" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input_files: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram,sam}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Reference file the CRAM was created with (optional) + pattern: "*.{fasta,fa}" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Index of the reference file the CRAM was created with (optional) + pattern: "*.fai" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - bam: - type: file - description: BAM file - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.bam: + type: file + description: BAM file + pattern: "*.{bam}" - cram: - type: file - description: CRAM file - pattern: "*.{cram}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.cram: + type: file + description: CRAM file + pattern: "*.{cram}" - csi: - type: file - description: BAM index file (optional) - pattern: "*.csi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: BAM index file (optional) + pattern: "*.csi" - crai: - type: file - description: CRAM index file (optional) - pattern: "*.crai" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.crai": + type: file + description: CRAM index file (optional) + pattern: "*.crai" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@yuukiiwa " 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 f7da7699b..0a41e01af 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,d51d18a97513e370e43f0c891c51dfc4" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:16:33.782637377" + "timestamp": "2024-09-16T09:16:30.476887194" }, "bams_csi": { "content": [ @@ -124,14 +124,14 @@ "bams_stub_versions": { "content": [ [ - "versions.yml:md5,52c62d4712f7af00eb962d090ca32fe4" + "versions.yml:md5,d51d18a97513e370e43f0c891c51dfc4" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:16:42.594476052" + "timestamp": "2024-09-16T09:16:52.203823961" }, "bam_cram": { "content": [ @@ -158,14 +158,14 @@ "bams_versions": { "content": [ [ - "versions.yml:md5,52c62d4712f7af00eb962d090ca32fe4" + "versions.yml:md5,d51d18a97513e370e43f0c891c51dfc4" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:16:04.805335656" + "timestamp": "2024-09-16T08:29:57.524363148" }, "crams_bam": { "content": [ @@ -182,14 +182,14 @@ "crams_versions": { "content": [ [ - "versions.yml:md5,52c62d4712f7af00eb962d090ca32fe4" + "versions.yml:md5,d51d18a97513e370e43f0c891c51dfc4" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:16:25.889394689" + "timestamp": "2024-09-16T09:16:06.977096207" }, "bam_csi": { "content": [ diff --git a/modules/nf-core/samtools/sort/environment.yml b/modules/nf-core/samtools/sort/environment.yml index 4d898e486..62054fc97 100644 --- a/modules/nf-core/samtools/sort/environment.yml +++ b/modules/nf-core/samtools/sort/environment.yml @@ -1,8 +1,8 @@ -name: samtools_sort +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::htslib=1.21 + - bioconda::samtools=1.21 diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index fc374f980..acfd9252c 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_SORT { 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.21--h50ea8bc_0' : + 'biocontainers/samtools:1.21--h50ea8bc_0' }" input: tuple val(meta) , path(bam) @@ -32,7 +32,6 @@ process SAMTOOLS_SORT { """ samtools cat \\ - --threads $task.cpus \\ ${bam} \\ | \\ samtools sort \\ @@ -50,10 +49,20 @@ process SAMTOOLS_SORT { """ stub: + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def extension = args.contains("--output-fmt sam") ? "sam" : + args.contains("--output-fmt cram") ? "cram" : + "bam" """ - touch ${prefix}.bam - touch ${prefix}.bam.csi + touch ${prefix}.${extension} + if [ "${extension}" == "bam" ]; + then + touch ${prefix}.${extension}.csi + elif [ "${extension}" == "cram" ]; + then + touch ${prefix}.${extension}.crai + fi cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml index 341a7d0eb..a9dbec5a8 100644 --- a/modules/nf-core/samtools/sort/meta.yml +++ b/modules/nf-core/samtools/sort/meta.yml @@ -15,52 +15,73 @@ tools: documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:samtools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file(s) - pattern: "*.{bam,cram,sam}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Reference genome FASTA file - pattern: "*.{fa,fasta,fna}" - optional: true + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file(s) + pattern: "*.{bam,cram,sam}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Reference genome FASTA file + pattern: "*.{fa,fasta,fna}" + optional: true output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - bam: - type: file - description: Sorted BAM file - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: Sorted BAM file + pattern: "*.{bam}" - cram: - type: file - description: Sorted CRAM file - pattern: "*.{cram}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.cram": + type: file + description: Sorted CRAM file + pattern: "*.{cram}" - crai: - type: file - description: CRAM index file (optional) - pattern: "*.crai" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.crai": + type: file + description: CRAM index file (optional) + pattern: "*.crai" - csi: - type: file - description: BAM index file (optional) - pattern: "*.csi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: BAM index file (optional) + pattern: "*.csi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@ewels" diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test b/modules/nf-core/samtools/sort/tests/main.nf.test index 8360e2b1f..c2ea9c72a 100644 --- a/modules/nf-core/samtools/sort/tests/main.nf.test +++ b/modules/nf-core/samtools/sort/tests/main.nf.test @@ -30,13 +30,49 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.bam, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match()} ) } } test("cram") { + config "./nextflow_cram.config" + + 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.sorted.cram', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.cram.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.crai.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.versions + ).match()} + ) + } + } + + test("bam - stub") { + + options "-stub" config "./nextflow.config" when { @@ -62,24 +98,21 @@ nextflow_process { } } - test("bam_stub") { + test("cram - stub") { - config "./nextflow.config" options "-stub" + config "./nextflow_cram.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.bam', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true) ]) input[1] = Channel.of([ [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ]) """ } @@ -88,8 +121,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("bam_stub_bam") }, - { assert snapshot(process.out.versions).match("bam_stub_versions") } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test.snap b/modules/nf-core/samtools/sort/tests/main.nf.test.snap index 384776564..2d6b29004 100644 --- a/modules/nf-core/samtools/sort/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/sort/tests/main.nf.test.snap @@ -1,5 +1,35 @@ { "cram": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.cram" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.cram.crai" + ] + ], + [ + "versions.yml:md5,2659b187d681241451539d4c53500b9f" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T08:49:58.207549273" + }, + "bam - stub": { "content": [ { "0": [ @@ -8,7 +38,7 @@ "id": "test", "single_end": false }, - "test.sorted.bam:md5,bc0b7c25da26384a006ed84cc9e4da23" + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -23,11 +53,11 @@ "id": "test", "single_end": false }, - "test.sorted.bam.csi:md5,8d4e836c2fed6c0bf874d5e8cdba5831" + "test.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "4": [ - "versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca" + "versions.yml:md5,2659b187d681241451539d4c53500b9f" ], "bam": [ [ @@ -35,7 +65,7 @@ "id": "test", "single_end": false }, - "test.sorted.bam:md5,bc0b7c25da26384a006ed84cc9e4da23" + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "crai": [ @@ -50,105 +80,113 @@ "id": "test", "single_end": false }, - "test.sorted.bam.csi:md5,8d4e836c2fed6c0bf874d5e8cdba5831" + "test.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ - "versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca" + "versions.yml:md5,2659b187d681241451539d4c53500b9f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T15:08:00.830294" - }, - "bam_stub_bam": { - "content": [ - "test.sorted.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-12T19:21:04.364044" + "timestamp": "2024-09-16T08:50:08.630951018" }, - "bam_stub_versions": { - "content": [ - [ - "versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" - }, - "timestamp": "2024-02-13T16:15:00.20800281" - }, - "bam": { + "cram - stub": { "content": [ { "0": [ + + ], + "1": [ [ { "id": "test", "single_end": false }, - "test.sorted.bam:md5,bc0b7c25da26384a006ed84cc9e4da23" + "test.sorted.cram:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "1": [ - ], "2": [ - - ], - "3": [ [ { "id": "test", "single_end": false }, - "test.sorted.bam.csi:md5,8d4e836c2fed6c0bf874d5e8cdba5831" + "test.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" ] + ], + "3": [ + ], "4": [ - "versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca" + "versions.yml:md5,2659b187d681241451539d4c53500b9f" ], "bam": [ + + ], + "crai": [ [ { "id": "test", "single_end": false }, - "test.sorted.bam:md5,bc0b7c25da26384a006ed84cc9e4da23" + "test.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "crai": [ - ], "cram": [ - - ], - "csi": [ [ { "id": "test", "single_end": false }, - "test.sorted.bam.csi:md5,8d4e836c2fed6c0bf874d5e8cdba5831" + "test.sorted.cram:md5,d41d8cd98f00b204e9800998ecf8427e" ] + ], + "csi": [ + ], "versions": [ - "versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca" + "versions.yml:md5,2659b187d681241451539d4c53500b9f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T08:50:19.061912443" + }, + "bam": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,34aa85e86abefe637f7a4a9887f016fc" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam.csi" + ] + ], + [ + "versions.yml:md5,2659b187d681241451539d4c53500b9f" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-04T15:07:48.773803" + "timestamp": "2024-09-16T08:49:43.971158333" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/sort/tests/nextflow_cram.config b/modules/nf-core/samtools/sort/tests/nextflow_cram.config new file mode 100644 index 000000000..3a8c0188b --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/nextflow_cram.config @@ -0,0 +1,8 @@ +process { + + withName: SAMTOOLS_SORT { + ext.prefix = { "${meta.id}.sorted" } + ext.args = "--write-index --output-fmt cram" + } + +} diff --git a/modules/nf-core/samtools/stats/environment.yml b/modules/nf-core/samtools/stats/environment.yml index 67bb0ca40..62054fc97 100644 --- a/modules/nf-core/samtools/stats/environment.yml +++ b/modules/nf-core/samtools/stats/environment.yml @@ -1,8 +1,8 @@ -name: samtools_stats +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::htslib=1.21 + - bioconda::samtools=1.21 diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf index 52b00f4b6..493525a9e 100644 --- a/modules/nf-core/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_STATS { 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.21--h50ea8bc_0' : + 'biocontainers/samtools:1.21--h50ea8bc_0' }" input: tuple val(meta), path(input), path(input_index) diff --git a/modules/nf-core/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml index 735ff8122..77b020f76 100644 --- a/modules/nf-core/samtools/stats/meta.yml +++ b/modules/nf-core/samtools/stats/meta.yml @@ -16,43 +16,46 @@ tools: documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:samtools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file from alignment - pattern: "*.{bam,cram}" - - input_index: - type: file - description: BAI/CRAI file from alignment - pattern: "*.{bai,crai}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: Reference file the CRAM was created with (optional) - pattern: "*.{fasta,fa}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file from alignment + pattern: "*.{bam,cram}" + - input_index: + type: file + description: BAI/CRAI file from alignment + pattern: "*.{bai,crai}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Reference file the CRAM was created with (optional) + pattern: "*.{fasta,fa}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - stats: - type: file - description: File containing samtools stats output - pattern: "*.{stats}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.stats": + type: file + description: File containing samtools stats output + pattern: "*.{stats}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@FriederikeHanssen" diff --git a/modules/nf-core/samtools/stats/tests/main.nf.test b/modules/nf-core/samtools/stats/tests/main.nf.test index e3d5cb14c..5bc893095 100644 --- a/modules/nf-core/samtools/stats/tests/main.nf.test +++ b/modules/nf-core/samtools/stats/tests/main.nf.test @@ -3,6 +3,7 @@ nextflow_process { name "Test Process SAMTOOLS_STATS" script "../main.nf" process "SAMTOOLS_STATS" + tag "modules" tag "modules_nfcore" tag "samtools" @@ -11,9 +12,6 @@ nextflow_process { test("bam") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -37,9 +35,59 @@ nextflow_process { test("cram") { when { - params { - outdir = "$outputDir" + 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), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) + ]) + """ } + } + + then { + assertAll( + {assert process.success}, + {assert snapshot(process.out).match()} + ) + } + } + + test("bam - 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] = [[],[]] + """ + } + } + + then { + assertAll( + {assert process.success}, + {assert snapshot(process.out).match()} + ) + } + } + + test("cram - stub") { + + options "-stub" + + when { process { """ input[0] = Channel.of([ @@ -49,7 +97,7 @@ nextflow_process { ]) input[1] = Channel.of([ [ id:'genome' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ]) """ } diff --git a/modules/nf-core/samtools/stats/tests/main.nf.test.snap b/modules/nf-core/samtools/stats/tests/main.nf.test.snap index 1b7c9ba44..df507be7a 100644 --- a/modules/nf-core/samtools/stats/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/stats/tests/main.nf.test.snap @@ -8,11 +8,11 @@ "id": "test", "single_end": false }, - "test.stats:md5,01812900aa4027532906c5d431114233" + "test.stats:md5,a27fe55e49a341f92379bb20a65c6a06" ] ], "1": [ - "versions.yml:md5,0514ceb1769b2a88843e08c1f82624a9" + "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" ], "stats": [ [ @@ -20,19 +20,89 @@ "id": "test", "single_end": false }, - "test.stats:md5,01812900aa4027532906c5d431114233" + "test.stats:md5,a27fe55e49a341f92379bb20a65c6a06" ] ], "versions": [ - "versions.yml:md5,0514ceb1769b2a88843e08c1f82624a9" + "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:15:25.562429714" + "timestamp": "2024-09-16T09:29:16.767396182" + }, + "bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + ], + "stats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T09:29:29.721580274" + }, + "cram - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + ], + "stats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T09:29:53.567964304" }, "bam": { "content": [ @@ -43,11 +113,11 @@ "id": "test", "single_end": false }, - "test.stats:md5,5d8681bf541199898c042bf400391d59" + "test.stats:md5,d53a2584376d78942839e9933a34d11b" ] ], "1": [ - "versions.yml:md5,0514ceb1769b2a88843e08c1f82624a9" + "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" ], "stats": [ [ @@ -55,18 +125,18 @@ "id": "test", "single_end": false }, - "test.stats:md5,5d8681bf541199898c042bf400391d59" + "test.stats:md5,d53a2584376d78942839e9933a34d11b" ] ], "versions": [ - "versions.yml:md5,0514ceb1769b2a88843e08c1f82624a9" + "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:15:07.857611509" + "timestamp": "2024-09-16T09:28:50.73610604" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/view/environment.yml b/modules/nf-core/samtools/view/environment.yml index b0676f338..62054fc97 100644 --- a/modules/nf-core/samtools/view/environment.yml +++ b/modules/nf-core/samtools/view/environment.yml @@ -1,8 +1,8 @@ -name: samtools_view +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::htslib=1.21 + - bioconda::samtools=1.21 diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf index 5a8989d69..37e05cec8 100644 --- a/modules/nf-core/samtools/view/main.nf +++ b/modules/nf-core/samtools/view/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_VIEW { 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.21--h50ea8bc_0' : + 'biocontainers/samtools:1.21--h50ea8bc_0' }" input: tuple val(meta), path(input), path(index) @@ -13,13 +13,15 @@ process SAMTOOLS_VIEW { path qname output: - tuple val(meta), path("*.bam"), emit: bam, optional: true - tuple val(meta), path("*.cram"), emit: cram, optional: true - tuple val(meta), path("*.sam"), emit: sam, optional: true - tuple val(meta), path("*.bai"), emit: bai, optional: true - tuple val(meta), path("*.csi"), emit: csi, optional: true - tuple val(meta), path("*.crai"), emit: crai, optional: true - path "versions.yml", emit: versions + tuple val(meta), path("${prefix}.bam"), emit: bam, optional: true + tuple val(meta), path("${prefix}.cram"), emit: cram, optional: true + tuple val(meta), path("${prefix}.sam"), emit: sam, optional: true + tuple val(meta), path("${prefix}.${file_type}.bai"), emit: bai, optional: true + tuple val(meta), path("${prefix}.${file_type}.csi"), emit: csi, optional: true + tuple val(meta), path("${prefix}.${file_type}.crai"), emit: crai, optional: true + tuple val(meta), path("${prefix}.unselected.${file_type}"), emit: unselected, optional: true + tuple val(meta), path("${prefix}.unselected.${file_type}.{bai,csi,crsi}"), emit: unselected_index, optional: true + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -27,13 +29,13 @@ process SAMTOOLS_VIEW { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--reference ${fasta}" : "" - def readnames = qname ? "--qname-file ${qname}": "" - def file_type = args.contains("--output-fmt sam") ? "sam" : - args.contains("--output-fmt bam") ? "bam" : - args.contains("--output-fmt cram") ? "cram" : - input.getExtension() + file_type = args.contains("--output-fmt sam") ? "sam" : + args.contains("--output-fmt bam") ? "bam" : + args.contains("--output-fmt cram") ? "cram" : + input.getExtension() + readnames = qname ? "--qname-file ${qname} --output-unselected ${prefix}.unselected.${file_type}": "" if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ samtools \\ @@ -54,14 +56,14 @@ process SAMTOOLS_VIEW { stub: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def file_type = args.contains("--output-fmt sam") ? "sam" : - args.contains("--output-fmt bam") ? "bam" : - args.contains("--output-fmt cram") ? "cram" : - input.getExtension() + prefix = task.ext.prefix ?: "${meta.id}" + file_type = args.contains("--output-fmt sam") ? "sam" : + args.contains("--output-fmt bam") ? "bam" : + args.contains("--output-fmt cram") ? "cram" : + input.getExtension() if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - def index = args.contains("--write-index") ? "touch ${prefix}.csi" : "" + def index = args.contains("--write-index") ? "touch ${prefix}.${file_type}.csi" : "" """ touch ${prefix}.${file_type} diff --git a/modules/nf-core/samtools/view/meta.yml b/modules/nf-core/samtools/view/meta.yml index 3dadafae7..caa7b0150 100644 --- a/modules/nf-core/samtools/view/meta.yml +++ b/modules/nf-core/samtools/view/meta.yml @@ -15,68 +15,120 @@ tools: documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:samtools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - index: - type: file - description: BAM.BAI/BAM.CSI/CRAM.CRAI file (optional) - pattern: "*.{.bai,.csi,.crai}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - fasta: - type: file - description: Reference file the CRAM was created with (optional) - pattern: "*.{fasta,fa}" - - qname: - type: file - description: Optional file with read names to output only select alignments - pattern: "*.{txt,list}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - index: + type: file + description: BAM.BAI/BAM.CSI/CRAM.CRAI file (optional) + pattern: "*.{.bai,.csi,.crai}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fasta: + type: file + description: Reference file the CRAM was created with (optional) + pattern: "*.{fasta,fa}" + - - qname: + type: file + description: Optional file with read names to output only select alignments + pattern: "*.{txt,list}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - bam: - type: file - description: optional filtered/converted BAM file - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.bam: + type: file + description: optional filtered/converted BAM file + pattern: "*.{bam}" - cram: - type: file - description: optional filtered/converted CRAM file - pattern: "*.{cram}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.cram: + type: file + description: optional filtered/converted CRAM file + pattern: "*.{cram}" - sam: - type: file - description: optional filtered/converted SAM file - pattern: "*.{sam}" - # bai, csi, and crai are created with `--write-index` + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.sam: + type: file + description: optional filtered/converted SAM file + pattern: "*.{sam}" - bai: - type: file - description: optional BAM file index - pattern: "*.{bai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.${file_type}.bai: + type: file + description: optional BAM file index + pattern: "*.{bai}" - csi: - type: file - description: optional tabix BAM file index - pattern: "*.{csi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.${file_type}.csi: + type: file + description: optional tabix BAM file index + pattern: "*.{csi}" - crai: - type: file - description: optional CRAM file index - pattern: "*.{crai}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.${file_type}.crai: + type: file + description: optional CRAM file index + pattern: "*.{crai}" + - unselected: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.unselected.${file_type}: + type: file + description: optional file with unselected alignments + pattern: "*.unselected.{bam,cram,sam}" + - unselected_index: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.unselected.${file_type}.{bai,csi,crsi}: + type: file + description: index for the "unselected" file + pattern: "*.unselected.{bai,csi,crai}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@joseespinosa" diff --git a/modules/nf-core/samtools/view/tests/main.nf.test b/modules/nf-core/samtools/view/tests/main.nf.test index 45a0defba..37b81a916 100644 --- a/modules/nf-core/samtools/view/tests/main.nf.test +++ b/modules/nf-core/samtools/view/tests/main.nf.test @@ -172,6 +172,8 @@ nextflow_process { { assert snapshot(process.out.crai).match("cram_to_bam_index_qname_crai") }, { assert snapshot(process.out.cram).match("cram_to_bam_index_qname_cram") }, { assert snapshot(process.out.sam).match("cram_to_bam_index_qname_sam") }, + { assert snapshot(file(process.out.unselected[0][1]).name).match("cram_to_bam_index_qname_unselected") }, + { assert snapshot(file(process.out.unselected_index[0][1]).name).match("cram_to_bam_index_qname_unselected_csi") }, { assert snapshot(process.out.versions).match("cram_to_bam_index_qname_versions") } ) } diff --git a/modules/nf-core/samtools/view/tests/main.nf.test.snap b/modules/nf-core/samtools/view/tests/main.nf.test.snap index f55943a7a..63849b037 100644 --- a/modules/nf-core/samtools/view/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/view/tests/main.nf.test.snap @@ -56,14 +56,14 @@ "bam_stub_versions": { "content": [ [ - "versions.yml:md5,4ea32c57d546102a1b32d9693ada7cf1" + "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:13:09.713353823" + "timestamp": "2024-09-16T09:26:24.461775464" }, "cram_to_bam_index_cram": { "content": [ @@ -169,6 +169,16 @@ }, "timestamp": "2024-02-12T19:37:56.490286" }, + "cram_to_bam_index_qname_unselected_csi": { + "content": [ + "test.unselected.bam.csi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.3" + }, + "timestamp": "2024-02-12T19:38:23.328458" + }, "bam_csi": { "content": [ [ @@ -208,14 +218,14 @@ "cram_to_bam_index_qname_versions": { "content": [ [ - "versions.yml:md5,4ea32c57d546102a1b32d9693ada7cf1" + "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:13:03.935041046" + "timestamp": "2024-09-16T09:25:51.953436682" }, "cram_to_bam_bam": { "content": [ @@ -240,14 +250,14 @@ "cram_to_bam_index_versions": { "content": [ [ - "versions.yml:md5,4ea32c57d546102a1b32d9693ada7cf1" + "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:12:55.910685496" + "timestamp": "2024-09-16T09:25:14.475388399" }, "cram_to_bam_bai": { "content": [ @@ -264,14 +274,14 @@ "cram_to_bam_versions": { "content": [ [ - "versions.yml:md5,4ea32c57d546102a1b32d9693ada7cf1" + "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:12:47.715221169" + "timestamp": "2024-09-16T09:24:49.673441798" }, "cram_bam": { "content": [ @@ -355,17 +365,37 @@ }, "timestamp": "2024-02-12T19:38:23.322874" }, + "cram_to_bam_index_qname_unselected": { + "content": [ + "test.unselected.bam" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.3" + }, + "timestamp": "2024-02-12T19:38:23.322874" + }, + "cram_to_bam_index_qname_unselected_csi": { + "content": [ + "test.unselected.bam.csi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.3" + }, + "timestamp": "2024-02-12T19:38:23.328458" + }, "bam_versions": { "content": [ [ - "versions.yml:md5,4ea32c57d546102a1b32d9693ada7cf1" + "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-13T16:12:31.692607421" + "timestamp": "2024-09-16T09:23:27.151650338" }, "cram_to_bam_index_qname_cram": { "content": [ @@ -430,14 +460,24 @@ "cram_versions": { "content": [ [ - "versions.yml:md5,4ea32c57d546102a1b32d9693ada7cf1" + "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07" ] ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T09:24:12.95416913" + }, + "cram_to_bam_index_qname_unselected": { + "content": [ + "test.unselected.bam" + ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "23.04.3" }, - "timestamp": "2024-02-13T16:12:39.913411036" + "timestamp": "2024-02-12T19:38:23.322874" }, "bam_sam": { "content": [ @@ -477,7 +517,7 @@ }, "bam_stub_csi": { "content": [ - "test.csi" + "test.bam.csi" ], "meta": { "nf-test": "0.8.4", diff --git a/modules/nf-core/smncopynumbercaller/environment.yml b/modules/nf-core/smncopynumbercaller/environment.yml index 3da92eeb2..afbc40076 100644 --- a/modules/nf-core/smncopynumbercaller/environment.yml +++ b/modules/nf-core/smncopynumbercaller/environment.yml @@ -1,7 +1,5 @@ -name: smncopynumbercaller channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::smncopynumbercaller=1.1.2 diff --git a/modules/nf-core/smncopynumbercaller/meta.yml b/modules/nf-core/smncopynumbercaller/meta.yml index bb2690e97..9d91fc096 100644 --- a/modules/nf-core/smncopynumbercaller/meta.yml +++ b/modules/nf-core/smncopynumbercaller/meta.yml @@ -1,7 +1,13 @@ name: "smncopynumbercaller" -description: tool to call the copy number of full-length SMN1, full-length SMN2, as well as SMN2Δ7–8 (SMN2 with a deletion of Exon7-8) from a whole-genome sequencing (WGS) BAM file. +description: tool to call the copy number of full-length SMN1, full-length SMN2, as + well as SMN2Δ7–8 (SMN2 with a deletion of Exon7-8) from a whole-genome sequencing + (WGS) BAM file. keywords: - - copy number, BAM, CRAM, SMN1, SMN2 + - copy number + - BAM + - CRAM + - SMN1 + - SMN2 tools: - "smncopynumbercaller": description: "call copy number of SMN1, SMN2, SMN2Δ7–8 from a bam file" @@ -9,39 +15,48 @@ tools: documentation: "https://github.com/Illumina/SMNCopyNumberCaller" tool_dev_url: "https://github.com/Illumina/SMNCopyNumberCaller" doi: "10.1038/s41436-020-0754-0" - licence: "Apache License Version 2.0" + licence: ["Apache License Version 2.0"] + identifier: "" input: - - bam: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram}" - - bai: - type: file - description: BAM/CRAM index file - pattern: "*.{bai,crai}" - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - bai: + type: file + description: BAM/CRAM index file + pattern: "*.{bai,crai}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - run_metrics: - type: file - description: File containing run parameters of SMNCopyNumberCaller - pattern: "*.{json}" - smncopynumber: - type: file - description: File containing the output of SMNCopyNumberCaller - pattern: "*.{tsv}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - out/*.tsv: + type: file + description: File containing the output of SMNCopyNumberCaller + pattern: "*.{tsv}" + - run_metrics: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - out/*.json: + type: file + description: File containing run parameters of SMNCopyNumberCaller + pattern: "*.{json}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@peterpru" maintainers: diff --git a/modules/nf-core/smncopynumbercaller/tests/main.nf.test b/modules/nf-core/smncopynumbercaller/tests/main.nf.test new file mode 100644 index 000000000..ce42bb04f --- /dev/null +++ b/modules/nf-core/smncopynumbercaller/tests/main.nf.test @@ -0,0 +1,59 @@ + +nextflow_process { + + name "Test Process SMNCOPYNUMBERCALLER" + script "../main.nf" + process "SMNCOPYNUMBERCALLER" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "smncopynumbercaller" + + test("test-smncopynumbercaller") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.rna.paired_end.sorted.chr6.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.rna.paired_end.sorted.chr6.bam.bai', checkIfExists: true), + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-smncopynumbercaller-stub") { + options '-stub' + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.rna.paired_end.sorted.chr6.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.rna.paired_end.sorted.chr6.bam.bai', checkIfExists: true), + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/smncopynumbercaller/tests/main.nf.test.snap b/modules/nf-core/smncopynumbercaller/tests/main.nf.test.snap new file mode 100644 index 000000000..834fe67b9 --- /dev/null +++ b/modules/nf-core/smncopynumbercaller/tests/main.nf.test.snap @@ -0,0 +1,100 @@ +{ + "test-smncopynumbercaller-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,084e44557eacbb00c1a24dc71ed022cf" + ], + "run_metrics": [ + [ + { + "id": "test" + }, + "test.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "smncopynumber": [ + [ + { + "id": "test" + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,084e44557eacbb00c1a24dc71ed022cf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-27T12:54:27.295453" + }, + "test-smncopynumbercaller": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.tsv:md5,0de62f196972c17e1701aa8cea0849f9" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.json:md5,95f026f441e81a4b345316d980c3570a" + ] + ], + "2": [ + "versions.yml:md5,084e44557eacbb00c1a24dc71ed022cf" + ], + "run_metrics": [ + [ + { + "id": "test" + }, + "test.json:md5,95f026f441e81a4b345316d980c3570a" + ] + ], + "smncopynumber": [ + [ + { + "id": "test" + }, + "test.tsv:md5,0de62f196972c17e1701aa8cea0849f9" + ] + ], + "versions": [ + "versions.yml:md5,084e44557eacbb00c1a24dc71ed022cf" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-27T12:54:21.71312" + } +} \ No newline at end of file diff --git a/modules/nf-core/smncopynumbercaller/tests/nextflow.config b/modules/nf-core/smncopynumbercaller/tests/nextflow.config new file mode 100644 index 000000000..cb64dd58d --- /dev/null +++ b/modules/nf-core/smncopynumbercaller/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: SMNCOPYNUMBERCALLER { + ext.args = '--genome 37' + ext.prefix = { "${meta.id}" } + } +} diff --git a/modules/nf-core/stranger/environment.yml b/modules/nf-core/stranger/environment.yml index 78455053e..910bcae7d 100644 --- a/modules/nf-core/stranger/environment.yml +++ b/modules/nf-core/stranger/environment.yml @@ -1,7 +1,5 @@ -name: stranger channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::stranger=0.8.1 + - bioconda::stranger=0.9.1 diff --git a/modules/nf-core/stranger/main.nf b/modules/nf-core/stranger/main.nf index dd44bb99e..923483f4f 100644 --- a/modules/nf-core/stranger/main.nf +++ b/modules/nf-core/stranger/main.nf @@ -4,8 +4,8 @@ process STRANGER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stranger:0.8.1--pyh5e36f6f_0': - 'biocontainers/stranger:0.8.1--pyh5e36f6f_0' }" + 'https://depot.galaxyproject.org/singularity/stranger:0.9.1--pyh7e72e81_0': + 'biocontainers/stranger:0.9.1--pyh7e72e81_0' }" input: tuple val(meta), path(vcf) @@ -37,7 +37,7 @@ process STRANGER { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.vcf.gz + echo "" | gzip > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/stranger/meta.yml b/modules/nf-core/stranger/meta.yml index 5e0bc0bb0..a5486dbdb 100644 --- a/modules/nf-core/stranger/meta.yml +++ b/modules/nf-core/stranger/meta.yml @@ -1,5 +1,6 @@ name: stranger -description: Annotates output files from ExpansionHunter with the pathologic implications of the repeat sizes. +description: Annotates output files from ExpansionHunter with the pathologic implications + of the repeat sizes. keywords: - STR - repeat_expansions @@ -13,39 +14,42 @@ tools: tool_dev_url: https://github.com/moonso/stranger doi: "10.5281/zenodo.4548873" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF with repeat expansions - pattern: "*.{vcf.gz,vcf}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - variant_catalog: - type: file - description: json file with repeat expansion sites to genotype - pattern: "*.{json}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF with repeat expansions + pattern: "*.{vcf.gz,vcf}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - variant_catalog: + type: file + description: json file with repeat expansion sites to genotype + pattern: "*.{json}" output: - - meta: - type: map - 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: annotated VCF with keys STR_STATUS, NormalMax and PathologicMin - pattern: "*.{vcf.gz}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.gz": + type: file + description: annotated VCF with keys STR_STATUS, NormalMax and PathologicMin + pattern: "*.{vcf.gz}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ljmesi" maintainers: diff --git a/modules/nf-core/stranger/tests/main.nf.test b/modules/nf-core/stranger/tests/main.nf.test new file mode 100644 index 000000000..13c61f43f --- /dev/null +++ b/modules/nf-core/stranger/tests/main.nf.test @@ -0,0 +1,82 @@ +nextflow_process { + + name "Test Process STRANGER" + script "../main.nf" + process "STRANGER" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "stranger" + tag "expansionhunter" + + setup { + run("EXPANSIONHUNTER") { + script "../../expansionhunter/main.nf" + process { + """ + input[0] = [ + [ id:'test' ], // meta map + 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:'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:'catalogue'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/loci/repeat_expansions.json', checkIfExists: true) + ] + """ + } + } + } + + test("homo_sapiens - vcf, repeat_catalogue") { + + when { + process { + """ + input[0] = EXPANSIONHUNTER.out.vcf + input[1] = [ + [id:'catalogue'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/loci/repeat_expansions.json', checkIfExists: true) + ] + """ + } + } + + then { + assert process.success + assert snapshot(process.out).match() + } + + } + + test("homo_sapiens - vcf, repeat_catalogue - stub") { + + options "-stub" + + when { + process { + """ + input[0] = EXPANSIONHUNTER.out.vcf + input[1] = [ + [id:'catalogue'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/loci/repeat_expansions.json', checkIfExists: true) + ] + """ + } + } + + then { + assert process.success + assert snapshot(process.out).match() + } + } +} diff --git a/modules/nf-core/stranger/tests/main.nf.test.snap b/modules/nf-core/stranger/tests/main.nf.test.snap new file mode 100644 index 000000000..3faa4e581 --- /dev/null +++ b/modules/nf-core/stranger/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "homo_sapiens - vcf, repeat_catalogue - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "stranger.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + "versions.yml:md5,68446c9e91e20825f7430db64e85aa7c" + ], + "vcf": [ + [ + { + "id": "test" + }, + "stranger.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,68446c9e91e20825f7430db64e85aa7c" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T08:09:27.725425094" + }, + "homo_sapiens - vcf, repeat_catalogue": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "stranger.vcf.gz:md5,e933cd71d9f9f146265b8e8dd90b712c" + ] + ], + "1": [ + "versions.yml:md5,68446c9e91e20825f7430db64e85aa7c" + ], + "vcf": [ + [ + { + "id": "test" + }, + "stranger.vcf.gz:md5,e933cd71d9f9f146265b8e8dd90b712c" + ] + ], + "versions": [ + "versions.yml:md5,68446c9e91e20825f7430db64e85aa7c" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-03T08:09:14.472394433" + } +} \ No newline at end of file diff --git a/modules/nf-core/stranger/tests/nextflow.config b/modules/nf-core/stranger/tests/nextflow.config new file mode 100644 index 000000000..98459330f --- /dev/null +++ b/modules/nf-core/stranger/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'STRANGER' { + ext.prefix = "stranger" + } + } diff --git a/modules/nf-core/stranger/tests/tags.yml b/modules/nf-core/stranger/tests/tags.yml new file mode 100644 index 000000000..6d11ef42f --- /dev/null +++ b/modules/nf-core/stranger/tests/tags.yml @@ -0,0 +1,2 @@ +stranger: + - "modules/nf-core/stranger/**" diff --git a/modules/nf-core/svdb/merge/environment.yml b/modules/nf-core/svdb/merge/environment.yml index e6fec0887..f725b6524 100644 --- a/modules/nf-core/svdb/merge/environment.yml +++ b/modules/nf-core/svdb/merge/environment.yml @@ -1,10 +1,8 @@ -name: svdb_merge channels: - conda-forge - bioconda - - defaults + dependencies: - - svdb=2.8.1 - # renovate: datasource=conda depName=bioconda/samtools - - samtools=1.19.2 - htslib=1.19.1 + - samtools=1.19.2 + - svdb=2.8.1 diff --git a/modules/nf-core/svdb/merge/meta.yml b/modules/nf-core/svdb/merge/meta.yml index e53e61fe7..7dc7c6758 100644 --- a/modules/nf-core/svdb/merge/meta.yml +++ b/modules/nf-core/svdb/merge/meta.yml @@ -10,33 +10,37 @@ tools: homepage: https://github.com/J35P312/SVDB documentation: https://github.com/J35P312/SVDB/blob/master/README.md licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - priority: - type: list - description: prioritise the input vcf files according to this list, e.g ['tiddit','cnvnator'] - - vcfs: - type: list - description: Two or more VCF files. Order of files should correspond to the order of tags used for priority. - pattern: "*.{vcf,vcf.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - vcfs: + type: list + description: Two or more VCF files. Order of files should correspond to the + order of tags used for priority. + pattern: "*.{vcf,vcf.gz}" + - - priority: + type: list + description: prioritise the input vcf files according to this list, e.g ['tiddit','cnvnator'] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - vcf: - type: file - description: merged VCF file - pattern: "*.vcf.gz" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.vcf.gz": + type: file + description: merged VCF file + pattern: "*.vcf.gz" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" maintainers: diff --git a/modules/nf-core/svdb/query/environment.yml b/modules/nf-core/svdb/query/environment.yml index bf048232f..cd35cf488 100644 --- a/modules/nf-core/svdb/query/environment.yml +++ b/modules/nf-core/svdb/query/environment.yml @@ -1,7 +1,5 @@ -name: svdb_query channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::svdb=2.8.1 diff --git a/modules/nf-core/svdb/query/meta.yml b/modules/nf-core/svdb/query/meta.yml index d11c51e64..f8cd33c8d 100644 --- a/modules/nf-core/svdb/query/meta.yml +++ b/modules/nf-core/svdb/query/meta.yml @@ -10,52 +10,54 @@ tools: homepage: https://github.com/J35P312/SVDB documentation: https://github.com/J35P312/SVDB/blob/master/README.md licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - in_occs: - type: list - description: A list of allele count tags - - in_frqs: - type: list - description: A list of allele frequency tags - - vcf: - type: file - description: query vcf file - pattern: "*.{vcf,vcf.gz}" - - vcf_dbs: - type: file - description: path to a database vcf, or a comma separated list of vcfs - pattern: "*.{vcf,vcf.gz}" - - bedpe_dbs: - type: file - description: path to a SV database of the following format chrA-posA-chrB-posB-type-count-frequency, or a comma separated list of files - pattern: "*.{bedpe}" - + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: query vcf file + pattern: "*.{vcf,vcf.gz}" + - - in_occs: + type: list + description: A list of allele count tags + - - in_frqs: + type: list + description: A list of allele frequency tags + - - out_occs: + type: list + description: A list of allele count tags + - - out_frqs: + type: list + description: A list of allele frequency tags + - - vcf_dbs: + type: file + description: path to a database vcf, or a comma separated list of vcfs + pattern: "*.{vcf,vcf.gz}" + - - bedpe_dbs: + type: file + description: path to a SV database of the following format chrA-posA-chrB-posB-type-count-frequency, + or a comma separated list of files + pattern: "*.{bedpe}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - out_occs: - type: list - description: A list of allele count tags - - out_frqs: - type: list - description: A list of allele frequency tags - vcf: - type: file - description: Annotated output VCF file - pattern: "*_query.vcf" - + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*_query.vcf": + type: file + description: Annotated output VCF file + pattern: "*_query.vcf" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@ramprasadn" diff --git a/modules/nf-core/svdb/query/tests/main.nf.test b/modules/nf-core/svdb/query/tests/main.nf.test index edf801f78..72e829158 100644 --- a/modules/nf-core/svdb/query/tests/main.nf.test +++ b/modules/nf-core/svdb/query/tests/main.nf.test @@ -14,13 +14,13 @@ nextflow_process { process { """ input[0] = Channel.of([ [ id:'test' ], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['test_sv_vcf'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/sv_query.vcf.gz', checkIfExists: true) ] ]) input[1] = ['AC'] input[2] = ['AF'] input[3] = ['gnomad_svAC'] input[4] = ['gnomad_svAF'] - input[5] = Channel.of([file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_sv_vcf_gz'], checkIfExists: true)]) + input[5] = Channel.of([file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1-sv.vcf.gz', checkIfExists: true)]) input[6] = [] """ } diff --git a/modules/nf-core/tabix/bgzip/environment.yml b/modules/nf-core/tabix/bgzip/environment.yml index 361c078b0..017c259da 100644 --- a/modules/nf-core/tabix/bgzip/environment.yml +++ b/modules/nf-core/tabix/bgzip/environment.yml @@ -1,8 +1,7 @@ -name: tabix_bgzip channels: - conda-forge - bioconda - - defaults + dependencies: + - bioconda::htslib=1.20 - bioconda::tabix=1.11 - - bioconda::htslib=1.19.1 diff --git a/modules/nf-core/tabix/bgzip/main.nf b/modules/nf-core/tabix/bgzip/main.nf index 3065dab04..67991c74b 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/htslib:1.19.1--h81da01d_1' : - 'biocontainers/htslib:1.19.1--h81da01d_1' }" + 'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' : + 'biocontainers/htslib:1.20--h5efdd21_2' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/tabix/bgzip/meta.yml b/modules/nf-core/tabix/bgzip/meta.yml index 621d49ea0..131e92cfd 100644 --- a/modules/nf-core/tabix/bgzip/meta.yml +++ b/modules/nf-core/tabix/bgzip/meta.yml @@ -13,33 +13,42 @@ tools: documentation: http://www.htslib.org/doc/bgzip.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] + identifier: biotools:tabix input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: file to compress or to decompress + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: file to compress or to decompress output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - output: - type: file - description: Output compressed/decompressed file - pattern: "*." + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${output}: + type: file + description: Output compressed/decompressed file + pattern: "*." - gzi: - type: file - description: Optional gzip index file for compressed inputs - pattern: "*.gzi" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${output}.gzi: + type: file + description: Optional gzip index file for compressed inputs + pattern: "*.gzi" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/tabix/bgzip/tests/main.nf.test b/modules/nf-core/tabix/bgzip/tests/main.nf.test index 95fd4c506..d784aa070 100644 --- a/modules/nf-core/tabix/bgzip/tests/main.nf.test +++ b/modules/nf-core/tabix/bgzip/tests/main.nf.test @@ -15,7 +15,7 @@ nextflow_process { """ input[0] = [ [ id:'bgzip_test' ], - [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] ] """ } @@ -39,7 +39,7 @@ nextflow_process { """ input[0] = [ [ id:'bedgz_test' ], - [ file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed.gz', checkIfExists: true) ] ] """ } @@ -66,7 +66,7 @@ nextflow_process { """ input[0] = [ [ id:"test_stub" ], - [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] ] """ } @@ -91,7 +91,7 @@ nextflow_process { """ input[0] = [ [ id:"gzi_compress_test" ], - [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true) ] ] """ } diff --git a/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap b/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap index 53d599328..0748143f0 100644 --- a/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap +++ b/modules/nf-core/tabix/bgzip/tests/main.nf.test.snap @@ -3,6 +3,10 @@ "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": { @@ -20,7 +24,7 @@ ], "2": [ - "versions.yml:md5,e023292de6ee109a44fc67475d658174" + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" ], "gzi": [ @@ -34,16 +38,24 @@ ] ], "versions": [ - "versions.yml:md5,e023292de6ee109a44fc67475d658174" + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" ] } ], - "timestamp": "2024-02-19T14:52:12.422209" + "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": { @@ -61,7 +73,7 @@ ], "2": [ - "versions.yml:md5,e023292de6ee109a44fc67475d658174" + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" ], "gzi": [ @@ -75,11 +87,15 @@ ] ], "versions": [ - "versions.yml:md5,e023292de6ee109a44fc67475d658174" + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" ] } ], - "timestamp": "2024-02-19T14:52:03.706028" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:28:22.087769106" }, "sarscov2_vcf_bgzip_compress_gzi": { "content": [ @@ -101,7 +117,7 @@ ] ], "2": [ - "versions.yml:md5,e023292de6ee109a44fc67475d658174" + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" ], "gzi": [ [ @@ -120,22 +136,34 @@ ] ], "versions": [ - "versions.yml:md5,e023292de6ee109a44fc67475d658174" + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" ] } ], - "timestamp": "2024-02-19T14:52:29.271494" + "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": { @@ -158,7 +186,7 @@ ] ], "2": [ - "versions.yml:md5,e023292de6ee109a44fc67475d658174" + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" ], "gzi": [ [ @@ -177,10 +205,14 @@ ] ], "versions": [ - "versions.yml:md5,e023292de6ee109a44fc67475d658174" + "versions.yml:md5,753c29916d45debdde52f4ac7c745f61" ] } ], - "timestamp": "2024-02-19T14:52:20.769619" + "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/tabix/environment.yml b/modules/nf-core/tabix/tabix/environment.yml index 76b45e16c..017c259da 100644 --- a/modules/nf-core/tabix/tabix/environment.yml +++ b/modules/nf-core/tabix/tabix/environment.yml @@ -1,8 +1,7 @@ -name: tabix_tabix channels: - conda-forge - bioconda - - defaults + dependencies: + - bioconda::htslib=1.20 - bioconda::tabix=1.11 - - bioconda::htslib=1.19.1 diff --git a/modules/nf-core/tabix/tabix/main.nf b/modules/nf-core/tabix/tabix/main.nf index 1737141d7..13acd670e 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/htslib:1.19.1--h81da01d_1' : - 'biocontainers/htslib:1.19.1--h81da01d_1' }" + '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}": @@ -33,8 +36,8 @@ process TABIX_TABIX { """ touch ${tab}.tbi touch ${tab}.csi - cat <<-END_VERSIONS > versions.yml + 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/meta.yml b/modules/nf-core/tabix/tabix/meta.yml index ae5b4f439..7864832d9 100644 --- a/modules/nf-core/tabix/tabix/meta.yml +++ b/modules/nf-core/tabix/tabix/meta.yml @@ -11,34 +11,43 @@ tools: documentation: https://www.htslib.org/doc/tabix.1.html doi: 10.1093/bioinformatics/btq671 licence: ["MIT"] + identifier: biotools:tabix input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - tab: - type: file - description: TAB-delimited genome position file compressed with bgzip - pattern: "*.{bed.gz,gff.gz,sam.gz,vcf.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tab: + type: file + description: TAB-delimited genome position file compressed with bgzip + pattern: "*.{bed.gz,gff.gz,sam.gz,vcf.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - tbi: - type: file - description: tabix index file - pattern: "*.{tbi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbi": + type: file + description: tabix index file + pattern: "*.{tbi}" - csi: - type: file - description: coordinate sorted index file - pattern: "*.{csi}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: coordinate sorted index file + pattern: "*.{csi}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/tabix/tabix/tests/main.nf.test b/modules/nf-core/tabix/tabix/tests/main.nf.test index 3a150c708..102b0d7bf 100644 --- a/modules/nf-core/tabix/tabix/tests/main.nf.test +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test @@ -16,7 +16,7 @@ nextflow_process { """ input[0] = [ [ id:'tbi_bed' ], - [ file(params.test_data['sarscov2']['genome']['test_bed_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed.gz', checkIfExists: true) ] ] """ } @@ -25,11 +25,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.tbi[0][1]).name - ).match("tbi_bed") - } + process.out, + file(process.out.tbi[0][1]).name + ).match() } ) } } @@ -41,7 +40,7 @@ nextflow_process { """ input[0] = [ [ id:'tbi_gff' ], - [ file(params.test_data['sarscov2']['genome']['genome_gff3_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true) ] ] """ } @@ -50,11 +49,9 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.tbi[0][1]).name - ).match("tbi_gff") - } + process.out, + file(process.out.tbi[0][1]).name).match() } ) } @@ -67,7 +64,7 @@ nextflow_process { """ input[0] = [ [ id:'tbi_vcf' ], - [ 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) ] ] """ } @@ -76,11 +73,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.tbi[0][1]).name - ).match("tbi_vcf") - } + process.out, + file(process.out.tbi[0][1]).name + ).match() } ) } @@ -93,7 +89,7 @@ nextflow_process { """ input[0] = [ [ id:'vcf_csi' ], - [ 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) ] ] """ } @@ -102,11 +98,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.csi[0][1]).name - ).match("vcf_csi") - } + process.out, + file(process.out.csi[0][1]).name + ).match() } ) } @@ -120,7 +115,7 @@ nextflow_process { """ input[0] = [ [ id:'vcf_csi_stub' ], - [ 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) ] ] """ } @@ -129,11 +124,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.csi[0][1]).name - ).match("vcf_csi_stub") - } + 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 index 034e38b68..c2b9ed0b8 100644 --- a/modules/nf-core/tabix/tabix/tests/main.nf.test.snap +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test.snap @@ -1,16 +1,4 @@ { - "vcf_csi_stub": { - "content": [ - "test.vcf.gz.csi" - ], - "timestamp": "2024-03-04T14:51:59.788002" - }, - "tbi_gff": { - "content": [ - "genome.gff3.gz.tbi" - ], - "timestamp": "2024-02-19T14:53:37.420216" - }, "sarscov2_gff_tbi": { "content": [ { @@ -19,14 +7,14 @@ { "id": "tbi_gff" }, - "genome.gff3.gz.tbi:md5,53fc683fd217aae47ef10d23c52a9178" + "genome.gff3.gz.tbi:md5,f79a67d95a98076e04fbe0455d825926" ] ], "1": [ ], "2": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ @@ -36,15 +24,20 @@ { "id": "tbi_gff" }, - "genome.gff3.gz.tbi:md5,53fc683fd217aae47ef10d23c52a9178" + "genome.gff3.gz.tbi:md5,f79a67d95a98076e04fbe0455d825926" ] ], "versions": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } + }, + "genome.gff3.gz.tbi" ], - "timestamp": "2024-02-19T14:53:37.388157" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:25.653807564" }, "sarscov2_bedgz_tbi": { "content": [ @@ -54,14 +47,14 @@ { "id": "tbi_bed" }, - "test.bed.gz.tbi:md5,0f17d85e7f0a042b2aa367b70df224f8" + "test.bed.gz.tbi:md5,9a761d51cc81835fd1199201fdbcdd5d" ] ], "1": [ ], "2": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ @@ -71,27 +64,20 @@ { "id": "tbi_bed" }, - "test.bed.gz.tbi:md5,0f17d85e7f0a042b2aa367b70df224f8" + "test.bed.gz.tbi:md5,9a761d51cc81835fd1199201fdbcdd5d" ] ], "versions": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } - ], - "timestamp": "2024-02-19T14:53:28.879408" - }, - "tbi_vcf": { - "content": [ - "test.vcf.gz.tbi" - ], - "timestamp": "2024-02-19T14:53:46.402522" - }, - "vcf_csi": { - "content": [ - "test.vcf.gz.csi" + }, + "test.bed.gz.tbi" ], - "timestamp": "2024-02-19T14:53:54.921189" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:09.754082161" }, "sarscov2_vcf_tbi": { "content": [ @@ -101,14 +87,14 @@ { "id": "tbi_vcf" }, - "test.vcf.gz.tbi:md5,897f3f378a811b90e6dee56ce08d2bcf" + "test.vcf.gz.tbi:md5,d22e5b84e4fcd18792179f72e6da702e" ] ], "1": [ ], "2": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ @@ -118,15 +104,20 @@ { "id": "tbi_vcf" }, - "test.vcf.gz.tbi:md5,897f3f378a811b90e6dee56ce08d2bcf" + "test.vcf.gz.tbi:md5,d22e5b84e4fcd18792179f72e6da702e" ] ], "versions": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } + }, + "test.vcf.gz.tbi" ], - "timestamp": "2024-02-19T14:53:46.370358" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:40.042648294" }, "sarscov2_vcf_csi_stub": { "content": [ @@ -148,7 +139,7 @@ ] ], "2": [ - "versions.yml:md5,3d45df6d80883bad358631069a2940fd" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ [ @@ -167,11 +158,16 @@ ] ], "versions": [ - "versions.yml:md5,3d45df6d80883bad358631069a2940fd" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } + }, + "test.vcf.gz.csi" ], - "timestamp": "2024-03-04T14:51:59.766184" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:07:08.700367261" }, "sarscov2_vcf_csi": { "content": [ @@ -184,34 +180,33 @@ { "id": "vcf_csi" }, - "test.vcf.gz.csi:md5,0731ad6f40104d2bbb1a2cc478ef8f03" + "test.vcf.gz.csi:md5,04b41c1efd9ab3c6b1e008a286e27d2b" ] ], "2": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ [ { "id": "vcf_csi" }, - "test.vcf.gz.csi:md5,0731ad6f40104d2bbb1a2cc478ef8f03" + "test.vcf.gz.csi:md5,04b41c1efd9ab3c6b1e008a286e27d2b" ] ], "tbi": [ ], "versions": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } - ], - "timestamp": "2024-02-19T14:53:54.886876" - }, - "tbi_bed": { - "content": [ - "test.bed.gz.tbi" + }, + "test.vcf.gz.csi" ], - "timestamp": "2024-02-19T14:53:28.947628" + "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/tiddit/cov/environment.yml b/modules/nf-core/tiddit/cov/environment.yml index 6b024492e..2fd01cfd4 100644 --- a/modules/nf-core/tiddit/cov/environment.yml +++ b/modules/nf-core/tiddit/cov/environment.yml @@ -1,7 +1,5 @@ -name: tiddit_cov channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::tiddit=3.6.1 diff --git a/modules/nf-core/tiddit/cov/meta.yml b/modules/nf-core/tiddit/cov/meta.yml index c28546cc8..88b72641d 100644 --- a/modules/nf-core/tiddit/cov/meta.yml +++ b/modules/nf-core/tiddit/cov/meta.yml @@ -12,45 +12,54 @@ tools: documentation: https://github.com/SciLifeLab/TIDDIT/blob/master/README.md doi: "10.12688/f1000research.11168.1" licence: ["GPL v3"] + identifier: biotools:tiddit input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: | - Reference genome file. Only needed when passing in CRAM instead of BAM. - If not using CRAM, please pass an empty file instead. - pattern: "*.fasta" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: | + Reference genome file. Only needed when passing in CRAM instead of BAM. + If not using CRAM, please pass an empty file instead. + pattern: "*.fasta" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - cov: - type: file - description: The coverage of different regions in bed format. Optional. - pattern: "*.bed" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bed": + type: file + description: The coverage of different regions in bed format. Optional. + pattern: "*.bed" - wig: - type: file - description: The coverage of different regions in WIG format. Optional. - pattern: "*.wig" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.wig": + type: file + description: The coverage of different regions in WIG format. Optional. + pattern: "*.wig" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@projectoriented" - "@ramprasadn" diff --git a/modules/nf-core/tiddit/cov/tests/main.nf.test b/modules/nf-core/tiddit/cov/tests/main.nf.test index 72746648a..24c273d86 100644 --- a/modules/nf-core/tiddit/cov/tests/main.nf.test +++ b/modules/nf-core/tiddit/cov/tests/main.nf.test @@ -16,12 +16,12 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true) ] input[1] = [ [:], // meta map - 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) ] """ } @@ -30,9 +30,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.cov).match("cov") }, { assert process.out.cov[0][1] ==~ ".*/test.bed" }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot( + process.out.cov, + process.out.versions + ).match() + } ) } @@ -45,7 +48,7 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) ] input[1] = [ [:], [] ] """ @@ -55,9 +58,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.cov).match("cov") }, { assert process.out.cov[0][1] ==~ ".*/test.bed" }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot( + process.out.cov, + process.out.versions + ).match() + } ) } @@ -72,12 +78,12 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true) ] input[1] = [ [:], // meta map - 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) ] """ } @@ -86,9 +92,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.wig).match("wig") }, { assert process.out.wig[0][1] ==~ ".*/test.wig" }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot( + process.out.wig, + process.out.versions + ).match() + } ) } @@ -103,7 +112,7 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) ] input[1] = [ [:], [] ] @@ -114,9 +123,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.wig).match("wig") }, { assert process.out.wig[0][1] ==~ ".*/test.wig" }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot( + process.out.wig, + process.out.versions + ).match() + } ) } @@ -133,12 +145,12 @@ nextflow_process { input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true) ] input[1] = [ [:], // meta map - 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) ] """ } @@ -147,11 +159,14 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.cov).match("cov - stub") }, { assert process.out.cov[0][1] ==~ ".*/test.bed" }, - { assert snapshot(process.out.wig).match("wig - stub") }, { assert process.out.wig[0][1] ==~ ".*/test.wig" }, - { assert snapshot(process.out.versions).match("versions - stub") } + { assert snapshot( + process.out.cov, + process.out.wig, + process.out.versions + ).match() + } ) } diff --git a/modules/nf-core/tiddit/cov/tests/main.nf.test.snap b/modules/nf-core/tiddit/cov/tests/main.nf.test.snap index dcd24edca..5067886d6 100644 --- a/modules/nf-core/tiddit/cov/tests/main.nf.test.snap +++ b/modules/nf-core/tiddit/cov/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "wig": { + "homo_sapiens - bam - wig": { "content": [ [ [ @@ -9,11 +9,18 @@ }, "test.wig:md5,7c46b6ef30574acdce0ad854f40126ae" ] + ], + [ + "versions.yml:md5,49dfdb5a33d1c11db488fb02d1c95c5a" ] ], - "timestamp": "2023-12-22T11:24:06.649602" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-30T09:44:07.66262" }, - "wig - stub": { + "homo_sapiens - cram - wig": { "content": [ [ [ @@ -21,21 +28,50 @@ "id": "test", "single_end": false }, - "test.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.wig:md5,7c46b6ef30574acdce0ad854f40126ae" ] + ], + [ + "versions.yml:md5,49dfdb5a33d1c11db488fb02d1c95c5a" ] ], - "timestamp": "2023-12-22T11:30:00.831686" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-30T09:44:01.397993" }, - "versions": { + "homo_sapiens - stub": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], [ "versions.yml:md5,49dfdb5a33d1c11db488fb02d1c95c5a" ] ], - "timestamp": "2023-12-22T11:23:58.227251" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-30T09:44:12.873466" }, - "cov": { + "homo_sapiens - bam - bed": { "content": [ [ [ @@ -45,19 +81,18 @@ }, "test.bed:md5,caf0742f2d4a6f713ceb85268dd48c14" ] - ] - ], - "timestamp": "2023-12-22T11:23:58.220115" - }, - "versions - stub": { - "content": [ + ], [ "versions.yml:md5,49dfdb5a33d1c11db488fb02d1c95c5a" ] ], - "timestamp": "2023-12-22T11:30:00.834854" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-30T09:43:54.542951" }, - "cov - stub": { + "homo_sapiens - cram - bed": { "content": [ [ [ @@ -65,10 +100,17 @@ "id": "test", "single_end": false }, - "test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bed:md5,caf0742f2d4a6f713ceb85268dd48c14" ] + ], + [ + "versions.yml:md5,49dfdb5a33d1c11db488fb02d1c95c5a" ] ], - "timestamp": "2023-12-22T11:30:00.826974" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-30T09:43:47.441318" } } \ No newline at end of file diff --git a/modules/nf-core/tiddit/sv/environment.yml b/modules/nf-core/tiddit/sv/environment.yml index d0367f171..2fd01cfd4 100644 --- a/modules/nf-core/tiddit/sv/environment.yml +++ b/modules/nf-core/tiddit/sv/environment.yml @@ -1,7 +1,5 @@ -name: tiddit_sv channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::tiddit=3.6.1 diff --git a/modules/nf-core/tiddit/sv/meta.yml b/modules/nf-core/tiddit/sv/meta.yml index bfcbc4e3f..21527baf1 100644 --- a/modules/nf-core/tiddit/sv/meta.yml +++ b/modules/nf-core/tiddit/sv/meta.yml @@ -11,56 +11,65 @@ tools: documentation: https://github.com/SciLifeLab/TIDDIT/blob/master/README.md doi: 10.12688/f1000research.11168.1 licence: ["GPL-3.0-or-later"] + identifier: biotools:tiddit input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file - pattern: "*.{bam,cram}" - - input_index: - type: file - description: BAM/CRAM index file - pattern: "*.{bai,crai}" - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test_fasta']` - - fasta: - type: file - description: Input FASTA file - pattern: "*.{fasta,fa}" - - meta3: - type: map - description: | - Groovy Map containing sample information from bwa index - e.g. `[ id:'test_bwa-index' ]` - - bwa_index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - input_index: + type: file + description: BAM/CRAM index file + pattern: "*.{bai,crai}" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test_fasta']` + - fasta: + type: file + description: Input FASTA file + pattern: "*.{fasta,fa}" + - - meta3: + type: map + description: | + Groovy Map containing sample information from bwa index + e.g. `[ id:'test_bwa-index' ]` + - bwa_index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - vcf: - type: file - description: vcf - pattern: "*.{vcf}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.vcf": + type: file + description: vcf + pattern: "*.{vcf}" - ploidy: - type: file - description: tab - pattern: "*.{ploidies.tab}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.ploidies.tab": + type: file + description: tab + pattern: "*.{ploidies.tab}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@maxulysse" maintainers: diff --git a/modules/nf-core/ucsc/wigtobigwig/environment.yml b/modules/nf-core/ucsc/wigtobigwig/environment.yml index 3e88a5dd4..331ad3b27 100644 --- a/modules/nf-core/ucsc/wigtobigwig/environment.yml +++ b/modules/nf-core/ucsc/wigtobigwig/environment.yml @@ -1,7 +1,5 @@ -name: ucsc_wigtobigwig channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::ucsc-wigtobigwig=447 diff --git a/modules/nf-core/ucsc/wigtobigwig/meta.yml b/modules/nf-core/ucsc/wigtobigwig/meta.yml index f74764806..97bf98b16 100644 --- a/modules/nf-core/ucsc/wigtobigwig/meta.yml +++ b/modules/nf-core/ucsc/wigtobigwig/meta.yml @@ -11,28 +11,35 @@ tools: or bedGraph format) to binary big wig format homepage: http://www.genome.ucsc.edu/goldenPath/help/bigWig.html licence: ["varies; see http://genome.ucsc.edu/license"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - wig: - type: file - description: wig file - pattern: "*.{wig}" - - chromsizes: - type: file - description: chromosome sizes file + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - wig: + type: file + description: wig file + pattern: "*.{wig}" + - - sizes: + type: file + description: Chromosome sizes file output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - bw: - type: file - description: bigwig file - pattern: "*.{bw}" + - meta: + type: file + description: bigwig file + pattern: "*.{bw}" + - "*.bw": + type: file + description: bigwig file + pattern: "*.{bw}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jianhong" - "@projectoriented" diff --git a/modules/nf-core/ucsc/wigtobigwig/tests/main.nf.test b/modules/nf-core/ucsc/wigtobigwig/tests/main.nf.test new file mode 100644 index 000000000..b48ce0357 --- /dev/null +++ b/modules/nf-core/ucsc/wigtobigwig/tests/main.nf.test @@ -0,0 +1,59 @@ + +nextflow_process { + + name "Test Process UCSC_WIGTOBIGWIG" + script "../main.nf" + process "UCSC_WIGTOBIGWIG" + + tag "modules" + tag "modules_nfcore" + tag "ucsc" + tag "ucsc/wigtobigwig" + + test("test-ucsc-wigtobigwig") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map, + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/wig/test.wig.gz', checkIfExists: true) + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-ucsc-wigtobigwig-stub") { + options '-stub' + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map, + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/wig/test.wig.gz', checkIfExists: true) + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/ucsc/wigtobigwig/tests/main.nf.test.snap b/modules/nf-core/ucsc/wigtobigwig/tests/main.nf.test.snap new file mode 100644 index 000000000..acc59555c --- /dev/null +++ b/modules/nf-core/ucsc/wigtobigwig/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "test-ucsc-wigtobigwig": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bw:md5,b64af7003665dc51fae958216b06ed95" + ] + ], + "1": [ + "versions.yml:md5,e99b51033a14e1602fe195965a109feb" + ], + "bw": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bw:md5,b64af7003665dc51fae958216b06ed95" + ] + ], + "versions": [ + "versions.yml:md5,e99b51033a14e1602fe195965a109feb" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-27T11:54:03.735102" + }, + "test-ucsc-wigtobigwig-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bw:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,e99b51033a14e1602fe195965a109feb" + ], + "bw": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bw:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e99b51033a14e1602fe195965a109feb" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-27T11:54:07.924401" + } +} \ No newline at end of file diff --git a/modules/nf-core/untar/environment.yml b/modules/nf-core/untar/environment.yml index 0c9cbb101..c7794856d 100644 --- a/modules/nf-core/untar/environment.yml +++ b/modules/nf-core/untar/environment.yml @@ -1,11 +1,7 @@ -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 8a75bb957..9bd8f5546 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/meta.yml b/modules/nf-core/untar/meta.yml index a9a2110f5..290346b3f 100644 --- a/modules/nf-core/untar/meta.yml +++ b/modules/nf-core/untar/meta.yml @@ -10,30 +10,33 @@ tools: Extract tar.gz files. documentation: https://www.gnu.org/software/tar/manual/ licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - archive: - type: file - description: File to be untar - pattern: "*.{tar}.{gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - archive: + type: file + description: File to be untar + pattern: "*.{tar}.{gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - untar: - type: directory - description: Directory containing contents of archive - pattern: "*/" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - $prefix: + type: directory + description: Directory containing contents of archive + pattern: "*/" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/untar/tests/main.nf.test b/modules/nf-core/untar/tests/main.nf.test index 2a7c97bf8..c957517aa 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 64550292f..ceb91b792 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/upd/environment.yml b/modules/nf-core/upd/environment.yml index 77b652272..307f13b37 100644 --- a/modules/nf-core/upd/environment.yml +++ b/modules/nf-core/upd/environment.yml @@ -1,7 +1,5 @@ -name: upd channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::upd=0.1.1 diff --git a/modules/nf-core/upd/meta.yml b/modules/nf-core/upd/meta.yml index 7682e337b..a0e900632 100644 --- a/modules/nf-core/upd/meta.yml +++ b/modules/nf-core/upd/meta.yml @@ -1,4 +1,3 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "upd" description: Simple software to call UPD regions from germline exome/wgs trios. @@ -12,32 +11,35 @@ tools: homepage: https://github.com/bjhall/upd documentation: https://github.com/bjhall/upd tool_dev_url: https://github.com/bjhall/upd - licence: "['MIT']" + licence: ["MIT"] + identifier: "" input: # Only when we have meta - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF file - pattern: "*.{vcf,vcf.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file + pattern: "*.{vcf,vcf.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - bed: - type: file - description: BED file - pattern: "*.{bed}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bed": + type: file + description: BED file + pattern: "*.{bed}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@hrydbeck" maintainers: diff --git a/modules/nf-core/upd/tests/main.nf.test b/modules/nf-core/upd/tests/main.nf.test new file mode 100644 index 000000000..8e080addf --- /dev/null +++ b/modules/nf-core/upd/tests/main.nf.test @@ -0,0 +1,57 @@ + +nextflow_process { + + name "Test Process UPD" + script "../main.nf" + process "UPD" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "upd" + + test("test-upd") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky_minimal.vcf.gz', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-upd-stub") { + options '-stub' + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/ped/justhusky_minimal.vcf.gz', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/upd/tests/main.nf.test.snap b/modules/nf-core/upd/tests/main.nf.test.snap new file mode 100644 index 000000000..866792f11 --- /dev/null +++ b/modules/nf-core/upd/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "test-upd-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,3fef0b4c41b8cbf95be59f62771e38ea" + ], + "bed": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,3fef0b4c41b8cbf95be59f62771e38ea" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-27T11:51:33.816939" + }, + "test-upd": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bed:md5,beea3890636075d5c99db1b0d74f9ff5" + ] + ], + "1": [ + "versions.yml:md5,3fef0b4c41b8cbf95be59f62771e38ea" + ], + "bed": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bed:md5,beea3890636075d5c99db1b0d74f9ff5" + ] + ], + "versions": [ + "versions.yml:md5,3fef0b4c41b8cbf95be59f62771e38ea" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-27T11:51:29.35452" + } +} \ No newline at end of file diff --git a/modules/nf-core/upd/tests/nextflow.config b/modules/nf-core/upd/tests/nextflow.config new file mode 100644 index 000000000..6e07a4e49 --- /dev/null +++ b/modules/nf-core/upd/tests/nextflow.config @@ -0,0 +1,3 @@ +process { + ext.args = { "--proband earlycasualcaiman --father hugelymodelbat --mother slowlycivilbuck --af-tag AF regions" } +} diff --git a/modules/nf-core/vcf2cytosure/environment.yml b/modules/nf-core/vcf2cytosure/environment.yml index d4bf99590..d078bfaed 100644 --- a/modules/nf-core/vcf2cytosure/environment.yml +++ b/modules/nf-core/vcf2cytosure/environment.yml @@ -1,7 +1,5 @@ -name: vcf2cytosure channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::vcf2cytosure=0.9.1 diff --git a/modules/nf-core/vcf2cytosure/meta.yml b/modules/nf-core/vcf2cytosure/meta.yml index 2430f1aee..0c38d9c8d 100644 --- a/modules/nf-core/vcf2cytosure/meta.yml +++ b/modules/nf-core/vcf2cytosure/meta.yml @@ -1,4 +1,3 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "vcf2cytosure" description: Convert VCF with structural variations to CytoSure format @@ -14,64 +13,65 @@ tools: documentation: "https://github.com/NBISweden/vcf2cytosure" tool_dev_url: "https://github.com/NBISweden/vcf2cytosure" licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - meta2: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - meta3: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - meta4: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - sv_vcf: - type: file - description: VCF file with structural variants - pattern: "*.{vcf,vcf.gz}" - - coverage_bed: - type: file - description: Bed file with coverage data - pattern: "*.bed" - - cns: - type: file - description: CN file from CNVkit, not compatible with coverage_bed file - - snv_vcf: - type: file - description: | - VCF file with SNVs to calculate probe coverage, - not compatible with coverage_bed + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - sv_vcf: + type: file + description: VCF file with structural variants pattern: "*.{vcf,vcf.gz}" - - blacklist_bed: - type: file - description: Bed file with regions to exclude - pattern: "*.bed" - + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - coverage_bed: + type: file + description: Bed file with coverage data + pattern: "*.bed" + - - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - cns: + type: file + description: CN file from CNVkit, not compatible with coverage_bed file + - - meta4: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - snv_vcf: + type: file + description: | + VCF file with SNVs to calculate probe coverage, + not compatible with coverage_bed + pattern: "*.{vcf,vcf.gz}" + - - blacklist_bed: + type: file + description: Bed file with regions to exclude + pattern: "*.bed" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - cgh: - type: file - description: SV:s in CytoSure format - pattern: "*.cgh" - + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*.cgh": + type: file + description: SV:s in CytoSure format + pattern: "*.cgh" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@jemten" diff --git a/modules/nf-core/vcf2cytosure/tests/main.nf.test b/modules/nf-core/vcf2cytosure/tests/main.nf.test index d017cb0e5..edd3063d6 100644 --- a/modules/nf-core/vcf2cytosure/tests/main.nf.test +++ b/modules/nf-core/vcf2cytosure/tests/main.nf.test @@ -15,11 +15,11 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['na24385_chr22_sv_vcf'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz', checkIfExists: true) ] ] input[1] = [ [ id:'test' ], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['na24385_chr22_coverage'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bedgraph/NA24385_coverage.bed', checkIfExists: true) ] ] input[2] = [ [:], [] ] input[3] = [ [:], [] ] @@ -47,11 +47,11 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['na24385_chr22_sv_vcf'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz', checkIfExists: true) ] ] input[1] = [ [ id:'test' ], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['na24385_chr22_coverage'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bedgraph/NA24385_coverage.bed', checkIfExists: true) ] ] input[2] = [ [:], [] ] input[3] = [ [:], [] ] diff --git a/modules/nf-core/vcfanno/environment.yml b/modules/nf-core/vcfanno/environment.yml index f336cc6b0..32c48b15b 100644 --- a/modules/nf-core/vcfanno/environment.yml +++ b/modules/nf-core/vcfanno/environment.yml @@ -1,7 +1,5 @@ -name: vcfanno channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::vcfanno=0.3.5 diff --git a/modules/nf-core/vcfanno/meta.yml b/modules/nf-core/vcfanno/meta.yml index 89c781ad1..18d27127c 100644 --- a/modules/nf-core/vcfanno/meta.yml +++ b/modules/nf-core/vcfanno/meta.yml @@ -1,5 +1,6 @@ name: vcfanno -description: quickly annotate your VCF with any number of INFO fields from any number of VCFs or BED files +description: quickly annotate your VCF with any number of INFO fields from any number + of VCFs or BED files keywords: - vcf - bed @@ -14,48 +15,53 @@ tools: tool_dev_url: https://github.com/brentp/vcfanno doi: "10.1186/s13059-016-0973-5" license: ["MIT"] + identifier: biotools:vcfanno input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: query VCF file - pattern: "*.{vcf, vcf.gz}" - - vcf_tabix: - type: file - description: tabix index of query VCF - only needed if vcf is compressed - pattern: "*.vcf.gz.tbi" - - specific_resources: - type: map - description: A list of sample specific reference files defined in toml config, must also include indices if bgzipped. - - toml: - type: file - description: configuration file with reference file basenames - pattern: "*.toml" - - lua: - type: file - description: Lua file for custom annotations - pattern: "*.lua" - - resources: - type: map - description: List of reference files defined in toml config, must also include indices if bgzipped. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: query VCF file + pattern: "*.{vcf, vcf.gz}" + - tbi: + type: file + description: tabix index file for the query VCF + pattern: "*.tbi" + - specific_resources: + type: map + description: A list of sample specific reference files defined in toml config, + must also include indices if bgzipped. + - - toml: + type: file + description: configuration file with reference file basenames + pattern: "*.toml" + - - lua: + type: file + description: Lua file for custom annotations + pattern: "*.lua" + - - resources: + type: map + description: List of reference files defined in toml config, must also include + indices if bgzipped. output: - - meta: - type: map - 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: Annotated VCF file - pattern: "*.vcf" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.vcf": + type: file + description: Annotated VCF file + pattern: "*.vcf" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@projectoriented" - "@matthdsm" diff --git a/modules/nf-core/vcfanno/tests/main.nf.test b/modules/nf-core/vcfanno/tests/main.nf.test index b28431b27..8bbcfd894 100644 --- a/modules/nf-core/vcfanno/tests/main.nf.test +++ b/modules/nf-core/vcfanno/tests/main.nf.test @@ -15,11 +15,11 @@ nextflow_process { """ input[0] = [ [ id:'test_compressed', single_end:false ], // 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.test_data['sarscov2']['illumina']['test2_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.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true) ] - input[1] = file(params.test_data['homo_sapiens']['genome']['vcfanno_toml'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml', checkIfExists: true) input[2] = [] input[3] = [ file("https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz", checkIfExists: true), @@ -45,11 +45,11 @@ nextflow_process { """ input[0] = [ [ id:'test_uncompressed', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true), [], - file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists:true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true) ] - input[1] = file(params.test_data['homo_sapiens']['genome']['vcfanno_toml'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml', checkIfExists: true) input[2] = [] input[3] = [ file("https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz", checkIfExists: true), @@ -77,11 +77,11 @@ nextflow_process { """ input[0] = [ [ id:'test_compressed', single_end:false ], // 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.test_data['sarscov2']['illumina']['test2_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.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true) ] - input[1] = file(params.test_data['homo_sapiens']['genome']['vcfanno_toml'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml', checkIfExists: true) input[2] = [] input[3] = [ file("https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz", checkIfExists: true), From 0e1f3b2b115a2addcf21f8b37582df5eaec4cc7b Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:29:02 +0200 Subject: [PATCH 2/7] subworkflow changes --- subworkflows/local/variant_calling/call_snv_deepvariant.nf | 3 +-- subworkflows/local/variant_calling/call_snv_sentieon.nf | 2 +- subworkflows/local/variant_calling/postprocess_MT_calls.nf | 7 +++---- workflows/raredisease.nf | 4 +++- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/subworkflows/local/variant_calling/call_snv_deepvariant.nf b/subworkflows/local/variant_calling/call_snv_deepvariant.nf index 3104ee67a..ab015c151 100644 --- a/subworkflows/local/variant_calling/call_snv_deepvariant.nf +++ b/subworkflows/local/variant_calling/call_snv_deepvariant.nf @@ -66,10 +66,9 @@ workflow CALL_SNV_DEEPVARIANT { REMOVE_DUPLICATES_GL.out.vcf .join(TABIX_GL.out.tbi) .combine(ch_varcallerbed) - .combine(ch_foundin_header) .set { ch_annotate_in } - BCFTOOLS_ANNOTATE(ch_annotate_in) + BCFTOOLS_ANNOTATE(ch_annotate_in, ch_foundin_header) TABIX_ANNOTATE(BCFTOOLS_ANNOTATE.out.vcf) diff --git a/subworkflows/local/variant_calling/call_snv_sentieon.nf b/subworkflows/local/variant_calling/call_snv_sentieon.nf index a84be1ed2..acd2ca3a0 100644 --- a/subworkflows/local/variant_calling/call_snv_sentieon.nf +++ b/subworkflows/local/variant_calling/call_snv_sentieon.nf @@ -73,7 +73,7 @@ workflow CALL_SNV_SENTIEON { } .set{ ch_vcf_idx_merge_in } - BCFTOOLS_MERGE(ch_vcf_idx_merge_in.multiple, ch_genome_fasta, ch_genome_fai, []) + BCFTOOLS_MERGE(ch_vcf_idx_merge_in.multiple, ch_genome_fasta, ch_genome_fai, [[:],[]]) ch_split_multi_in = BCFTOOLS_MERGE.out.merged_variants .map{meta, bcf -> diff --git a/subworkflows/local/variant_calling/postprocess_MT_calls.nf b/subworkflows/local/variant_calling/postprocess_MT_calls.nf index 4cd798824..9978ca292 100644 --- a/subworkflows/local/variant_calling/postprocess_MT_calls.nf +++ b/subworkflows/local/variant_calling/postprocess_MT_calls.nf @@ -93,10 +93,10 @@ workflow POSTPROCESS_MT_CALLS { BCFTOOLS_MERGE_MT( ch_case_vcf.multiple, ch_genome_fasta, ch_genome_fai, - [] + [[:],[]] ) - BCFTOOLS_MERGE_MT.out.merged_variants + BCFTOOLS_MERGE_MT.out.vcf .mix(ch_case_vcf.single) .set { ch_addfoundintag_in } @@ -114,10 +114,9 @@ workflow POSTPROCESS_MT_CALLS { ch_addfoundintag_in .join(TABIX_TABIX_MERGE.out.tbi) .combine(ch_varcallerbed) - .combine(ch_foundin_header) .set { ch_annotate_in } - BCFTOOLS_ANNOTATE(ch_annotate_in) + BCFTOOLS_ANNOTATE(ch_annotate_in,ch_foundin_header) TABIX_ANNOTATE(BCFTOOLS_ANNOTATE.out.vcf) diff --git a/workflows/raredisease.nf b/workflows/raredisease.nf index 88b75a3a5..a095192fc 100644 --- a/workflows/raredisease.nf +++ b/workflows/raredisease.nf @@ -912,7 +912,9 @@ workflow RAREDISEASE { ch_multiqc_files.collect(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), - ch_multiqc_logo.toList() + ch_multiqc_logo.toList(), + [], + [] ) emit: From 83cd07806cf5ca4f6b9e8e76d8da935a8259fba8 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:17:30 +0200 Subject: [PATCH 3/7] update dv subworkflow --- subworkflows/local/variant_calling/call_snv_deepvariant.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/variant_calling/call_snv_deepvariant.nf b/subworkflows/local/variant_calling/call_snv_deepvariant.nf index ab015c151..c535a1c4d 100644 --- a/subworkflows/local/variant_calling/call_snv_deepvariant.nf +++ b/subworkflows/local/variant_calling/call_snv_deepvariant.nf @@ -5,7 +5,7 @@ include { BCFTOOLS_ANNOTATE } from '../../../modules/nf-core/bcftools/annotate/main' include { BCFTOOLS_NORM as SPLIT_MULTIALLELICS_GL } from '../../../modules/nf-core/bcftools/norm/main' include { BCFTOOLS_NORM as REMOVE_DUPLICATES_GL } from '../../../modules/nf-core/bcftools/norm/main' -include { DEEPVARIANT } from '../../../modules/nf-core/deepvariant/main' +include { DEEPVARIANT_RUNDEEPVARIANT as DEEPVARIANT } from '../../../modules/nf-core/deepvariant/rundeepvariant/main' include { GLNEXUS } from '../../../modules/nf-core/glnexus/main' include { TABIX_TABIX as TABIX_GL } from '../../../modules/nf-core/tabix/tabix/main' include { TABIX_TABIX as TABIX_ANNOTATE } from '../../../modules/nf-core/tabix/tabix/main' From 75be509f6ff4fae738de156a57adc2ee47c87b78 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:18:29 +0200 Subject: [PATCH 4/7] update changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9906e8038..df58e3ce9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Changed` +- Update tools [#619](https://github.com/nf-core/raredisease/pull/619) - Report only variants above 5% heteroplasmy in the clinical vcf file for mitochondria [#616](https://github.com/nf-core/raredisease/pull/616) ### `Fixed` @@ -21,6 +22,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Tool updates +| Tool | Old version | New version | +| -------- | ----------- | ----------- | +| bcftools | 1.18 | 1.20 | +| mosdepth | 0.3.6 | 0.3.8 | +| multiqc | 1.21 | 1.25 | +| picard | 3.1.1 | 3.2.0 | +| samtools | 1.19.2 | 1.21 | +| stranger | 0.8.1 | 0.9.1 | +| tabix | 1.19.1 | 1.20 | + + + ## 2.2.0 - Dogmatix [2024-09-13] ### `Added` From ec580d8c1fe619c0a39cfe5674e580b041e1f22a Mon Sep 17 00:00:00 2001 From: ramprasadn <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:21:27 +0200 Subject: [PATCH 5/7] remove deepvariant --- CHANGELOG.md | 2 - modules.json | 25 -- modules/nf-core/deepvariant/README.md | 11 - .../nf-core/deepvariant/callvariants/main.nf | 58 --- .../nf-core/deepvariant/callvariants/meta.yml | 48 --- .../callvariants/tests/main.nf.test | 85 ----- .../callvariants/tests/main.nf.test.snap | 59 --- .../callvariants/tests/nextflow.config | 11 - .../deepvariant/callvariants/tests/tags.yml | 2 - modules/nf-core/deepvariant/main.nf | 78 ---- .../nf-core/deepvariant/makeexamples/main.nf | 66 ---- .../nf-core/deepvariant/makeexamples/meta.yml | 102 ----- .../makeexamples/tests/main.nf.test | 228 ----------- .../makeexamples/tests/main.nf.test.snap | 134 ------- .../makeexamples/tests/nextflow.config | 6 - .../deepvariant/makeexamples/tests/tags.yml | 2 - modules/nf-core/deepvariant/meta.yml | 92 ----- .../deepvariant/postprocessvariants/main.nf | 77 ---- .../deepvariant/postprocessvariants/meta.yml | 113 ------ .../postprocessvariants/tests/main.nf.test | 118 ------ .../tests/main.nf.test.snap | 180 --------- .../postprocessvariants/tests/nextflow.config | 10 - .../postprocessvariants/tests/tags.yml | 2 - .../deepvariant/rundeepvariant/main.nf | 78 ---- .../deepvariant/rundeepvariant/meta.yml | 122 ------ .../rundeepvariant/tests/main.nf.test | 166 -------- .../rundeepvariant/tests/main.nf.test.snap | 358 ------------------ .../tests/nextflow-intervals.config | 8 - .../nextflow-non-autosomal-calling.config | 8 - .../rundeepvariant/tests/nextflow.config | 8 - .../deepvariant/rundeepvariant/tests/tags.yml | 2 - .../nf-core/deepvariant/tests/main.nf.test | 165 -------- .../deepvariant/tests/main.nf.test.snap | 358 ------------------ .../tests/nextflow-intervals.config | 8 - .../nextflow-non-autosomal-calling.config | 8 - .../nf-core/deepvariant/tests/nextflow.config | 8 - modules/nf-core/deepvariant/tests/tags.yml | 2 - 37 files changed, 2808 deletions(-) delete mode 100644 modules/nf-core/deepvariant/README.md delete mode 100644 modules/nf-core/deepvariant/callvariants/main.nf delete mode 100644 modules/nf-core/deepvariant/callvariants/meta.yml delete mode 100644 modules/nf-core/deepvariant/callvariants/tests/main.nf.test delete mode 100644 modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap delete mode 100644 modules/nf-core/deepvariant/callvariants/tests/nextflow.config delete mode 100644 modules/nf-core/deepvariant/callvariants/tests/tags.yml delete mode 100644 modules/nf-core/deepvariant/main.nf delete mode 100644 modules/nf-core/deepvariant/makeexamples/main.nf delete mode 100644 modules/nf-core/deepvariant/makeexamples/meta.yml delete mode 100644 modules/nf-core/deepvariant/makeexamples/tests/main.nf.test delete mode 100644 modules/nf-core/deepvariant/makeexamples/tests/main.nf.test.snap delete mode 100644 modules/nf-core/deepvariant/makeexamples/tests/nextflow.config delete mode 100644 modules/nf-core/deepvariant/makeexamples/tests/tags.yml delete mode 100644 modules/nf-core/deepvariant/meta.yml delete mode 100644 modules/nf-core/deepvariant/postprocessvariants/main.nf delete mode 100644 modules/nf-core/deepvariant/postprocessvariants/meta.yml delete mode 100644 modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test delete mode 100644 modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test.snap delete mode 100644 modules/nf-core/deepvariant/postprocessvariants/tests/nextflow.config delete mode 100644 modules/nf-core/deepvariant/postprocessvariants/tests/tags.yml delete mode 100644 modules/nf-core/deepvariant/rundeepvariant/main.nf delete mode 100644 modules/nf-core/deepvariant/rundeepvariant/meta.yml delete mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test delete mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap delete mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config delete mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config delete mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config delete mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml delete mode 100644 modules/nf-core/deepvariant/tests/main.nf.test delete mode 100644 modules/nf-core/deepvariant/tests/main.nf.test.snap delete mode 100644 modules/nf-core/deepvariant/tests/nextflow-intervals.config delete mode 100644 modules/nf-core/deepvariant/tests/nextflow-non-autosomal-calling.config delete mode 100644 modules/nf-core/deepvariant/tests/nextflow.config delete mode 100644 modules/nf-core/deepvariant/tests/tags.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index df58e3ce9..584ae7ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,8 +32,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | stranger | 0.8.1 | 0.9.1 | | tabix | 1.19.1 | 1.20 | - - ## 2.2.0 - Dogmatix [2024-09-13] ### `Added` diff --git a/modules.json b/modules.json index a6af5aa05..009546e70 100644 --- a/modules.json +++ b/modules.json @@ -111,31 +111,6 @@ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, - "deepvariant": { - "branch": "master", - "git_sha": "a7e8b8afd4fa82f20d745fa778bfdbf39c1f7efb", - "installed_by": ["modules"] - }, - "deepvariant/callvariants": { - "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] - }, - "deepvariant/makeexamples": { - "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] - }, - "deepvariant/postprocessvariants": { - "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] - }, - "deepvariant/rundeepvariant": { - "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"] - }, "eklipse": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", diff --git a/modules/nf-core/deepvariant/README.md b/modules/nf-core/deepvariant/README.md deleted file mode 100644 index 9d1ceb344..000000000 --- a/modules/nf-core/deepvariant/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Conda is not supported at the moment - -The [bioconda](https://bioconda.github.io/recipes/deepvariant/README.html) recipe is not fully working as expected. - -See https://github.com/bioconda/bioconda-recipes/issues/30310 and https://github.com/nf-core/modules/issues/1754 for more information. - -Hence, we are using the docker container provided by the authors of the tool: - -- [google/deepvariant](https://hub.docker.com/r/google/deepvariant) - -This image is mirrored on the [nf-core quay.io](https://quay.io/repository/nf-core/deepvariant) for convenience. diff --git a/modules/nf-core/deepvariant/callvariants/main.nf b/modules/nf-core/deepvariant/callvariants/main.nf deleted file mode 100644 index 668b51ae4..000000000 --- a/modules/nf-core/deepvariant/callvariants/main.nf +++ /dev/null @@ -1,58 +0,0 @@ - -process DEEPVARIANT_CALLVARIANTS { - tag "$meta.id" - label 'process_high' - - //Conda is not supported at the moment - container "nf-core/deepvariant:1.6.1" - - input: - tuple val(meta), path(make_examples_tfrecords) - - output: - tuple val(meta), path("${prefix}.call-*-of-*.tfrecord.gz"), emit: call_variants_tfrecords - path "versions.yml", emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - - def matcher = make_examples_tfrecords[0].baseName =~ /^(.+)-\d{5}-of-(\d{5})$/ - if (!matcher.matches()) { - throw new IllegalArgumentException("tfrecord baseName '" + make_examples_tfrecords[0].baseName + "' doesn't match the expected pattern") - } - def examples_tfrecord_name = matcher[0][1] - def shardCount = matcher[0][2] - // Reconstruct the logical name - ${tfrecord_name}.examples.tfrecord@${task.cpus}.gz - def examples_tfrecords_logical_name = "${examples_tfrecord_name}@${shardCount}.gz" - - """ - /opt/deepvariant/bin/call_variants \\ - ${args} \\ - --outfile "${prefix}.call.tfrecord.gz" \\ - --examples "${examples_tfrecords_logical_name}" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant_callvariants: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ - - stub: - prefix = task.ext.prefix ?: "${meta.id}" - """ - echo "" | gzip > ${prefix}.call-00000-of-00001.tfrecord.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant_callvariants: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/deepvariant/callvariants/meta.yml b/modules/nf-core/deepvariant/callvariants/meta.yml deleted file mode 100644 index 4507192ca..000000000 --- a/modules/nf-core/deepvariant/callvariants/meta.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: deepvariant_callvariants -description: Call variants from the examples produced by make_examples -keywords: - - variant calling - - machine learning - - neural network -tools: - - deepvariant: - description: DeepVariant is an analysis pipeline that uses a deep neural network - to call genetic variants from next-generation DNA sequencing data - homepage: https://github.com/google/deepvariant - documentation: https://github.com/google/deepvariant - tool_dev_url: https://github.com/google/deepvariant - doi: "10.1038/nbt.4235" - licence: ["BSD-3-clause"] - identifier: biotools:deepvariant -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - make_examples_tfrecords: - type: file - description: The actual sharded input files, from DEEPVARIANT_MAKEEXAMPLES process - pattern: "*.gz" -output: - - call_variants_tfrecords: - - meta: - type: list - description: | - Each output contains: unique ID string from input channel, meta, tfrecord file with variant calls. - - ${prefix}.call-*-of-*.tfrecord.gz: - type: list - description: | - Each output contains: unique ID string from input channel, meta, tfrecord file with variant calls. - - versions: - - versions.yml: - type: file - description: File containing software version - pattern: "versions.yml" -authors: - - "@abhi18av" - - "@ramprasadn" - - "@fa2k" -maintainers: - - "@abhi18av" - - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/callvariants/tests/main.nf.test b/modules/nf-core/deepvariant/callvariants/tests/main.nf.test deleted file mode 100644 index 72f04b51f..000000000 --- a/modules/nf-core/deepvariant/callvariants/tests/main.nf.test +++ /dev/null @@ -1,85 +0,0 @@ -nextflow_process { - - name "Test Process DEEPVARIANT_CALLVARIANTS" - script "../main.nf" - config "./nextflow.config" - process "DEEPVARIANT_CALLVARIANTS" - - tag "deepvariant/makeexamples" - tag "deepvariant/callvariants" - tag "deepvariant" - tag "modules" - tag "modules_nfcore" - - test("homo_sapiens - wgs") { - setup { - run("DEEPVARIANT_MAKEEXAMPLES") { - script "../../makeexamples/main.nf" - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - } - when { - process { - """ - input[0] = DEEPVARIANT_MAKEEXAMPLES.out.examples - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert process.out.call_variants_tfrecords.get(0).get(0) == [ id:'test', single_end:false ] }, - // The tfrecord binary representation is not stable, but we check the name of the output. - { assert snapshot(file(process.out.call_variants_tfrecords.get(0).get(1)).name).match("homo_sapiens-wgs-call_variants_tfrecords-filenames")}, - { assert snapshot(process.out.versions).match("versions") }, - ) - } - } - - test("homo_sapiens - wgs - stub") { - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta - [] // No input paths are needed in stub mode - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - -} diff --git a/modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap b/modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap deleted file mode 100644 index 8f04ede70..000000000 --- a/modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap +++ /dev/null @@ -1,59 +0,0 @@ -{ - "versions": { - "content": [ - [ - "versions.yml:md5,5ff99ffba1e56e4e919d3dfc2d0f3cbb" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-09T16:38:47.927241" - }, - "homo_sapiens-wgs-call_variants_tfrecords-filenames": { - "content": [ - "test.call-00000-of-00001.tfrecord.gz" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T17:04:33.276938" - }, - "homo_sapiens - wgs - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.call-00000-of-00001.tfrecord.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - "versions.yml:md5,5ff99ffba1e56e4e919d3dfc2d0f3cbb" - ], - "call_variants_tfrecords": [ - [ - { - "id": "test", - "single_end": false - }, - "test.call-00000-of-00001.tfrecord.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "versions": [ - "versions.yml:md5,5ff99ffba1e56e4e919d3dfc2d0f3cbb" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-13T21:07:17.335788301" - } -} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/callvariants/tests/nextflow.config b/modules/nf-core/deepvariant/callvariants/tests/nextflow.config deleted file mode 100644 index 590aa0602..000000000 --- a/modules/nf-core/deepvariant/callvariants/tests/nextflow.config +++ /dev/null @@ -1,11 +0,0 @@ -process { - withName: "DEEPVARIANT_CALLVARIANTS" { - ext.args = '--checkpoint "/opt/models/wgs"' - cpus = 2 // Keep CPUs fixed so the number of output files is reproducible - } -} -process { - withName: "DEEPVARIANT_MAKEEXAMPLES" { - ext.args = '--channels "insert_size"' - } -} diff --git a/modules/nf-core/deepvariant/callvariants/tests/tags.yml b/modules/nf-core/deepvariant/callvariants/tests/tags.yml deleted file mode 100644 index 02e63f508..000000000 --- a/modules/nf-core/deepvariant/callvariants/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -deepvariant/callvariants: - - modules/nf-core/deepvariant/callvariants/** diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/main.nf deleted file mode 100644 index 8d3d09111..000000000 --- a/modules/nf-core/deepvariant/main.nf +++ /dev/null @@ -1,78 +0,0 @@ -process DEEPVARIANT { - tag "$meta.id" - label 'process_high' - - // FIXME Conda is not supported at the moment - // BUG https://github.com/nf-core/modules/issues/1754 - // BUG https://github.com/bioconda/bioconda-recipes/issues/30310 - container "nf-core/deepvariant:1.6.1" - - input: - tuple val(meta), path(input), path(index), path(intervals) - tuple val(meta2), path(fasta) - tuple val(meta3), path(fai) - tuple val(meta4), path(gzi) - tuple val(meta5), path(par_bed) - - output: - tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf - tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi - tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf - tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def regions = intervals ? "--regions=${intervals}" : "" - def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : "" - // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 - // FIXME Revert this on next version bump - def VERSION = '1.6.1' - - """ - /opt/deepvariant/bin/run_deepvariant \\ - --ref=${fasta} \\ - --reads=${input} \\ - --output_vcf=${prefix}.vcf.gz \\ - --output_gvcf=${prefix}.g.vcf.gz \\ - ${args} \\ - ${regions} \\ - ${par_regions} \\ - --intermediate_results_dir=tmp \\ - --num_shards=${task.cpus} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant: $VERSION - END_VERSIONS - """ - - stub: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - prefix = task.ext.prefix ?: "${meta.id}" - // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 - // FIXME Revert this on next version bump - def VERSION = '1.6.1' - """ - touch ${prefix}.vcf.gz - touch ${prefix}.vcf.gz.tbi - touch ${prefix}.g.vcf.gz - touch ${prefix}.g.vcf.gz.tbi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant: $VERSION - END_VERSIONS - """ -} diff --git a/modules/nf-core/deepvariant/makeexamples/main.nf b/modules/nf-core/deepvariant/makeexamples/main.nf deleted file mode 100644 index 022d0bf28..000000000 --- a/modules/nf-core/deepvariant/makeexamples/main.nf +++ /dev/null @@ -1,66 +0,0 @@ -process DEEPVARIANT_MAKEEXAMPLES { - tag "$meta.id" - label 'process_high' - - //Conda is not supported at the moment - container "nf-core/deepvariant:1.6.1" - - input: - tuple val(meta), path(input), path(index), path(intervals) - tuple val(meta2), path(fasta) - tuple val(meta3), path(fai) - tuple val(meta4), path(gzi) - tuple val(meta5), path(par_bed) - - output: - tuple val(meta), path("${prefix}.examples.tfrecord-*-of-*.gz{,.example_info.json}"), emit: examples - tuple val(meta), path("${prefix}.gvcf.tfrecord-*-of-*.gz"), emit: gvcf - path "versions.yml", emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def regions = intervals ? "--regions ${intervals}" : "" - def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : "" - - """ - seq 0 ${task.cpus - 1} | parallel -q --halt 2 --line-buffer /opt/deepvariant/bin/make_examples \\ - --mode calling \\ - --ref "${fasta}" \\ - --reads "${input}" \\ - --examples "./${prefix}.examples.tfrecord@${task.cpus}.gz" \\ - --gvcf "./${prefix}.gvcf.tfrecord@${task.cpus}.gz" \\ - ${regions} \\ - ${par_regions} \\ - ${args} \\ - --task {} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant_makeexamples: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ - - stub: - prefix = task.ext.prefix ?: "${meta.id}" - """ - printf -v SHARD_COUNT "%04d" ${task.cpus} - for i in \$( seq -f "%04g" 0 ${task.cpus-1} ) - do - touch ${prefix}.examples.tfrecord-\$i-of-\$SHARD_COUNT.tfrecord.gz{,.example_info.json} - touch ${prefix}.gvcf.tfrecord-\$i-of-\$SHARD_COUNT.tfrecord.gz - done - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant_makeexamples: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/deepvariant/makeexamples/meta.yml b/modules/nf-core/deepvariant/makeexamples/meta.yml deleted file mode 100644 index 6fb9f1b81..000000000 --- a/modules/nf-core/deepvariant/makeexamples/meta.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: deepvariant_makeexamples -description: Transforms the input alignments to a format suitable for the deep neural - network variant caller -keywords: - - variant calling - - machine learning - - neural network -tools: - - deepvariant: - description: DeepVariant is an analysis pipeline that uses a deep neural network - to call genetic variants from next-generation DNA sequencing data - homepage: https://github.com/google/deepvariant - documentation: https://github.com/google/deepvariant - tool_dev_url: https://github.com/google/deepvariant - doi: "10.1038/nbt.4235" - licence: ["BSD-3-clause"] - identifier: biotools:deepvariant -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file - pattern: "*.bam/cram" - - index: - type: file - description: Index of BAM/CRAM file - pattern: "*.bai/crai" - - intervals: - type: file - description: Interval file for targeted regions - pattern: "*.bed" - - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: The reference fasta file - pattern: "*.fasta" - - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Index of reference fasta file - pattern: "*.fai" - - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - gzi: - type: file - description: GZI index of reference fasta file - - - meta5: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - pattern: "*.gzi" - - par_bed: - type: file - description: BED file containing PAR regions - pattern: "*.bed" -output: - - examples: - - meta: - type: list - description: | - Tuple containing sample metadata and examples that can be used for calling - - ${prefix}.examples.tfrecord-*-of-*.gz{,.example_info.json}: - type: list - description: | - Tuple containing sample metadata and examples that can be used for calling - - gvcf: - - meta: - type: list - description: | - Tuple containing sample metadata and the GVCF data in tfrecord format - - ${prefix}.gvcf.tfrecord-*-of-*.gz: - type: list - description: | - Tuple containing sample metadata and the GVCF data in tfrecord format - - versions: - - versions.yml: - type: file - description: File containing the DeepVariant software version - pattern: "versions.yml" -authors: - - "@abhi18av" - - "@ramprasadn" - - "@fa2k" -maintainers: - - "@abhi18av" - - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test b/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test deleted file mode 100644 index d46dbe6d5..000000000 --- a/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test +++ /dev/null @@ -1,228 +0,0 @@ -nextflow_process { - - name "Test Process DEEPVARIANT_MAKEEXAMPLES" - script "../main.nf" - config "./nextflow.config" - process "DEEPVARIANT_MAKEEXAMPLES" - - tag "deepvariant/makeexamples" - tag "deepvariant" - tag "modules" - tag "modules_nfcore" - - test("homo_sapiens - [bam, bai] - fasta - fai") { - 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.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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - // Test string values and versions. The tfrecords contents are not stable, but we check the names. - { assert process.out.examples.get(0).get(0) == [ id:'test', single_end:false ] }, - { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, - { assert process.out.examples.get(0).get(1).size() == 4 }, - { assert snapshot( // Check examples (tfrecord / json) file name list - file(process.out.examples.get(0).get(1).get(0)).name, - file(process.out.examples.get(0).get(1).get(1)).name, - file(process.out.examples.get(0).get(1).get(2)).name, - file(process.out.examples.get(0).get(1).get(3)).name, - ).match("test1-exaamples-filenames")}, - - { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, - { assert process.out.gvcf.get(0).get(1).size() == 2 }, - { assert snapshot( // Check gvcf file name list - file(process.out.gvcf.get(0).get(1).get(0)).name, - file(process.out.gvcf.get(0).get(1).get(1)).name, - ).match("test1-gvcf-filenames")}, - { assert snapshot(process.out.versions).match("test1-versions") }, - ) - } - } - - test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert process.out.examples.get(0).get(0) == [ id:'test', single_end:false ] }, - // The test is always run with 2 cpus - { assert process.out.examples.get(0).get(1).size() == 4 }, - { assert snapshot( // Check examples (tfrecord / json) file names - file(process.out.examples.get(0).get(1).get(0)).name, - file(process.out.examples.get(0).get(1).get(1)).name, - file(process.out.examples.get(0).get(1).get(2)).name, - file(process.out.examples.get(0).get(1).get(3)).name, - ).match("test2-examples-filenames")}, - - { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, - { assert process.out.gvcf.get(0).get(1).size() == 2 }, - { assert snapshot( // Check gvcf tfrecord file names - file(process.out.gvcf.get(0).get(1).get(0)).name, - file(process.out.gvcf.get(0).get(1).get(1)).name, - ).match("test2-gvcf-filenames")}, - { assert snapshot(process.out.versions).match("test2-versions") }, - ) - } - } - - test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai") { - 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.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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.fai', checkIfExists: true) - ] - input[3] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true) - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - - { assert process.out.examples.get(0).get(0) == [ id:'test', single_end:false ] }, - // The test is always run with 2 cpus - { assert process.out.examples.get(0).get(1).size() == 4 }, - { assert snapshot( // Check examples (tfrecord / json) file name list - file(process.out.examples.get(0).get(1).get(0)).name, - file(process.out.examples.get(0).get(1).get(1)).name, - file(process.out.examples.get(0).get(1).get(2)).name, - file(process.out.examples.get(0).get(1).get(3)).name, - ).match("test3-examples-filenames")}, - - { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, - { assert process.out.gvcf.get(0).get(1).size() == 2 }, - { assert snapshot( // Check gvcf file name list - file(process.out.gvcf.get(0).get(1).get(0)).name, - file(process.out.gvcf.get(0).get(1).get(1)).name, - ).match("test3-gvcf-filenames")}, - { assert snapshot(process.out.versions).match("test3-versions") }, - ) - } - } - - test("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.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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert process.out.examples.get(0).get(1).size() == 4 }, - { assert snapshot( // Check examples (tfrecord / json) file name list - file(process.out.examples.get(0).get(1).get(0)).name, - file(process.out.examples.get(0).get(1).get(1)).name, - file(process.out.examples.get(0).get(1).get(2)).name, - file(process.out.examples.get(0).get(1).get(3)).name, - ).match("test4-examples-filenames")}, - - { assert process.out.gvcf.get(0).get(0) == [ id:'test', single_end:false ] }, - { assert process.out.gvcf.get(0).get(1).size() == 2 }, - { assert snapshot( // Check gvcf file name list - file(process.out.gvcf.get(0).get(1).get(0)).name, - file(process.out.gvcf.get(0).get(1).get(1)).name, - ).match("test4-gvcf-filenames")}, - ) - } - } - -} diff --git a/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test.snap b/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test.snap deleted file mode 100644 index 24182c54a..000000000 --- a/modules/nf-core/deepvariant/makeexamples/tests/main.nf.test.snap +++ /dev/null @@ -1,134 +0,0 @@ -{ - "test1-gvcf-filenames": { - "content": [ - "test.gvcf.tfrecord-00000-of-00002.gz", - "test.gvcf.tfrecord-00001-of-00002.gz" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T16:09:47.885995" - }, - "test2-examples-filenames": { - "content": [ - "test.examples.tfrecord-00000-of-00002.gz", - "test.examples.tfrecord-00000-of-00002.gz.example_info.json", - "test.examples.tfrecord-00001-of-00002.gz", - "test.examples.tfrecord-00001-of-00002.gz.example_info.json" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T16:10:02.757227" - }, - "test2-versions": { - "content": [ - [ - "versions.yml:md5,842dca9323f25aa3cfd67789d18e7e33" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-09T16:39:28.960959" - }, - "test4-examples-filenames": { - "content": [ - "test.examples.tfrecord-0000-of-0002.tfrecord.gz", - "test.examples.tfrecord-0000-of-0002.tfrecord.gz.example_info.json", - "test.examples.tfrecord-0001-of-0002.tfrecord.gz", - "test.examples.tfrecord-0001-of-0002.tfrecord.gz.example_info.json" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T16:10:27.41698" - }, - "test1-versions": { - "content": [ - [ - "versions.yml:md5,842dca9323f25aa3cfd67789d18e7e33" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-09T16:39:13.57526" - }, - "test3-examples-filenames": { - "content": [ - "test.examples.tfrecord-00000-of-00002.gz", - "test.examples.tfrecord-00000-of-00002.gz.example_info.json", - "test.examples.tfrecord-00001-of-00002.gz", - "test.examples.tfrecord-00001-of-00002.gz.example_info.json" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T16:10:17.705948" - }, - "test2-gvcf-filenames": { - "content": [ - "test.gvcf.tfrecord-00000-of-00002.gz", - "test.gvcf.tfrecord-00001-of-00002.gz" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T16:10:02.765863" - }, - "test4-gvcf-filenames": { - "content": [ - "test.gvcf.tfrecord-0000-of-0002.tfrecord.gz", - "test.gvcf.tfrecord-0001-of-0002.tfrecord.gz" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T16:10:27.423442" - }, - "test3-versions": { - "content": [ - [ - "versions.yml:md5,842dca9323f25aa3cfd67789d18e7e33" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-09T16:39:44.83616" - }, - "test1-exaamples-filenames": { - "content": [ - "test.examples.tfrecord-00000-of-00002.gz", - "test.examples.tfrecord-00000-of-00002.gz.example_info.json", - "test.examples.tfrecord-00001-of-00002.gz", - "test.examples.tfrecord-00001-of-00002.gz.example_info.json" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T16:09:47.874585" - }, - "test3-gvcf-filenames": { - "content": [ - "test.gvcf.tfrecord-00000-of-00002.gz", - "test.gvcf.tfrecord-00001-of-00002.gz" - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-09-04T16:10:17.714443" - } -} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/makeexamples/tests/nextflow.config b/modules/nf-core/deepvariant/makeexamples/tests/nextflow.config deleted file mode 100644 index 5f071fcb3..000000000 --- a/modules/nf-core/deepvariant/makeexamples/tests/nextflow.config +++ /dev/null @@ -1,6 +0,0 @@ -process { - withName: "DEEPVARIANT_MAKEEXAMPLES" { - ext.args = '--channels "insert_size"' - cpus = 2 // The number of output files is determined by cpus - keep it the same for tests - } -} diff --git a/modules/nf-core/deepvariant/makeexamples/tests/tags.yml b/modules/nf-core/deepvariant/makeexamples/tests/tags.yml deleted file mode 100644 index 6a13da095..000000000 --- a/modules/nf-core/deepvariant/makeexamples/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -deepvariant/makeexamples: - - modules/nf-core/deepvariant/makeexamples/** diff --git a/modules/nf-core/deepvariant/meta.yml b/modules/nf-core/deepvariant/meta.yml deleted file mode 100644 index 2327dd5f4..000000000 --- a/modules/nf-core/deepvariant/meta.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: deepvariant -description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data -keywords: - - variant calling - - machine learning - - neural network -tools: - - deepvariant: - description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data - homepage: https://github.com/google/deepvariant - documentation: https://github.com/google/deepvariant - tool_dev_url: https://github.com/google/deepvariant - doi: "10.1038/nbt.4235" - licence: ["BSD-3-clause"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file - pattern: "*.bam/cram" - - index: - type: file - description: Index of BAM/CRAM file - pattern: "*.bai/crai" - - interval: - type: file - description: Interval file for targeted regions - pattern: "*.bed" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: The reference fasta file - pattern: "*.fasta" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Index of reference fasta file - pattern: "*.fai" - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - gzi: - type: file - description: GZI index of reference fasta file - pattern: "*.gzi" - - meta5: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - par_bed: - type: file - description: BED file containing PAR regions - pattern: "*.bed" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: Compressed VCF file - pattern: "*.vcf.gz" - - gvcf: - type: file - description: Compressed GVCF file - pattern: "*.g.vcf.gz" - - version: - type: file - description: File containing software version - pattern: "*.{version.txt}" -authors: - - "@abhi18av" - - "@ramprasadn" -maintainers: - - "@abhi18av" - - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/postprocessvariants/main.nf b/modules/nf-core/deepvariant/postprocessvariants/main.nf deleted file mode 100644 index 90e8563de..000000000 --- a/modules/nf-core/deepvariant/postprocessvariants/main.nf +++ /dev/null @@ -1,77 +0,0 @@ -process DEEPVARIANT_POSTPROCESSVARIANTS { - tag "$meta.id" - label 'process_medium' - - //Conda is not supported at the moment - container "nf-core/deepvariant:1.6.1" - - input: - tuple val(meta), path(variant_calls_tfrecord_files), path(gvcf_tfrecords) - tuple val(meta2), path(fasta) - tuple val(meta3), path(fai) - tuple val(meta4), path(gzi) - - output: - tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf - tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi - tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf - tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi - - path "versions.yml", emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - - def variant_calls_tfrecord_name = variant_calls_tfrecord_files[0].name.replaceFirst(/-\d{5}-of-\d{5}/, "") - - def gvcf_matcher = gvcf_tfrecords[0].baseName =~ /^(.+)-\d{5}-of-(\d{5})$/ - if (!gvcf_matcher.matches()) { - throw new IllegalArgumentException("tfrecord baseName '" + gvcf_tfrecords[0].baseName + "' doesn't match the expected pattern") - } - def gvcf_tfrecord_name = gvcf_matcher[0][1] - def gvcf_shardCount = gvcf_matcher[0][2] - // Reconstruct the logical name - ${tfrecord_name}.examples.tfrecord@${task.cpus}.gz - def gvcf_tfrecords_logical_name = "${gvcf_tfrecord_name}@${gvcf_shardCount}.gz" - - """ - /opt/deepvariant/bin/postprocess_variants \\ - ${args} \\ - --ref "${fasta}" \\ - --infile "${variant_calls_tfrecord_name}" \\ - --outfile "${prefix}.vcf.gz" \\ - --nonvariant_site_tfrecord_path "${gvcf_tfrecords_logical_name}" \\ - --gvcf_outfile "${prefix}.g.vcf.gz" \\ - --cpus $task.cpus - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant_postprocessvariants: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ - - stub: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - prefix = task.ext.prefix ?: "${meta.id}" - """ - echo "" | gzip > ${prefix}.vcf.gz - touch ${prefix}.vcf.gz.tbi - echo "" | gzip > ${prefix}.g.vcf.gz - touch ${prefix}.g.vcf.gz.tbi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant_callvariants: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/deepvariant/postprocessvariants/meta.yml b/modules/nf-core/deepvariant/postprocessvariants/meta.yml deleted file mode 100644 index 132a52632..000000000 --- a/modules/nf-core/deepvariant/postprocessvariants/meta.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: deepvariant_postprocessvariants -description: DeepVariant is an analysis pipeline that uses a deep neural network to - call genetic variants from next-generation DNA sequencing data -keywords: - - variant calling - - machine learning - - neural network -tools: - - deepvariant: - description: DeepVariant is an analysis pipeline that uses a deep neural network - to call genetic variants from next-generation DNA sequencing data - homepage: https://github.com/google/deepvariant - documentation: https://github.com/google/deepvariant - tool_dev_url: https://github.com/google/deepvariant - doi: "10.1038/nbt.4235" - licence: ["BSD-3-clause"] - identifier: biotools:deepvariant -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - variant_calls_tfrecord_files: - type: file - description: | - One or more data files containing variant calls from DEEPVARIANT_CALLVARIANTS - pattern: "*.tfrecord.gz" - - gvcf_tfrecords: - type: file - description: | - Sharded tfrecord file from DEEPVARIANT_MAKEEXAMPLES with the coverage information used for GVCF output - pattern: "*.gz" - - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: The reference fasta file - pattern: "*.fasta" - - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Index of reference fasta file - pattern: "*.fai" - - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - gzi: - type: file - description: GZI index of reference fasta file - pattern: "*.gzi" -output: - - vcf: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.vcf.gz: - type: file - description: Compressed VCF file - pattern: "*.vcf.gz" - - vcf_tbi: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.vcf.gz.tbi: - type: file - description: Index for VCF - pattern: "*.vcf.gz.tbi" - - gvcf: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.g.vcf.gz: - type: file - description: Compressed GVCF file - pattern: "*.g.vcf.gz" - - gvcf_tbi: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.g.vcf.gz.tbi: - type: file - description: Index for GVCF - pattern: "*.g.vcf.gz.tbi" - - versions: - - versions.yml: - type: file - description: File containing software version - pattern: "versions.yml" -authors: - - "@abhi18av" - - "@ramprasadn" - - "@fa2k" -maintainers: - - "@abhi18av" - - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test b/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test deleted file mode 100644 index e4e9b5570..000000000 --- a/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test +++ /dev/null @@ -1,118 +0,0 @@ -nextflow_process { - - name "Test Process DEEPVARIANT_POSTPROCESSVARIANTS" - script "../main.nf" - process "DEEPVARIANT_POSTPROCESSVARIANTS" - config "./nextflow.config" - - tag "deepvariant/makeexamples" - tag "deepvariant/callvariants" - tag "deepvariant/postprocessvariants" - tag "deepvariant" - tag "modules" - tag "modules_nfcore" - - test("homo_sapiens - wgs") { - setup { - run("DEEPVARIANT_MAKEEXAMPLES") { - script "../../makeexamples/main.nf" - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - run("DEEPVARIANT_CALLVARIANTS") { - script "../../callvariants/main.nf" - process { - """ - input[0] = DEEPVARIANT_MAKEEXAMPLES.out.examples - """ - } - } - } - when { - process { - """ - input[0] = DEEPVARIANT_CALLVARIANTS.out.call_variants_tfrecords.join( - DEEPVARIANT_MAKEEXAMPLES.out.gvcf, - failOnMismatch: true - ) - input[1] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - wgs - stub") { - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], - [], - [], - [], - ] - input[1] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match("stub") } - ) - } - } - -} diff --git a/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test.snap b/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test.snap deleted file mode 100644 index 5a29c624e..000000000 --- a/modules/nf-core/deepvariant/postprocessvariants/tests/main.nf.test.snap +++ /dev/null @@ -1,180 +0,0 @@ -{ - "stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.g.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.g.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - "versions.yml:md5,37f0e454a6983de82f7a93eb39849985" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test.g.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test.g.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,37f0e454a6983de82f7a93eb39849985" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-09T16:40:38.231189" - }, - "homo_sapiens - wgs": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "4": [ - "versions.yml:md5,b1d5ddb90c4a59a1a3fdace9dcc8445c" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "versions": [ - "versions.yml:md5,b1d5ddb90c4a59a1a3fdace9dcc8445c" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-09T16:46:15.793662" - } -} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/postprocessvariants/tests/nextflow.config b/modules/nf-core/deepvariant/postprocessvariants/tests/nextflow.config deleted file mode 100644 index 070b4892f..000000000 --- a/modules/nf-core/deepvariant/postprocessvariants/tests/nextflow.config +++ /dev/null @@ -1,10 +0,0 @@ -process { - withName: "DEEPVARIANT_CALLVARIANTS" { - ext.args = '--checkpoint "/opt/models/wgs"' - } -} -process { - withName: "DEEPVARIANT_MAKEEXAMPLES" { - ext.args = '--channels "insert_size"' - } -} diff --git a/modules/nf-core/deepvariant/postprocessvariants/tests/tags.yml b/modules/nf-core/deepvariant/postprocessvariants/tests/tags.yml deleted file mode 100644 index d26188cd7..000000000 --- a/modules/nf-core/deepvariant/postprocessvariants/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -deepvariant/postprocessvariants: - - modules/nf-core/deepvariant/postprocessvariants/** diff --git a/modules/nf-core/deepvariant/rundeepvariant/main.nf b/modules/nf-core/deepvariant/rundeepvariant/main.nf deleted file mode 100644 index 7f99c53f6..000000000 --- a/modules/nf-core/deepvariant/rundeepvariant/main.nf +++ /dev/null @@ -1,78 +0,0 @@ -process DEEPVARIANT_RUNDEEPVARIANT { - tag "$meta.id" - label 'process_high' - - // FIXME Conda is not supported at the moment - // BUG https://github.com/nf-core/modules/issues/1754 - // BUG https://github.com/bioconda/bioconda-recipes/issues/30310 - container "nf-core/deepvariant:1.6.1" - - input: - tuple val(meta), path(input), path(index), path(intervals) - tuple val(meta2), path(fasta) - tuple val(meta3), path(fai) - tuple val(meta4), path(gzi) - tuple val(meta5), path(par_bed) - - output: - tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf - tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi - tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf - tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def regions = intervals ? "--regions=${intervals}" : "" - def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : "" - // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 - // FIXME Revert this on next version bump - def VERSION = '1.6.1' - - """ - /opt/deepvariant/bin/run_deepvariant \\ - --ref=${fasta} \\ - --reads=${input} \\ - --output_vcf=${prefix}.vcf.gz \\ - --output_gvcf=${prefix}.g.vcf.gz \\ - ${args} \\ - ${regions} \\ - ${par_regions} \\ - --intermediate_results_dir=tmp \\ - --num_shards=${task.cpus} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant: $VERSION - END_VERSIONS - """ - - stub: - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - prefix = task.ext.prefix ?: "${meta.id}" - // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 - // FIXME Revert this on next version bump - def VERSION = '1.6.1' - """ - touch ${prefix}.vcf.gz - touch ${prefix}.vcf.gz.tbi - touch ${prefix}.g.vcf.gz - touch ${prefix}.g.vcf.gz.tbi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant: $VERSION - END_VERSIONS - """ -} diff --git a/modules/nf-core/deepvariant/rundeepvariant/meta.yml b/modules/nf-core/deepvariant/rundeepvariant/meta.yml deleted file mode 100644 index 29b45ff91..000000000 --- a/modules/nf-core/deepvariant/rundeepvariant/meta.yml +++ /dev/null @@ -1,122 +0,0 @@ -name: deepvariant_rundeepvariant -description: DeepVariant is an analysis pipeline that uses a deep neural network to - call genetic variants from next-generation DNA sequencing data -keywords: - - variant calling - - machine learning - - neural network -tools: - - deepvariant: - description: DeepVariant is an analysis pipeline that uses a deep neural network - to call genetic variants from next-generation DNA sequencing data - homepage: https://github.com/google/deepvariant - documentation: https://github.com/google/deepvariant - tool_dev_url: https://github.com/google/deepvariant - doi: "10.1038/nbt.4235" - licence: ["BSD-3-clause"] - identifier: biotools:deepvariant -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file - pattern: "*.bam/cram" - - index: - type: file - description: Index of BAM/CRAM file - pattern: "*.bai/crai" - - intervals: - type: file - description: file containing intervals - - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fasta: - type: file - description: The reference fasta file - pattern: "*.fasta" - - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Index of reference fasta file - pattern: "*.fai" - - - meta4: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - gzi: - type: file - description: GZI index of reference fasta file - pattern: "*.gzi" - - - meta5: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - par_bed: - type: file - description: BED file containing PAR regions - pattern: "*.bed" -output: - - vcf: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.vcf.gz: - type: file - description: Compressed VCF file - pattern: "*.vcf.gz" - - vcf_tbi: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.vcf.gz.tbi: - type: file - description: Tabix index file of compressed VCF - pattern: "*.vcf.gz.tbi" - - gvcf: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.g.vcf.gz: - type: file - description: Compressed GVCF file - pattern: "*.g.vcf.gz" - - gvcf_tbi: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.g.vcf.gz.tbi: - type: file - description: Tabix index file of compressed GVCF - pattern: "*.g.vcf.gz.tbi" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@abhi18av" - - "@ramprasadn" -maintainers: - - "@abhi18av" - - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test deleted file mode 100644 index 0790fb813..000000000 --- a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test +++ /dev/null @@ -1,166 +0,0 @@ -nextflow_process { - - name "Test Process DEEPVARIANT_RUNDEEPVARIANT" - script "../main.nf" - process "DEEPVARIANT_RUNDEEPVARIANT" - - tag "deepvariant/rundeepvariant" - tag "deepvariant" - tag "modules" - tag "modules_nfcore" - - test("homo_sapiens - [bam, bai] - fasta - fai") { - when { - config "./nextflow.config" - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai") { - config "./nextflow-intervals.config" - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed") { - config "./nextflow-non-autosomal-calling.config" - tag "test" - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.blacklist_intervals.bed', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai") { - when { - config "./nextflow.config" - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.fai', checkIfExists: true) - ] - input[3] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true) - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - -} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap deleted file mode 100644 index 1ec351eec..000000000 --- a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap +++ /dev/null @@ -1,358 +0,0 @@ -{ - "homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "4": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "versions": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-29T11:36:27.325363" - }, - "homo_sapiens - [bam, bai] - fasta - fai": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "4": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "versions": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-29T11:34:41.779153" - }, - "homo_sapiens - [cram, crai, genome_bed] - fasta - fai": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "4": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "versions": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-29T11:35:16.993129" - }, - "homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" - ] - ], - "4": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" - ] - ], - "versions": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-29T11:35:52.23093" - } -} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config deleted file mode 100644 index 78d8d5982..000000000 --- a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - withName: DEEPVARIANT_RUNDEEPVARIANT { - ext.args = '--model_type=WGS ' - ext.prefix = { "${meta.id}_out" } - } - -} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config deleted file mode 100644 index 6d265292a..000000000 --- a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - withName: DEEPVARIANT_RUNDEEPVARIANT { - ext.args = '--model_type=WGS --haploid_contigs chr22' - ext.prefix = { "${meta.id}_out" } - } - -} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config deleted file mode 100644 index 77e355cae..000000000 --- a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - withName: DEEPVARIANT_RUNDEEPVARIANT { - ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS ' - ext.prefix = { "${meta.id}_out" } - } - -} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml b/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml deleted file mode 100644 index 958b8e414..000000000 --- a/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -deepvariant/rundeepvariant: - - modules/nf-core/deepvariant/rundeepvariant/** diff --git a/modules/nf-core/deepvariant/tests/main.nf.test b/modules/nf-core/deepvariant/tests/main.nf.test deleted file mode 100644 index 177652332..000000000 --- a/modules/nf-core/deepvariant/tests/main.nf.test +++ /dev/null @@ -1,165 +0,0 @@ -nextflow_process { - - name "Test Process DEEPVARIANT" - script "../main.nf" - process "DEEPVARIANT" - - tag "deepvariant" - tag "modules" - tag "modules_nfcore" - - test("homo_sapiens - [bam, bai] - fasta - fai") { - when { - config "./nextflow.config" - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai") { - config "./nextflow-intervals.config" - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed") { - config "./nextflow-non-autosomal-calling.config" - tag "test" - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ] - input[3] = [ - [],[] - ] - input[4] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.blacklist_intervals.bed', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai") { - when { - config "./nextflow.config" - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - 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:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true) - ] - input[2] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.fai', checkIfExists: true) - ] - input[3] = [ - [ id:'genome'], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true) - ] - input[4] = [ - [],[] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - -} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/tests/main.nf.test.snap b/modules/nf-core/deepvariant/tests/main.nf.test.snap deleted file mode 100644 index 04f877742..000000000 --- a/modules/nf-core/deepvariant/tests/main.nf.test.snap +++ /dev/null @@ -1,358 +0,0 @@ -{ - "homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "4": [ - "versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "versions": [ - "versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-01T12:09:40.987117305" - }, - "homo_sapiens - [bam, bai] - fasta - fai": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "4": [ - "versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "versions": [ - "versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-01T12:08:47.058887374" - }, - "homo_sapiens - [cram, crai, genome_bed] - fasta - fai": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "4": [ - "versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" - ] - ], - "versions": [ - "versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-01T12:09:13.952808655" - }, - "homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" - ] - ], - "4": [ - "versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8" - ], - "gvcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" - ] - ], - "gvcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" - ] - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" - ] - ], - "vcf_tbi": [ - [ - { - "id": "test", - "single_end": false - }, - "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" - ] - ], - "versions": [ - "versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-23T14:29:24.939680679" - } -} diff --git a/modules/nf-core/deepvariant/tests/nextflow-intervals.config b/modules/nf-core/deepvariant/tests/nextflow-intervals.config deleted file mode 100644 index 6d135f9f1..000000000 --- a/modules/nf-core/deepvariant/tests/nextflow-intervals.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - withName: DEEPVARIANT { - ext.args = '--model_type=WGS ' - ext.prefix = { "${meta.id}_out" } - } - -} diff --git a/modules/nf-core/deepvariant/tests/nextflow-non-autosomal-calling.config b/modules/nf-core/deepvariant/tests/nextflow-non-autosomal-calling.config deleted file mode 100644 index 4be8986bd..000000000 --- a/modules/nf-core/deepvariant/tests/nextflow-non-autosomal-calling.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - withName: DEEPVARIANT { - ext.args = '--model_type=WGS --haploid_contigs chr22' - ext.prefix = { "${meta.id}_out" } - } - -} diff --git a/modules/nf-core/deepvariant/tests/nextflow.config b/modules/nf-core/deepvariant/tests/nextflow.config deleted file mode 100644 index d335d30b5..000000000 --- a/modules/nf-core/deepvariant/tests/nextflow.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - withName: DEEPVARIANT { - ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS ' - ext.prefix = { "${meta.id}_out" } - } - -} diff --git a/modules/nf-core/deepvariant/tests/tags.yml b/modules/nf-core/deepvariant/tests/tags.yml deleted file mode 100644 index 8e838c7ba..000000000 --- a/modules/nf-core/deepvariant/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -deepvariant: - - modules/nf-core/deepvariant/** From 5374f8d60ba539d12d5c2b98f016c612d184376c Mon Sep 17 00:00:00 2001 From: ramprasadn <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:22:15 +0200 Subject: [PATCH 6/7] add latest dv --- modules.json | 5 + .../deepvariant/rundeepvariant/main.nf | 78 ++++ .../deepvariant/rundeepvariant/meta.yml | 122 ++++++ .../rundeepvariant/tests/main.nf.test | 166 ++++++++ .../rundeepvariant/tests/main.nf.test.snap | 358 ++++++++++++++++++ .../tests/nextflow-intervals.config | 8 + .../nextflow-non-autosomal-calling.config | 8 + .../rundeepvariant/tests/nextflow.config | 8 + .../deepvariant/rundeepvariant/tests/tags.yml | 2 + 9 files changed, 755 insertions(+) create mode 100644 modules/nf-core/deepvariant/rundeepvariant/main.nf create mode 100644 modules/nf-core/deepvariant/rundeepvariant/meta.yml create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config create mode 100644 modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml diff --git a/modules.json b/modules.json index 009546e70..f25dbf2cf 100644 --- a/modules.json +++ b/modules.json @@ -111,6 +111,11 @@ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, + "deepvariant/rundeepvariant": { + "branch": "master", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "installed_by": ["modules"] + }, "eklipse": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", diff --git a/modules/nf-core/deepvariant/rundeepvariant/main.nf b/modules/nf-core/deepvariant/rundeepvariant/main.nf new file mode 100644 index 000000000..7f99c53f6 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/main.nf @@ -0,0 +1,78 @@ +process DEEPVARIANT_RUNDEEPVARIANT { + tag "$meta.id" + label 'process_high' + + // FIXME Conda is not supported at the moment + // BUG https://github.com/nf-core/modules/issues/1754 + // BUG https://github.com/bioconda/bioconda-recipes/issues/30310 + container "nf-core/deepvariant:1.6.1" + + input: + tuple val(meta), path(input), path(index), path(intervals) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(gzi) + tuple val(meta5), path(par_bed) + + output: + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi + tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf + tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def regions = intervals ? "--regions=${intervals}" : "" + def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : "" + // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 + // FIXME Revert this on next version bump + def VERSION = '1.6.1' + + """ + /opt/deepvariant/bin/run_deepvariant \\ + --ref=${fasta} \\ + --reads=${input} \\ + --output_vcf=${prefix}.vcf.gz \\ + --output_gvcf=${prefix}.g.vcf.gz \\ + ${args} \\ + ${regions} \\ + ${par_regions} \\ + --intermediate_results_dir=tmp \\ + --num_shards=${task.cpus} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: $VERSION + END_VERSIONS + """ + + stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + prefix = task.ext.prefix ?: "${meta.id}" + // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 + // FIXME Revert this on next version bump + def VERSION = '1.6.1' + """ + touch ${prefix}.vcf.gz + touch ${prefix}.vcf.gz.tbi + touch ${prefix}.g.vcf.gz + touch ${prefix}.g.vcf.gz.tbi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/meta.yml b/modules/nf-core/deepvariant/rundeepvariant/meta.yml new file mode 100644 index 000000000..29b45ff91 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/meta.yml @@ -0,0 +1,122 @@ +name: deepvariant_rundeepvariant +description: DeepVariant is an analysis pipeline that uses a deep neural network to + call genetic variants from next-generation DNA sequencing data +keywords: + - variant calling + - machine learning + - neural network +tools: + - deepvariant: + description: DeepVariant is an analysis pipeline that uses a deep neural network + to call genetic variants from next-generation DNA sequencing data + homepage: https://github.com/google/deepvariant + documentation: https://github.com/google/deepvariant + tool_dev_url: https://github.com/google/deepvariant + doi: "10.1038/nbt.4235" + licence: ["BSD-3-clause"] + identifier: biotools:deepvariant +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.bam/cram" + - index: + type: file + description: Index of BAM/CRAM file + pattern: "*.bai/crai" + - intervals: + type: file + description: file containing intervals + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - gzi: + type: file + description: GZI index of reference fasta file + pattern: "*.gzi" + - - meta5: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - par_bed: + type: file + description: BED file containing PAR regions + pattern: "*.bed" +output: + - vcf: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.vcf.gz: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + - vcf_tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.vcf.gz.tbi: + type: file + description: Tabix index file of compressed VCF + pattern: "*.vcf.gz.tbi" + - gvcf: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.g.vcf.gz: + type: file + description: Compressed GVCF file + pattern: "*.g.vcf.gz" + - gvcf_tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.g.vcf.gz.tbi: + type: file + description: Tabix index file of compressed GVCF + pattern: "*.g.vcf.gz.tbi" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@abhi18av" + - "@ramprasadn" +maintainers: + - "@abhi18av" + - "@ramprasadn" diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test new file mode 100644 index 000000000..0790fb813 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test @@ -0,0 +1,166 @@ +nextflow_process { + + name "Test Process DEEPVARIANT_RUNDEEPVARIANT" + script "../main.nf" + process "DEEPVARIANT_RUNDEEPVARIANT" + + tag "deepvariant/rundeepvariant" + tag "deepvariant" + tag "modules" + tag "modules_nfcore" + + test("homo_sapiens - [bam, bai] - fasta - fai") { + when { + config "./nextflow.config" + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai") { + config "./nextflow-intervals.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed") { + config "./nextflow-non-autosomal-calling.config" + tag "test" + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ] + input[3] = [ + [],[] + ] + input[4] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.blacklist_intervals.bed', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai") { + when { + config "./nextflow.config" + + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + 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:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true) + ] + input[2] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.fai', checkIfExists: true) + ] + input[3] = [ + [ id:'genome'], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true) + ] + input[4] = [ + [],[] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap new file mode 100644 index 000000000..1ec351eec --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap @@ -0,0 +1,358 @@ +{ + "homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "4": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "versions": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T11:36:27.325363" + }, + "homo_sapiens - [bam, bai] - fasta - fai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "4": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "versions": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T11:34:41.779153" + }, + "homo_sapiens - [cram, crai, genome_bed] - fasta - fai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "4": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + ] + ], + "versions": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T11:35:16.993129" + }, + "homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" + ] + ], + "4": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ], + "gvcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" + ] + ], + "gvcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" + ] + ], + "vcf": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" + ] + ], + "vcf_tbi": [ + [ + { + "id": "test", + "single_end": false + }, + "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" + ] + ], + "versions": [ + "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T11:35:52.23093" + } +} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config new file mode 100644 index 000000000..78d8d5982 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config @@ -0,0 +1,8 @@ +process { + + withName: DEEPVARIANT_RUNDEEPVARIANT { + ext.args = '--model_type=WGS ' + ext.prefix = { "${meta.id}_out" } + } + +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config new file mode 100644 index 000000000..6d265292a --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config @@ -0,0 +1,8 @@ +process { + + withName: DEEPVARIANT_RUNDEEPVARIANT { + ext.args = '--model_type=WGS --haploid_contigs chr22' + ext.prefix = { "${meta.id}_out" } + } + +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config new file mode 100644 index 000000000..77e355cae --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config @@ -0,0 +1,8 @@ +process { + + withName: DEEPVARIANT_RUNDEEPVARIANT { + ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS ' + ext.prefix = { "${meta.id}_out" } + } + +} diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml b/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml new file mode 100644 index 000000000..958b8e414 --- /dev/null +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml @@ -0,0 +1,2 @@ +deepvariant/rundeepvariant: + - modules/nf-core/deepvariant/rundeepvariant/** From a910e4293ce6553093b7fb2279f785d3fe64a949 Mon Sep 17 00:00:00 2001 From: ramprasadn <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:41:13 +0200 Subject: [PATCH 7/7] update align --- subworkflows/local/align.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/align.nf b/subworkflows/local/align.nf index 5eeb68624..14d545eab 100644 --- a/subworkflows/local/align.nf +++ b/subworkflows/local/align.nf @@ -48,7 +48,7 @@ workflow ALIGN { ch_versions = Channel.empty() if (!params.skip_fastp) { - FASTP (ch_reads, [], false, false) + FASTP (ch_reads, [], false, false, false) ch_reads = FASTP.out.reads ch_versions = ch_versions.mix(FASTP.out.versions) ch_fastp_json = FASTP.out.json