Skip to content

Commit

Permalink
Merge pull request #573 from nf-core/wes
Browse files Browse the repository at this point in the history
Turn off workflows irrelevant for WES analysis
  • Loading branch information
ramprasadn authored Jun 24, 2024
2 parents 010da06 + 0ccf239 commit 27fde73
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 36 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### `Changed`

- `readcount_intervals` parameter is now mandatory for running germlinecnvcaller. [#570](https://github.com/nf-core/raredisease/pull/570)
- Turn off CNVnator, TIDDIT, SMNCopyNumberCaller, Gens, and Vcf2cytosure for targeted analysis [#573](https://github.com/nf-core/raredisease/pull/573)

### `Fixed`

Expand Down
37 changes: 25 additions & 12 deletions subworkflows/local/call_structural_variants.nf
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ workflow CALL_STRUCTURAL_VARIANTS {
.collect{it[1]}
.set{ manta_vcf }

CALL_SV_TIDDIT (ch_genome_bam_bai, ch_genome_fasta, ch_bwa_index, ch_case_info)
.vcf
.collect{it[1]}
.set { tiddit_vcf }
if (params.analysis_type.equals("wgs")) {
CALL_SV_TIDDIT (ch_genome_bam_bai, ch_genome_fasta, ch_bwa_index, ch_case_info)
.vcf
.collect{it[1]}
.set { tiddit_vcf }

CALL_SV_CNVNATOR (ch_genome_bam_bai, ch_genome_fasta, ch_genome_fai, ch_case_info)
.vcf
.collect{it[1]}
.set { cnvnator_vcf }
}

if (!params.skip_germlinecnvcaller) {
CALL_SV_GERMLINECNVCALLER (ch_genome_bam_bai, ch_genome_fasta, ch_genome_fai, ch_readcount_intervals, ch_genome_dictionary, ch_ploidy_model, ch_gcnvcaller_model)
Expand All @@ -52,28 +59,34 @@ workflow CALL_STRUCTURAL_VARIANTS {
ch_versions = ch_versions.mix(CALL_SV_GERMLINECNVCALLER.out.versions)
}

CALL_SV_CNVNATOR (ch_genome_bam_bai, ch_genome_fasta, ch_genome_fai, ch_case_info)
.vcf
.collect{it[1]}
.set { cnvnator_vcf }

if (params.analysis_type.equals("wgs") || params.run_mt_for_wes) {
CALL_SV_MT (ch_mt_bam_bai, ch_genome_fasta)
ch_versions = ch_versions.mix(CALL_SV_MT.out.versions)
}

//merge
if (params.skip_germlinecnvcaller) {
if (params.analysis_type.equals("wgs")) {
tiddit_vcf
.combine(manta_vcf)
.combine(cnvnator_vcf)
.toList()
.set { vcf_list }
} else {
manta_vcf
.toList()
.set { vcf_list }
}
} else if (params.analysis_type.equals("wgs")){
tiddit_vcf
.combine(manta_vcf)
.combine(gcnvcaller_vcf)
.combine(cnvnator_vcf)
.toList()
.set { vcf_list }
} else {
tiddit_vcf
.combine(manta_vcf)
manta_vcf
.combine(gcnvcaller_vcf)
.combine(cnvnator_vcf)
.toList()
.set { vcf_list }
}
Expand Down
49 changes: 25 additions & 24 deletions workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -695,28 +695,29 @@ workflow RAREDISEASE {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

RENAME_BAM_FOR_SMNCALLER(ch_mapped.genome_marked_bam, "bam").output
.collect{it}
.toList()
.set { ch_bam_list }

RENAME_BAI_FOR_SMNCALLER(ch_mapped.genome_marked_bai, "bam.bai").output
.collect{it}
.toList()
.set { ch_bai_list }

ch_case_info
.combine(ch_bam_list)
.combine(ch_bai_list)
.set { ch_bams_bais }

SMNCOPYNUMBERCALLER (
ch_bams_bais
)
ch_versions = ch_versions.mix(RENAME_BAM_FOR_SMNCALLER.out.versions)
ch_versions = ch_versions.mix(RENAME_BAI_FOR_SMNCALLER.out.versions)
ch_versions = ch_versions.mix(SMNCOPYNUMBERCALLER.out.versions)

if ( params.analysis_type.equals("wgs") ) {
RENAME_BAM_FOR_SMNCALLER(ch_mapped.genome_marked_bam, "bam").output
.collect{it}
.toList()
.set { ch_bam_list }

RENAME_BAI_FOR_SMNCALLER(ch_mapped.genome_marked_bai, "bam.bai").output
.collect{it}
.toList()
.set { ch_bai_list }

ch_case_info
.combine(ch_bam_list)
.combine(ch_bai_list)
.set { ch_bams_bais }

SMNCOPYNUMBERCALLER (
ch_bams_bais
)
ch_versions = ch_versions.mix(RENAME_BAM_FOR_SMNCALLER.out.versions)
ch_versions = ch_versions.mix(RENAME_BAI_FOR_SMNCALLER.out.versions)
ch_versions = ch_versions.mix(SMNCOPYNUMBERCALLER.out.versions)
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PEDDY
Expand All @@ -735,7 +736,7 @@ workflow RAREDISEASE {
Generate CGH files from sequencing data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
if ( !params.skip_vcf2cytosure && params.analysis_type != "wes" ) {
if ( !params.skip_vcf2cytosure && params.analysis_type.equals("wgs") ) {
GENERATE_CYTOSURE_FILES (
ch_sv_annotate.vcf_ann,
ch_sv_annotate.tbi,
Expand All @@ -751,7 +752,7 @@ workflow RAREDISEASE {
GENS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
if ( !params.skip_gens && params.analysis_type != "wes" ) {
if ( !params.skip_gens && params.analysis_type.equals("wgs") ) {
GENS (
ch_mapped.genome_bam_bai,
CALL_SNV.out.genome_gvcf,
Expand Down

0 comments on commit 27fde73

Please sign in to comment.