Skip to content

Commit 019fc68

Browse files
Merge pull request #601 from WackerO/tidditpair
Tiddit pair VC
2 parents 4a3601c + 1475991 commit 019fc68

10 files changed

Lines changed: 175 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131
- [#576](https://github.com/nf-core/sarek/pull/576) - Add modules and subworkflows for `cnvkit` germline mode
3232
- [#582](https://github.com/nf-core/sarek/pull/582) - Added option `--vep_out_format` for setting the format of the output-file from VEP to `json`, `tab` or `vcf` (default)
3333
- [#594](https://github.com/nf-core/sarek/pull/594) - Add parameter `--save_output_as_bam` to allow output of result files in BAM format
34-
- [#600](https://github.com/nf-core/sarek/pull/600) - Added description for UMI related params in schema
3534
- [#597](https://github.com/nf-core/sarek/pull/597) - Added tiddit for tumor variant calling
35+
- [#600](https://github.com/nf-core/sarek/pull/600) - Added description for UMI related params in schema
3636

3737
### Changed
3838

conf/modules.config

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,24 @@ process{
10761076
ext.prefix = {"${meta.id}.somatic_snvs"}
10771077
}
10781078

1079+
//TIDDIT
1080+
withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_NORMAL:TABIX_BGZIP_TIDDIT_SV' {
1081+
ext.prefix = {"${meta.id}.normal.vcf"}
1082+
}
1083+
1084+
withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_TUMOR:TABIX_BGZIP_TIDDIT_SV' {
1085+
ext.prefix = {"${meta.id}.tumor.vcf"}
1086+
}
1087+
1088+
//SVDB
1089+
withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:SVDB_MERGE' {
1090+
publishDir = [
1091+
mode: params.publish_dir_mode,
1092+
path: { "${params.outdir}/variant_calling/${meta.id}/tiddit" },
1093+
pattern: "*vcf"
1094+
]
1095+
}
1096+
10791097
// VCF QC
10801098
withName: 'BCFTOOLS_STATS'{
10811099
ext.when = { !(params.skip_tools && params.skip_tools.contains('bcftools')) }

modules.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@
219219
"strelka/somatic": {
220220
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
221221
},
222+
"svdb/merge": {
223+
"git_sha": "313d76e00525c8e975dabce0c34973fd53c3f4dd"
224+
},
222225
"tabix/bgziptabix": {
223226
"git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe"
224227
},

modules/nf-core/modules/svdb/merge/main.nf

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/modules/svdb/merge/meta.yml

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

subworkflows/local/germline_variant_calling.nf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ workflow GERMLINE_VARIANT_CALLING {
4040
manta_vcf = Channel.empty()
4141
strelka_vcf = Channel.empty()
4242
tiddit_vcf = Channel.empty()
43-
mpileup = Channel.empty()
4443

4544
// Remap channel with intervals
4645
cram_recalibrated_intervals = cram_recalibrated.combine(intervals)

subworkflows/local/pair_variant_calling.nf

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,30 @@ include { RUN_STRELKA_SOMATIC } from '../nf-core/variantca
1010
include { RUN_CNVKIT_SOMATIC } from '../nf-core/variantcalling/cnvkit/somatic/main.nf'
1111
include { RUN_MPILEUP as RUN_MPILEUP_NORMAL } from '../nf-core/variantcalling/mpileup/main'
1212
include { RUN_MPILEUP as RUN_MPILEUP_TUMOR } from '../nf-core/variantcalling/mpileup/main'
13+
include { RUN_TIDDIT as RUN_TIDDIT_NORMAL } from '../nf-core/variantcalling/tiddit/main.nf'
14+
include { RUN_TIDDIT as RUN_TIDDIT_TUMOR } from '../nf-core/variantcalling/tiddit/main.nf'
15+
include { SVDB_MERGE } from '../../modules/nf-core/modules/svdb/merge/main.nf'
1316

1417
workflow PAIR_VARIANT_CALLING {
1518
take:
1619
tools // Mandatory, list of tools to apply
1720
cram_pair // channel: [mandatory] cram
21+
bwa // channel: [optional] bwa
22+
chr_files
1823
dbsnp // channel: [mandatory] dbsnp
1924
dbsnp_tbi // channel: [mandatory] dbsnp_tbi
2025
dict // channel: [mandatory] dict
2126
fasta // channel: [mandatory] fasta
2227
fasta_fai // channel: [mandatory] fasta_fai
28+
germline_resource // channel: [optional] germline_resource
29+
germline_resource_tbi // channel: [optional] germline_resource_tbi
2330
intervals // channel: [mandatory] intervals/target regions
2431
intervals_bed_gz_tbi // channel: [mandatory] intervals/target regions index zipped and indexed
2532
intervals_bed_combined // channel: [mandatory] intervals/target regions in one file unzipped
33+
mappability
2634
msisensorpro_scan // channel: [optional] msisensorpro_scan
27-
germline_resource // channel: [optional] germline_resource
28-
germline_resource_tbi // channel: [optional] germline_resource_tbi
2935
panel_of_normals // channel: [optional] panel_of_normals
3036
panel_of_normals_tbi // channel: [optional] panel_of_normals_tbi
31-
chr_files
32-
mappability
3337

3438
main:
3539

@@ -41,6 +45,7 @@ workflow PAIR_VARIANT_CALLING {
4145
strelka_vcf = Channel.empty()
4246
msisensorpro_output = Channel.empty()
4347
mutect2_vcf = Channel.empty()
48+
tiddit_vcf = Channel.empty()
4449

4550
// Remap channel with intervals
4651
cram_pair_intervals = cram_pair.combine(intervals)
@@ -157,7 +162,7 @@ workflow PAIR_VARIANT_CALLING {
157162
fasta,
158163
fasta_fai)
159164

160-
strelka_vcf = Channel.empty().mix(RUN_STRELKA_SOMATIC.out.strelka_vcf)
165+
strelka_vcf = Channel.empty().mix(RUN_STRELKA_SOMATIC.out.strelka_vcf)
161166
ch_versions = ch_versions.mix(RUN_STRELKA_SOMATIC.out.versions)
162167
}
163168

@@ -188,14 +193,35 @@ workflow PAIR_VARIANT_CALLING {
188193
ch_versions = ch_versions.mix(GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING.out.versions)
189194
}
190195

191-
// if (tools.contains('tiddit')) {
192-
// }
196+
//TIDDIT
197+
if (tools.contains('tiddit')){
198+
cram_normal = cram_pair.map{meta, normal_cram, normal_crai, tumor_cram, tumor_crai ->
199+
[meta, normal_cram, normal_crai]
200+
}
201+
cram_tumor = cram_pair.map{meta, normal_cram, normal_crai, tumor_cram, tumor_crai ->
202+
[meta, tumor_cram, tumor_crai]
203+
}
204+
205+
RUN_TIDDIT_NORMAL(cram_normal, fasta, bwa)
206+
RUN_TIDDIT_TUMOR(cram_tumor, fasta, bwa)
207+
SVDB_MERGE(RUN_TIDDIT_NORMAL.out.tiddit_vcf.join(RUN_TIDDIT_TUMOR.out.tiddit_vcf)
208+
.map{meta, vcf_normal, vcf_tumor ->
209+
[meta, [vcf_normal, vcf_tumor]]
210+
}, false)
211+
tiddit_vcf = SVDB_MERGE.out.vcf
212+
213+
ch_versions = ch_versions.mix(RUN_TIDDIT_NORMAL.out.versions)
214+
ch_versions = ch_versions.mix(RUN_TIDDIT_TUMOR.out.versions)
215+
ch_versions = ch_versions.mix(SVDB_MERGE.out.versions)
216+
}
193217

194218
emit:
195219
freebayes_vcf
196220
manta_vcf
197221
msisensorpro_output
198222
mutect2_vcf
199223
strelka_vcf
224+
tiddit_vcf
225+
200226
versions = ch_versions
201227
}

subworkflows/nf-core/variantcalling/tiddit/main.nf

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/test_tools.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,23 @@
7070
- path: results/variant_calling/sample1/cnvkit/test.paired_end.recalibrated.sorted.cns
7171
- path: results/variant_calling/sample1/cnvkit/test.paired_end.recalibrated.sorted.call.cns
7272

73+
- name: Run variant calling on somatic sample with tiddit
74+
command: nextflow run main.nf -profile test,tools_somatic,docker --tools tiddit -c ./tests/nextflow.config
75+
tags:
76+
- tiddit
77+
- somatic
78+
- variant_calling
79+
files:
80+
- path: results/variant_calling/sample3/tiddit/sample3.ploidies.tab
81+
- path: results/variant_calling/sample3/tiddit/sample3.vcf.gz
82+
- path: results/variant_calling/sample3/tiddit/sample3.vcf.gz.tbi
83+
- path: results/variant_calling/sample4_vs_sample3/tiddit/sample4_vs_sample3.normal.vcf.gz
84+
- path: results/variant_calling/sample4_vs_sample3/tiddit/sample4_vs_sample3.normal.vcf.gz.tbi
85+
- path: results/variant_calling/sample4_vs_sample3/tiddit/sample4_vs_sample3.tumor.vcf.gz
86+
- path: results/variant_calling/sample4_vs_sample3/tiddit/sample4_vs_sample3.tumor.vcf.gz.tbi
87+
- path: results/variant_calling/sample4_vs_sample3/tiddit/sample4_vs_sample3_sv_merge.vcf
88+
- path: results/variant_calling/sample4_vs_sample3/tiddit/sample4_vs_sample3.ploidies.tab
89+
7390
- name: Run variant calling on germline sample with tiddit
7491
command: nextflow run main.nf -profile test,tools_germline,docker --tools tiddit -c ./tests/nextflow.config
7592
tags:

workflows/sarek.nf

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -833,21 +833,22 @@ workflow SAREK {
833833
PAIR_VARIANT_CALLING(
834834
params.tools,
835835
cram_variant_calling_pair,
836+
[],
837+
chr_files,
836838
dbsnp,
837839
dbsnp_tbi,
838840
dict,
839841
fasta,
840842
fasta_fai,
843+
germline_resource,
844+
germline_resource_tbi,
841845
intervals,
842846
intervals_bed_gz_tbi,
843847
intervals_bed_combined,
848+
mappability,
844849
msisensorpro_scan,
845-
germline_resource,
846-
germline_resource_tbi,
847850
pon,
848-
pon_tbi,
849-
chr_files,
850-
mappability
851+
pon_tbi
851852
)
852853

853854
// Gather vcf files for annotation and QC
@@ -866,6 +867,7 @@ workflow SAREK {
866867
vcf_to_annotate = vcf_to_annotate.mix(PAIR_VARIANT_CALLING.out.mutect2_vcf)
867868
vcf_to_annotate = vcf_to_annotate.mix(PAIR_VARIANT_CALLING.out.manta_vcf)
868869
vcf_to_annotate = vcf_to_annotate.mix(PAIR_VARIANT_CALLING.out.strelka_vcf)
870+
vcf_to_annotate = vcf_to_annotate.mix(PAIR_VARIANT_CALLING.out.tiddit_vcf)
869871

870872
// Gather used softwares versions
871873
ch_versions = ch_versions.mix(GERMLINE_VARIANT_CALLING.out.versions)

0 commit comments

Comments
 (0)