Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiddit for tumor varcalling #597

Merged
merged 11 commits into from
Jun 23, 2022
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#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)
- [#594](https://github.com/nf-core/sarek/pull/594) - Add parameter `--save_output_as_bam` to allow output of result files in BAM format
- [#600](https://github.com/nf-core/sarek/pull/600) - Added description for UMI related params in schema
- [#597](https://github.com/nf-core/sarek/pull/597) - Added tiddit for tumor variant calling

### Changed

Expand Down
Binary file modified docs/images/sarek_subway.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
150 changes: 95 additions & 55 deletions docs/images/sarek_subway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions subworkflows/local/germline_variant_calling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ workflow GERMLINE_VARIANT_CALLING {
bwa // channel: [mandatory] bwa
dbsnp // channel: [mandatory] dbsnp
dbsnp_tbi // channel: [mandatory] dbsnp_tbi
known_sites
known_sites_tbi
dict // channel: [mandatory] dict
fasta // channel: [mandatory] fasta
fasta_fai // channel: [mandatory] fasta_fai
intervals // channel: [mandatory] intervals/target regions
intervals_bed_gz_tbi // channel: [mandatory] intervals/target regions index zipped and indexed
intervals_bed_combined // channel: [mandatory] intervals/target regions in one file unzipped
known_sites
known_sites_tbi
// joint_germline // val: true/false on whether to run joint_germline calling, only works in combination with haplotypecaller at the moment

main:
Expand Down
26 changes: 18 additions & 8 deletions subworkflows/local/tumor_variant_calling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,27 @@ include { RUN_STRELKA_SINGLE } from '../nf-core/variantcall
include { RUN_CONTROLFREEC_TUMORONLY } from '../nf-core/variantcalling/controlfreec/tumoronly/main.nf'
include { RUN_CNVKIT_TUMORONLY } from '../nf-core/variantcalling/cnvkit/tumoronly/main.nf'
include { RUN_MPILEUP } from '../nf-core/variantcalling/mpileup/main'
include { RUN_TIDDIT } from '../nf-core/variantcalling/tiddit/main.nf'

workflow TUMOR_ONLY_VARIANT_CALLING {
take:
tools // Mandatory, list of tools to apply
cram_recalibrated // channel: [mandatory] cram
bwa // channel: [optional] bwa
chr_files
dbsnp // channel: [mandatory] dbsnp
dbsnp_tbi // channel: [mandatory] dbsnp_tbi
dict // channel: [mandatory] dict
fasta // channel: [mandatory] fasta
fasta_fai // channel: [mandatory] fasta_fai
germline_resource // channel: [optional] germline_resource
germline_resource_tbi // channel: [optional] germline_resource_tbi
intervals // channel: [mandatory] intervals/target regions
intervals_bed_gz_tbi // channel: [mandatory] intervals/target regions index zipped and indexed
intervals_bed_combined // channel: [mandatory] intervals/target regions in one file unzipped
germline_resource // channel: [optional] germline_resource
germline_resource_tbi // channel: [optional] germline_resource_tbi
mappability
panel_of_normals // channel: [optional] panel_of_normals
panel_of_normals_tbi // channel: [optional] panel_of_normals_tbi
chr_files
mappability

main:

Expand All @@ -39,6 +41,7 @@ workflow TUMOR_ONLY_VARIANT_CALLING {
manta_vcf = Channel.empty()
mutect2_vcf = Channel.empty()
strelka_vcf = Channel.empty()
tiddit_vcf = Channel.empty()

// Remap channel with intervals
cram_recalibrated_intervals = cram_recalibrated.combine(intervals)
Expand Down Expand Up @@ -152,16 +155,23 @@ workflow TUMOR_ONLY_VARIANT_CALLING {
ch_versions = ch_versions.mix(RUN_STRELKA_SINGLE.out.versions)
}

//TIDDIT
if (tools.contains('tiddit')){
RUN_TIDDIT(cram_recalibrated,
fasta,
bwa)

// if (tools.contains('tiddit')){
// }
tiddit_vcf = RUN_TIDDIT.out.tiddit_vcf
ch_versions = ch_versions.mix(RUN_TIDDIT.out.versions)
}

emit:
versions = ch_versions

emit:
freebayes_vcf
manta_vcf
mutect2_vcf
strelka_vcf
tiddit_vcf

versions = ch_versions
}
11 changes: 11 additions & 0 deletions tests/test_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@
- path: results/variant_calling/sample1/tiddit/sample1.vcf.gz
- path: results/variant_calling/sample1/tiddit/sample1.vcf.gz.tbi

- name: Run variant calling on tumor_only sample with tiddit
command: nextflow run main.nf -profile test,tools_tumoronly,docker --tools tiddit -c ./tests/nextflow.config
tags:
- tiddit
- tumor_only
- variant_calling
files:
- path: results/variant_calling/sample2/tiddit/sample2.ploidies.tab
- path: results/variant_calling/sample2/tiddit/sample2.vcf.gz
- path: results/variant_calling/sample2/tiddit/sample2.vcf.gz.tbi

- name: Run variant calling on somatic samples with controlfreec
command: nextflow run main.nf -profile test,tools_somatic,docker --tools controlfreec -c ./tests/nextflow.config
tags:
Expand Down
18 changes: 10 additions & 8 deletions workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -792,34 +792,35 @@ workflow SAREK {
[],
dbsnp,
dbsnp_tbi,
known_sites,
known_sites_tbi,
dict,
fasta,
fasta_fai,
intervals,
intervals_bed_gz_tbi,
intervals_bed_combined)
intervals_bed_combined,
known_sites,
known_sites_tbi)
// params.joint_germline)

// TUMOR ONLY VARIANT CALLING
TUMOR_ONLY_VARIANT_CALLING(
params.tools,
cram_variant_calling_tumor_only,
[],
chr_files,
dbsnp,
dbsnp_tbi,
dict,
fasta,
fasta_fai,
germline_resource,
germline_resource_tbi,
intervals,
intervals_bed_gz_tbi,
intervals_bed_combined,
germline_resource,
germline_resource_tbi,
mappability,
pon,
pon_tbi,
chr_files,
mappability
pon_tbi
)

// PAIR VARIANT CALLING
Expand Down Expand Up @@ -855,6 +856,7 @@ workflow SAREK {
vcf_to_annotate = vcf_to_annotate.mix(TUMOR_ONLY_VARIANT_CALLING.out.mutect2_vcf)
vcf_to_annotate = vcf_to_annotate.mix(TUMOR_ONLY_VARIANT_CALLING.out.manta_vcf)
vcf_to_annotate = vcf_to_annotate.mix(TUMOR_ONLY_VARIANT_CALLING.out.strelka_vcf)
vcf_to_annotate = vcf_to_annotate.mix(TUMOR_ONLY_VARIANT_CALLING.out.tiddit_vcf)
vcf_to_annotate = vcf_to_annotate.mix(PAIR_VARIANT_CALLING.out.mutect2_vcf)
vcf_to_annotate = vcf_to_annotate.mix(PAIR_VARIANT_CALLING.out.manta_vcf)
vcf_to_annotate = vcf_to_annotate.mix(PAIR_VARIANT_CALLING.out.strelka_vcf)
Expand Down