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

Add cnvkit germline mode #576

Merged
merged 20 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#538](https://github.com/nf-core/sarek/pull/538) - Add param `--seq_platform`, default: `ILLUMINA`
- [#545](https://github.com/nf-core/sarek/pull/545) - Add modules and subworkflows for `cnvkit` tumor_only mode
- [#540](https://github.com/nf-core/sarek/pull/540) - Add modules and subworkflows for `cnvkit` somatic mode
- [#573](https://github.com/nf-core/sarek/pull/573) - Add modules and subworkflows for `cnvkit` germline mode

### Changed

Expand Down
11 changes: 11 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,17 @@ process{
]
}

// CNVKIT_GERMLINE
withName: 'CNVKIT_BATCH_GERMLINE' {
ext.args = { params.wes ? "--method hybrid --diagram --scatter" : "--method wgs --diagram --scatter" }
ext.when = { params.tools && params.tools.contains('cnvkit') }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/cnvkit" },
pattern: "*{bed,cnn,cnr,cns,pdf,png}"
]
}

// DEEPVARIANT
withName: 'CONCAT_DEEPVARIANT_.*' {
publishDir = [
Expand Down
20 changes: 20 additions & 0 deletions subworkflows/local/germline_variant_calling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include { RUN_FREEBAYES } from '../nf-core/variantcalling/freebayes/main.n
include { RUN_HAPLOTYPECALLER } from '../nf-core/variantcalling/haplotypecaller/main.nf'
include { RUN_MANTA_GERMLINE } from '../nf-core/variantcalling/manta/germline/main.nf'
include { RUN_STRELKA_SINGLE } from '../nf-core/variantcalling/strelka/single/main.nf'
include { RUN_CNVKIT_GERMLINE } from '../nf-core/variantcalling/cnvkit/germline/main.nf'
//include { TIDDIT } from './variantcalling/tiddit.nf'

workflow GERMLINE_VARIANT_CALLING {
Expand All @@ -21,6 +22,7 @@ workflow GERMLINE_VARIANT_CALLING {
intervals_bed_gz_tbi // channel: [mandatory] intervals/target regions index zipped and indexed
intervals_bed_combine_gz_tbi // channel: [mandatory] intervals/target regions index zipped and indexed in one file
intervals_bed_combine_gz // channel: [mandatory] intervals/target regions index zipped in one file
intervals_bed_combined // channel: [mandatory] intervals/target regions in one file unzipped
// joint_germline // val: true/false on whether to run joint_germline calling, only works in combination with haplotypecaller at the moment

main:
Expand Down Expand Up @@ -62,6 +64,24 @@ workflow GERMLINE_VARIANT_CALLING {
cram, crai, bed_new, tbi_new]
}

// CNVKIT
cram_recalibrated.view()

SusiJo marked this conversation as resolved.
Show resolved Hide resolved
if(params.tools.contains('cnvkit')){
cram_recalibrated_cnvkit = cram_recalibrated
.map{ meta, cram, crai ->
[meta, [], cram]
}

cram_recalibrated_cnvkit.view()

SusiJo marked this conversation as resolved.
Show resolved Hide resolved
RUN_CNVKIT_GERMLINE(cram_recalibrated_cnvkit,
fasta,
intervals_bed_combined,
[])
ch_versions = ch_versions.mix(RUN_CNVKIT_GERMLINE.out.versions)
}

// DEEPVARIANT
if(params.tools.contains('deepvariant')){
RUN_DEEPVARIANT(cram_recalibrated_intervals, fasta, fasta_fai, intervals_bed_combine_gz)
Expand Down
27 changes: 27 additions & 0 deletions subworkflows/nf-core/variantcalling/cnvkit/germline/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,8 @@ workflow SAREK {
intervals,
intervals_bed_gz_tbi,
intervals_bed_combined_gz_tbi,
intervals_bed_combined_gz)
intervals_bed_combined_gz,
intervals_bed_combined)
// params.joint_germline)

// TUMOR ONLY VARIANT CALLING
Expand Down