Skip to content

Commit 90c6a3d

Browse files
committed
Fixes missing BAM channel creation when trimBam is on but PMD is off
1 parent 1495485 commit 90c6a3d

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

main.nf

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,47 +1643,42 @@ process bam_trim {
16431643
"""
16441644
}
16451645

1646-
16471646
if ( params.run_genotyping && params.genotyping_source == 'raw' ) {
16481647
ch_rmdup_for_skipdamagemanipulation.mix(ch_output_from_pmdtools,ch_output_from_bamutils)
16491648
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1650-
16511649
ch_rmdupindex_for_skipdamagemanipulation.mix(ch_outputindex_from_pmdtools,ch_outputindex_from_bamutils)
16521650
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1653-
16541651
} else if ( params.run_genotyping && params.genotyping_source == "trimmed" ) {
16551652
ch_rmdup_for_skipdamagemanipulation.mix(ch_output_from_pmdtools,ch_output_from_bamutils)
16561653
.filter { it =~/.*trimmed.bam/ }
16571654
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1658-
16591655
ch_rmdupindex_for_skipdamagemanipulation.mix(ch_outputindex_from_pmdtools,ch_outputindex_from_bamutils)
16601656
.filter { it =~/.*trimmed.bam.bai|.*.trimmed.bam.csi/ }
16611657
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1662-
16631658
} else if ( params.run_genotyping && params.genotyping_source == "pmd" ) {
16641659
ch_rmdup_for_skipdamagemanipulation.mix(ch_output_from_pmdtools,ch_output_from_bamutils)
16651660
.filter { it =~/.*pmd.bam/ }
16661661
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1667-
16681662
ch_rmdupindex_for_skipdamagemanipulation.mix(ch_outputindex_from_pmdtools,ch_outputindex_from_bamutils)
16691663
.filter { it =~/.*pmd.bam.bai|.*.pmd.bam.csi/ }
16701664
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1671-
16721665
} else if ( !params.run_genotyping && !params.run_trim_bam && !params.run_pmdtools ) {
16731666
ch_rmdup_for_skipdamagemanipulation
16741667
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1675-
16761668
ch_rmdupindex_for_skipdamagemanipulation
1677-
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1669+
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
16781670
} else if ( !params.run_genotyping && !params.run_trim_bam && params.run_pmdtools ) {
16791671
ch_rmdup_for_skipdamagemanipulation
16801672
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1681-
16821673
ch_rmdupindex_for_skipdamagemanipulation
1683-
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1674+
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1675+
} else if ( !params.run_genotyping && params.run_trim_bam && !params.run_pmdtools ) {
1676+
ch_rmdup_for_skipdamagemanipulation
1677+
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1678+
ch_rmdupindex_for_skipdamagemanipulation
1679+
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
16841680
}
16851681

1686-
16871682
/*
16881683
Step 12a: Genotyping - UnifiedGenotyper Downloading
16891684
NB: GATK 3.5 is the last release with VCF output in "old" VCF format, not breaking downstream tools. Therefore we need it (for now at least until downstream tools can read proper 4.2 VCFs... )

0 commit comments

Comments
 (0)