diff --git a/subworkflows/local/bam_variant_calling_tumor_only_all/main.nf b/subworkflows/local/bam_variant_calling_tumor_only_all/main.nf index 61e4129301..9e5956e2d9 100644 --- a/subworkflows/local/bam_variant_calling_tumor_only_all/main.nf +++ b/subworkflows/local/bam_variant_calling_tumor_only_all/main.nf @@ -93,7 +93,8 @@ workflow BAM_VARIANT_CALLING_TUMOR_ONLY_ALL { // FREEBAYES if (tools.split(',').contains('freebayes')) { BAM_VARIANT_CALLING_FREEBAYES( - cram, + // Remap channel to match module/subworkflow + cram.map{ meta, cram, crai -> [ meta, cram, crai, [], [] ] }, // Remap channel to match module/subworkflow dict.map{ it -> [ [ id:'dict' ], it ] }, fasta, diff --git a/tests/config/tags.yml b/tests/config/tags.yml index 5229c6b16f..a581578263 100644 --- a/tests/config/tags.yml +++ b/tests/config/tags.yml @@ -2,48 +2,53 @@ tumor_normal_pair: - conf/modules/** + - main.nf - modules/** + - nextflow.config + - nextflow_schema.json - subworkflows/** + - tests/test_tumor_normal_pair.yml - workflows/** - - nextflow_schema.json - - nextflow.config - - main.nf save_mapped_only: - conf/modules/** + - main.nf - modules/** + - nextflow.config + - nextflow_schema.json - subworkflows/** + - tests/test_save_mapped.yml - workflows/** - - nextflow_schema.json - - nextflow.config - - main.nf save_output_as_bam_only: - conf/modules/** + - main.nf - modules/** + - nextflow.config + - nextflow_schema.json - subworkflows/** + - tests/test_save_output_as_bam_only.yml - workflows/** - - nextflow_schema.json - - nextflow.config - - main.nf skip_all_qc: - conf/modules/** + - main.nf - modules/** + - nextflow.config + - nextflow_schema.json - subworkflows/** + - tests/test_skip_all_qc.yml - workflows/** - - nextflow_schema.json - - nextflow.config - - main.nf skip_markduplicates: - conf/modules/** + - main.nf - modules/** + - nextflow.config + - nextflow_schema.json - subworkflows/** + - tests/test_skip_markduplicates.yml - workflows/** - - nextflow_schema.json - - nextflow.config - - main.nf # preprocessing @@ -55,6 +60,7 @@ alignment_to_fastq: - modules/nf-core/samtools/merge/main.nf - modules/nf-core/samtools/view/main.nf - subworkflows/local/bam_convert_samtools/main.nf + - tests/test_alignment_to_fastq.yml ## umi umi: @@ -69,11 +75,13 @@ umi: - modules/nf-core/samtools/bam2fq/main.nf - subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf - subworkflows/local/fastq_create_umi_consensus_fgbio/main.nf + - tests/test_umi.yml ## fastp fastp: - conf/modules/trimming.config - modules/nf-core/fastp/main.nf + - tests/test_fastp.yml ## aligner @@ -82,18 +90,21 @@ bwamem: - conf/modules/aligner.config - modules/nf-core/bwa/mem/main.nf - subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf + - tests/test_alignment_bwamem.yml ### bwamem2 bwamem2: - conf/modules/aligner.config - modules/nf-core/bwamem2/mem/main.nf - subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf + - tests/test_alignment_bwamem2.yml ### dragmap dragmap: - conf/modules/aligner.config - modules/nf-core/dragmap/align/main.nf - subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf + - tests/test_alignment_dragmap.yml ## markduplicates markduplicates: @@ -105,6 +116,8 @@ markduplicates: - modules/nf-core/samtools/stats/main.nf - subworkflows/local/bam_markduplicates/main.nf - subworkflows/local/cram_qc_mosdepth_samtools/main.nf + - tests/test_markduplicates_from_bam.yml + - tests/test_markduplicates_from_cram.yml ## prepare_recalibration prepare_recalibration: @@ -113,6 +126,8 @@ prepare_recalibration: - modules/nf-core/gatk4/gatherbqsrreports/main.nf - modules/nf-core/samtools/convert/main.nf - subworkflows/local/bam_baserecalibrator/main.nf + - tests/test_prepare_recalibration_from_bam.yml + - tests/test_prepare_recalibration_from_cram.yml ## recalibrate recalibrate: @@ -123,6 +138,8 @@ recalibrate: - modules/nf-core/samtools/merge/main.nf - subworkflows/local/bam_applybqsr/main.nf - subworkflows/local/cram_merge_index_samtools/main.nf + - tests/test_recalibrate_from_bam.yml + - tests/test_recalibrate_from_cram.yml ## intervals intervals: @@ -132,6 +149,7 @@ intervals: - modules/nf-core/gatk4/intervallisttobed/main.nf - modules/nf-core/tabix/bgziptabix/main.nf - subworkflows/local/prepare_intervals/main.nf + - tests/test_intervals.yml ## gatk4_spark gatk4_spark: @@ -145,6 +163,7 @@ gatk4_spark: - subworkflows/local/bam_applybqsr_spark/main.nf - subworkflows/local/bam_baserecalibrator_spark/main.nf - subworkflows/local/bam_markduplicates_spark/main.nf + - tests/test_gatk4_spark.yml # variant calling @@ -156,6 +175,7 @@ cnvkit: - modules/nf-core/cnvkit/reference/main.nf - subworkflows/local/bam_variant_calling_cnvkit/main.nf - subworkflows/local/prepare_reference_cnvkit/main.nf + - tests/test_cnvkit.yml ## controlfreec controlfreec: @@ -168,9 +188,10 @@ controlfreec: - modules/nf-core/controlfreec/freec2circos/main.nf - modules/nf-core/controlfreec/makegraph/main.nf - modules/nf-core/samtools/mpileup/main.nf + - subworkflows/local/bam_variant_calling_mpileup/main.nf - subworkflows/local/bam_variant_calling_somatic_controlfreec/main.nf - subworkflows/local/bam_variant_calling_tumor_only_controlfreec/main.nf - - subworkflows/local/bam_variant_calling_mpileup/main.nf + - tests/test_controlfreec.yml ## deepvariant deepvariant: @@ -179,6 +200,7 @@ deepvariant: - modules/nf-core/gatk4/mergevcfs/main.nf - modules/nf-core/tabix/tabix/main.nf - subworkflows/local/bam_variant_calling_deepvariant/main.nf + - tests/test_deepvariant.yml ## freebayes freebayes: @@ -188,19 +210,21 @@ freebayes: - modules/nf-core/gatk4/mergevcfs/main.nf - modules/nf-core/tabix/tabix/main.nf - subworkflows/local/bam_variant_calling_freebayes/main.nf + - tests/test_freebayes.yml ## haplotypecaller haplotypecaller: - conf/modules/haplotypecaller.config + - modules/nf-core/gatk4/cnnscorevariants/main.nf + - modules/nf-core/gatk4/filtervarianttranches/main.nf - modules/nf-core/gatk4/haplotypecaller/main.nf - modules/nf-core/gatk4/mergevcfs/main.nf - modules/nf-core/samtools/index/main.nf - modules/nf-core/samtools/merge/main.nf - - modules/nf-core/gatk4/cnnscorevariants/main.nf - - modules/nf-core/gatk4/filtervarianttranches/main.nf - subworkflows/local/bam_merge_index_samtools/main.nf - subworkflows/local/bam_variant_calling_haplotypecaller/main.nf - subworkflows/local/vcf_variant_filtering_gatk/main.nf + - tests/test_haplotypecaller.yml haplotypecaller_skip_filter: - conf/modules/haplotypecaller.config @@ -210,6 +234,7 @@ haplotypecaller_skip_filter: - modules/nf-core/samtools/merge/main.nf - subworkflows/local/bam_merge_index_samtools/main.nf - subworkflows/local/bam_variant_calling_haplotypecaller/main.nf + - tests/test_haplotypecaller_skip_filter.yml ## joint_germline joint_germline: @@ -229,6 +254,7 @@ joint_germline: - subworkflows/local/bam_merge_index_samtools/main.nf - subworkflows/local/bam_variant_calling_haplotypecaller/main.nf - subworkflows/local/vcf_variant_filtering_gatk/main.nf + - tests/test_joint_germline.yml ## manta manta: @@ -240,6 +266,7 @@ manta: - subworkflows/local/bam_variant_calling_germline_manta/main.nf - subworkflows/local/bam_variant_calling_somatic_manta/main.nf - subworkflows/local/bam_variant_calling_tumor_only_manta/main.nf + - tests/test_manta.yml ## mpileup mpileup: @@ -247,12 +274,14 @@ mpileup: - modules/nf-core/cat/cat/main.nf - modules/nf-core/samtools/mpileup/main.nf - subworkflows/local/bam_variant_calling_mpileup/main.nf + - tests/test_mpileup.yml ## msisensorpro msisensorpro: - conf/modules/msisensorpro.config - - modules/nf-core/msisensorpro/scan/main.nf - modules/nf-core/msisensorpro/msi_somatic/main.nf + - modules/nf-core/msisensorpro/scan/main.nf + - tests/test_msisensorpro.yml ## mutect2 mutect2: @@ -267,6 +296,7 @@ mutect2: - modules/nf-core/gatk4/mutect2/main.nf - subworkflows/local/bam_variant_calling_somatic_mutect2/main.nf - subworkflows/local/bam_variant_calling_tumor_only_mutect2/main.nf + - tests/test_mutect2.yml ## strelka strelka: @@ -276,6 +306,7 @@ strelka: - modules/nf-core/strelka/somatic/main.nf - subworkflows/local/bam_variant_calling_single_strelka/main.nf - subworkflows/local/bam_variant_calling_somatic_strelka/main.nf + - tests/test_strelka.yml ## strelka_bp strelka_bp: @@ -286,6 +317,7 @@ strelka_bp: - modules/nf-core/strelka/somatic/main.nf - subworkflows/local/bam_variant_calling_somatic_manta/main.nf - subworkflows/local/bam_variant_calling_somatic_strelka/main.nf + - tests/test_strelka_bp.yml ## tiddit tiddit: @@ -295,6 +327,7 @@ tiddit: - modules/nf-core/tiddit/sv/main.nf - subworkflows/local/bam_variant_calling_single_tiddit/main.nf - subworkflows/local/bam_variant_calling_somatic_tiddit/main.nf + - tests/test_tiddit.yml # annotate @@ -307,6 +340,7 @@ merge: - subworkflows/local/vcf_annotate_all/main.nf - subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf - subworkflows/nf-core/vcf_annotate_snpeff/main.nf + - tests/test_annotation_merge.yml ## snpeff snpeff: @@ -314,6 +348,7 @@ snpeff: - modules/nf-core/snpeff/main.nf - modules/nf-core/tabix/bgziptabix/main.nf - subworkflows/nf-core/vcf_annotate_snpeff/main.nf + - tests/test_annotation_snpeff.yml ## vep vep: @@ -321,6 +356,7 @@ vep: - modules/nf-core/ensemblvep/main.nf - modules/nf-core/tabix/bgziptabix/main.nf - subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf + - tests/test_annotation_vep.yml # postprocessing @@ -347,3 +383,4 @@ concatenate_vcfs: - subworkflows/local/bam_variant_calling_mpileup/main.nf - subworkflows/local/bam_variant_calling_single_strelka/main.nf - subworkflows/local/bam_variant_calling_single_tiddit/main.nf + - tests/test_concat_germline_vcfs.yml diff --git a/tests/csv/3.0/fastq_tumor_only.csv b/tests/csv/3.0/fastq_tumor_only.csv new file mode 100644 index 0000000000..ea75421038 --- /dev/null +++ b/tests/csv/3.0/fastq_tumor_only.csv @@ -0,0 +1,2 @@ +patient,sex,status,sample,lane,fastq_1,fastq_2 +test,XX,1,test2,test_L1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test2_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test2_2.fastq.gz diff --git a/tests/test_freebayes.yml b/tests/test_freebayes.yml index 74ede54e04..2bb64eb531 100644 --- a/tests/test_freebayes.yml +++ b/tests/test_freebayes.yml @@ -392,22 +392,52 @@ # binary changes md5sums on reruns - path: results/freebayes should_exist: false -# - name: Run variant calling on tumor_only sample with freebayes -# command: nextflow run main.nf -profile test,tools_tumoronly --tools freebayes -# tags: -# - freebayes -# - tumor_only -# - variant_calling -# files: -# - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz -# - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz.tbi -# - name: Run variant calling on tumor_only sample with freebayes without intervals -# command: nextflow run main.nf -profile test,tools_tumoronly --tools freebayes --no_intervals -# tags: -# - freebayes -# - no_intervals -# - tumor_only -# - variant_calling -# files: -# - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz -# - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz.tbi +- name: Run variant calling on tumor_only sample with freebayes + command: nextflow run main.nf -profile test,tools_tumoronly --tools freebayes --outdir results + tags: + - freebayes + - tumor_only + - variant_calling + files: + - path: results/csv/variantcalled.csv + md5sum: 5c5938a7bcc814cdaf5433c1120964c5 + - path: results/multiqc + - path: results/reports/bcftools/freebayes/sample2/sample2.freebayes.bcftools_stats.txt + # conda changes md5sums for test + - path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.FILTER.summary + md5sum: 0df3ddeec5779344b5d463347c9c6ea8 + - path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.TsTv.count + md5sum: b1d308ed5087361a584cb61e7b835e1e + - path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.TsTv.qual + # content changes md5sums on reruns + - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz + # binary changes md5sums on reruns + - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz.tbi + # binary changes md5sums on reruns + - path: results/freebayes + should_exist: false +- name: Run variant calling on tumor_only sample with freebayes without intervals + command: nextflow run main.nf -profile test,tools_tumoronly --tools freebayes --no_intervals --outdir results + tags: + - freebayes + - no_intervals + - tumor_only + - variant_calling + files: + - path: results/csv/variantcalled.csv + md5sum: 5c5938a7bcc814cdaf5433c1120964c5 + - path: results/multiqc + - path: results/reports/bcftools/freebayes/sample2/sample2.freebayes.bcftools_stats.txt + # conda changes md5sums for test + - path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.FILTER.summary + md5sum: ee513ecf779b6e201b8ef98f95f25aab + - path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.TsTv.count + md5sum: 2dc153ad5af26c9f8aa82442bf65b4bf + - path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.TsTv.qual + # content changes md5sums on reruns + - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz + # binary changes md5sums on reruns + - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz.tbi + # binary changes md5sums on reruns + - path: results/freebayes + should_exist: false