Skip to content

Commit 6082202

Browse files
authored
Merge pull request #927 from maxulysse/tumor_only
Fix tumor only for freebayes
2 parents a719b3f + 99d94db commit 6082202

File tree

4 files changed

+109
-39
lines changed

4 files changed

+109
-39
lines changed

subworkflows/local/bam_variant_calling_tumor_only_all/main.nf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ workflow BAM_VARIANT_CALLING_TUMOR_ONLY_ALL {
9393
// FREEBAYES
9494
if (tools.split(',').contains('freebayes')) {
9595
BAM_VARIANT_CALLING_FREEBAYES(
96-
cram,
96+
// Remap channel to match module/subworkflow
97+
cram.map{ meta, cram, crai -> [ meta, cram, crai, [], [] ] },
9798
// Remap channel to match module/subworkflow
9899
dict.map{ it -> [ [ id:'dict' ], it ] },
99100
fasta,

tests/config/tags.yml

Lines changed: 56 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,53 @@
22

33
tumor_normal_pair:
44
- conf/modules/**
5+
- main.nf
56
- modules/**
7+
- nextflow.config
8+
- nextflow_schema.json
69
- subworkflows/**
10+
- tests/test_tumor_normal_pair.yml
711
- workflows/**
8-
- nextflow_schema.json
9-
- nextflow.config
10-
- main.nf
1112

1213
save_mapped_only:
1314
- conf/modules/**
15+
- main.nf
1416
- modules/**
17+
- nextflow.config
18+
- nextflow_schema.json
1519
- subworkflows/**
20+
- tests/test_save_mapped.yml
1621
- workflows/**
17-
- nextflow_schema.json
18-
- nextflow.config
19-
- main.nf
2022

2123
save_output_as_bam_only:
2224
- conf/modules/**
25+
- main.nf
2326
- modules/**
27+
- nextflow.config
28+
- nextflow_schema.json
2429
- subworkflows/**
30+
- tests/test_save_output_as_bam_only.yml
2531
- workflows/**
26-
- nextflow_schema.json
27-
- nextflow.config
28-
- main.nf
2932

3033
skip_all_qc:
3134
- conf/modules/**
35+
- main.nf
3236
- modules/**
37+
- nextflow.config
38+
- nextflow_schema.json
3339
- subworkflows/**
40+
- tests/test_skip_all_qc.yml
3441
- workflows/**
35-
- nextflow_schema.json
36-
- nextflow.config
37-
- main.nf
3842

3943
skip_markduplicates:
4044
- conf/modules/**
45+
- main.nf
4146
- modules/**
47+
- nextflow.config
48+
- nextflow_schema.json
4249
- subworkflows/**
50+
- tests/test_skip_markduplicates.yml
4351
- workflows/**
44-
- nextflow_schema.json
45-
- nextflow.config
46-
- main.nf
4752

4853
# preprocessing
4954

@@ -55,6 +60,7 @@ alignment_to_fastq:
5560
- modules/nf-core/samtools/merge/main.nf
5661
- modules/nf-core/samtools/view/main.nf
5762
- subworkflows/local/bam_convert_samtools/main.nf
63+
- tests/test_alignment_to_fastq.yml
5864

5965
## umi
6066
umi:
@@ -69,11 +75,13 @@ umi:
6975
- modules/nf-core/samtools/bam2fq/main.nf
7076
- subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf
7177
- subworkflows/local/fastq_create_umi_consensus_fgbio/main.nf
78+
- tests/test_umi.yml
7279

7380
## fastp
7481
fastp:
7582
- conf/modules/trimming.config
7683
- modules/nf-core/fastp/main.nf
84+
- tests/test_fastp.yml
7785

7886
## aligner
7987

@@ -82,18 +90,21 @@ bwamem:
8290
- conf/modules/aligner.config
8391
- modules/nf-core/bwa/mem/main.nf
8492
- subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf
93+
- tests/test_alignment_bwamem.yml
8594

8695
### bwamem2
8796
bwamem2:
8897
- conf/modules/aligner.config
8998
- modules/nf-core/bwamem2/mem/main.nf
9099
- subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf
100+
- tests/test_alignment_bwamem2.yml
91101

92102
### dragmap
93103
dragmap:
94104
- conf/modules/aligner.config
95105
- modules/nf-core/dragmap/align/main.nf
96106
- subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf
107+
- tests/test_alignment_dragmap.yml
97108

98109
## markduplicates
99110
markduplicates:
@@ -105,6 +116,8 @@ markduplicates:
105116
- modules/nf-core/samtools/stats/main.nf
106117
- subworkflows/local/bam_markduplicates/main.nf
107118
- subworkflows/local/cram_qc_mosdepth_samtools/main.nf
119+
- tests/test_markduplicates_from_bam.yml
120+
- tests/test_markduplicates_from_cram.yml
108121

109122
## prepare_recalibration
110123
prepare_recalibration:
@@ -113,6 +126,8 @@ prepare_recalibration:
113126
- modules/nf-core/gatk4/gatherbqsrreports/main.nf
114127
- modules/nf-core/samtools/convert/main.nf
115128
- subworkflows/local/bam_baserecalibrator/main.nf
129+
- tests/test_prepare_recalibration_from_bam.yml
130+
- tests/test_prepare_recalibration_from_cram.yml
116131

117132
## recalibrate
118133
recalibrate:
@@ -123,6 +138,8 @@ recalibrate:
123138
- modules/nf-core/samtools/merge/main.nf
124139
- subworkflows/local/bam_applybqsr/main.nf
125140
- subworkflows/local/cram_merge_index_samtools/main.nf
141+
- tests/test_recalibrate_from_bam.yml
142+
- tests/test_recalibrate_from_cram.yml
126143

127144
## intervals
128145
intervals:
@@ -132,6 +149,7 @@ intervals:
132149
- modules/nf-core/gatk4/intervallisttobed/main.nf
133150
- modules/nf-core/tabix/bgziptabix/main.nf
134151
- subworkflows/local/prepare_intervals/main.nf
152+
- tests/test_intervals.yml
135153

136154
## gatk4_spark
137155
gatk4_spark:
@@ -145,6 +163,7 @@ gatk4_spark:
145163
- subworkflows/local/bam_applybqsr_spark/main.nf
146164
- subworkflows/local/bam_baserecalibrator_spark/main.nf
147165
- subworkflows/local/bam_markduplicates_spark/main.nf
166+
- tests/test_gatk4_spark.yml
148167

149168
# variant calling
150169

@@ -156,6 +175,7 @@ cnvkit:
156175
- modules/nf-core/cnvkit/reference/main.nf
157176
- subworkflows/local/bam_variant_calling_cnvkit/main.nf
158177
- subworkflows/local/prepare_reference_cnvkit/main.nf
178+
- tests/test_cnvkit.yml
159179

160180
## controlfreec
161181
controlfreec:
@@ -168,9 +188,10 @@ controlfreec:
168188
- modules/nf-core/controlfreec/freec2circos/main.nf
169189
- modules/nf-core/controlfreec/makegraph/main.nf
170190
- modules/nf-core/samtools/mpileup/main.nf
191+
- subworkflows/local/bam_variant_calling_mpileup/main.nf
171192
- subworkflows/local/bam_variant_calling_somatic_controlfreec/main.nf
172193
- subworkflows/local/bam_variant_calling_tumor_only_controlfreec/main.nf
173-
- subworkflows/local/bam_variant_calling_mpileup/main.nf
194+
- tests/test_controlfreec.yml
174195

175196
## deepvariant
176197
deepvariant:
@@ -179,6 +200,7 @@ deepvariant:
179200
- modules/nf-core/gatk4/mergevcfs/main.nf
180201
- modules/nf-core/tabix/tabix/main.nf
181202
- subworkflows/local/bam_variant_calling_deepvariant/main.nf
203+
- tests/test_deepvariant.yml
182204

183205
## freebayes
184206
freebayes:
@@ -188,19 +210,21 @@ freebayes:
188210
- modules/nf-core/gatk4/mergevcfs/main.nf
189211
- modules/nf-core/tabix/tabix/main.nf
190212
- subworkflows/local/bam_variant_calling_freebayes/main.nf
213+
- tests/test_freebayes.yml
191214

192215
## haplotypecaller
193216
haplotypecaller:
194217
- conf/modules/haplotypecaller.config
218+
- modules/nf-core/gatk4/cnnscorevariants/main.nf
219+
- modules/nf-core/gatk4/filtervarianttranches/main.nf
195220
- modules/nf-core/gatk4/haplotypecaller/main.nf
196221
- modules/nf-core/gatk4/mergevcfs/main.nf
197222
- modules/nf-core/samtools/index/main.nf
198223
- modules/nf-core/samtools/merge/main.nf
199-
- modules/nf-core/gatk4/cnnscorevariants/main.nf
200-
- modules/nf-core/gatk4/filtervarianttranches/main.nf
201224
- subworkflows/local/bam_merge_index_samtools/main.nf
202225
- subworkflows/local/bam_variant_calling_haplotypecaller/main.nf
203226
- subworkflows/local/vcf_variant_filtering_gatk/main.nf
227+
- tests/test_haplotypecaller.yml
204228

205229
haplotypecaller_skip_filter:
206230
- conf/modules/haplotypecaller.config
@@ -210,6 +234,7 @@ haplotypecaller_skip_filter:
210234
- modules/nf-core/samtools/merge/main.nf
211235
- subworkflows/local/bam_merge_index_samtools/main.nf
212236
- subworkflows/local/bam_variant_calling_haplotypecaller/main.nf
237+
- tests/test_haplotypecaller_skip_filter.yml
213238

214239
## joint_germline
215240
joint_germline:
@@ -229,6 +254,7 @@ joint_germline:
229254
- subworkflows/local/bam_merge_index_samtools/main.nf
230255
- subworkflows/local/bam_variant_calling_haplotypecaller/main.nf
231256
- subworkflows/local/vcf_variant_filtering_gatk/main.nf
257+
- tests/test_joint_germline.yml
232258

233259
## manta
234260
manta:
@@ -240,19 +266,22 @@ manta:
240266
- subworkflows/local/bam_variant_calling_germline_manta/main.nf
241267
- subworkflows/local/bam_variant_calling_somatic_manta/main.nf
242268
- subworkflows/local/bam_variant_calling_tumor_only_manta/main.nf
269+
- tests/test_manta.yml
243270

244271
## mpileup
245272
mpileup:
246273
- conf/modules/mpileup.config
247274
- modules/nf-core/cat/cat/main.nf
248275
- modules/nf-core/samtools/mpileup/main.nf
249276
- subworkflows/local/bam_variant_calling_mpileup/main.nf
277+
- tests/test_mpileup.yml
250278

251279
## msisensorpro
252280
msisensorpro:
253281
- conf/modules/msisensorpro.config
254-
- modules/nf-core/msisensorpro/scan/main.nf
255282
- modules/nf-core/msisensorpro/msi_somatic/main.nf
283+
- modules/nf-core/msisensorpro/scan/main.nf
284+
- tests/test_msisensorpro.yml
256285

257286
## mutect2
258287
mutect2:
@@ -267,6 +296,7 @@ mutect2:
267296
- modules/nf-core/gatk4/mutect2/main.nf
268297
- subworkflows/local/bam_variant_calling_somatic_mutect2/main.nf
269298
- subworkflows/local/bam_variant_calling_tumor_only_mutect2/main.nf
299+
- tests/test_mutect2.yml
270300

271301
## strelka
272302
strelka:
@@ -276,6 +306,7 @@ strelka:
276306
- modules/nf-core/strelka/somatic/main.nf
277307
- subworkflows/local/bam_variant_calling_single_strelka/main.nf
278308
- subworkflows/local/bam_variant_calling_somatic_strelka/main.nf
309+
- tests/test_strelka.yml
279310

280311
## strelka_bp
281312
strelka_bp:
@@ -286,6 +317,7 @@ strelka_bp:
286317
- modules/nf-core/strelka/somatic/main.nf
287318
- subworkflows/local/bam_variant_calling_somatic_manta/main.nf
288319
- subworkflows/local/bam_variant_calling_somatic_strelka/main.nf
320+
- tests/test_strelka_bp.yml
289321

290322
## tiddit
291323
tiddit:
@@ -295,6 +327,7 @@ tiddit:
295327
- modules/nf-core/tiddit/sv/main.nf
296328
- subworkflows/local/bam_variant_calling_single_tiddit/main.nf
297329
- subworkflows/local/bam_variant_calling_somatic_tiddit/main.nf
330+
- tests/test_tiddit.yml
298331

299332
# annotate
300333

@@ -307,20 +340,23 @@ merge:
307340
- subworkflows/local/vcf_annotate_all/main.nf
308341
- subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf
309342
- subworkflows/nf-core/vcf_annotate_snpeff/main.nf
343+
- tests/test_annotation_merge.yml
310344

311345
## snpeff
312346
snpeff:
313347
- conf/modules/annotate.config
314348
- modules/nf-core/snpeff/main.nf
315349
- modules/nf-core/tabix/bgziptabix/main.nf
316350
- subworkflows/nf-core/vcf_annotate_snpeff/main.nf
351+
- tests/test_annotation_snpeff.yml
317352

318353
## vep
319354
vep:
320355
- conf/modules/annotate.config
321356
- modules/nf-core/ensemblvep/main.nf
322357
- modules/nf-core/tabix/bgziptabix/main.nf
323358
- subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf
359+
- tests/test_annotation_vep.yml
324360

325361
# postprocessing
326362

@@ -347,3 +383,4 @@ concatenate_vcfs:
347383
- subworkflows/local/bam_variant_calling_mpileup/main.nf
348384
- subworkflows/local/bam_variant_calling_single_strelka/main.nf
349385
- subworkflows/local/bam_variant_calling_single_tiddit/main.nf
386+
- tests/test_concat_germline_vcfs.yml

tests/csv/3.0/fastq_tumor_only.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
patient,sex,status,sample,lane,fastq_1,fastq_2
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

tests/test_freebayes.yml

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -392,22 +392,52 @@
392392
# binary changes md5sums on reruns
393393
- path: results/freebayes
394394
should_exist: false
395-
# - name: Run variant calling on tumor_only sample with freebayes
396-
# command: nextflow run main.nf -profile test,tools_tumoronly --tools freebayes
397-
# tags:
398-
# - freebayes
399-
# - tumor_only
400-
# - variant_calling
401-
# files:
402-
# - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz
403-
# - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz.tbi
404-
# - name: Run variant calling on tumor_only sample with freebayes without intervals
405-
# command: nextflow run main.nf -profile test,tools_tumoronly --tools freebayes --no_intervals
406-
# tags:
407-
# - freebayes
408-
# - no_intervals
409-
# - tumor_only
410-
# - variant_calling
411-
# files:
412-
# - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz
413-
# - path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz.tbi
395+
- name: Run variant calling on tumor_only sample with freebayes
396+
command: nextflow run main.nf -profile test,tools_tumoronly --tools freebayes --outdir results
397+
tags:
398+
- freebayes
399+
- tumor_only
400+
- variant_calling
401+
files:
402+
- path: results/csv/variantcalled.csv
403+
md5sum: 5c5938a7bcc814cdaf5433c1120964c5
404+
- path: results/multiqc
405+
- path: results/reports/bcftools/freebayes/sample2/sample2.freebayes.bcftools_stats.txt
406+
# conda changes md5sums for test
407+
- path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.FILTER.summary
408+
md5sum: 0df3ddeec5779344b5d463347c9c6ea8
409+
- path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.TsTv.count
410+
md5sum: b1d308ed5087361a584cb61e7b835e1e
411+
- path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.TsTv.qual
412+
# content changes md5sums on reruns
413+
- path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz
414+
# binary changes md5sums on reruns
415+
- path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz.tbi
416+
# binary changes md5sums on reruns
417+
- path: results/freebayes
418+
should_exist: false
419+
- name: Run variant calling on tumor_only sample with freebayes without intervals
420+
command: nextflow run main.nf -profile test,tools_tumoronly --tools freebayes --no_intervals --outdir results
421+
tags:
422+
- freebayes
423+
- no_intervals
424+
- tumor_only
425+
- variant_calling
426+
files:
427+
- path: results/csv/variantcalled.csv
428+
md5sum: 5c5938a7bcc814cdaf5433c1120964c5
429+
- path: results/multiqc
430+
- path: results/reports/bcftools/freebayes/sample2/sample2.freebayes.bcftools_stats.txt
431+
# conda changes md5sums for test
432+
- path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.FILTER.summary
433+
md5sum: ee513ecf779b6e201b8ef98f95f25aab
434+
- path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.TsTv.count
435+
md5sum: 2dc153ad5af26c9f8aa82442bf65b4bf
436+
- path: results/reports/vcftools/freebayes/sample2/sample2.freebayes.TsTv.qual
437+
# content changes md5sums on reruns
438+
- path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz
439+
# binary changes md5sums on reruns
440+
- path: results/variant_calling/freebayes/sample2/sample2.freebayes.vcf.gz.tbi
441+
# binary changes md5sums on reruns
442+
- path: results/freebayes
443+
should_exist: false

0 commit comments

Comments
 (0)