Skip to content

Commit 87da681

Browse files
authored
Merge pull request #330 from jfy133/fix_trimbamlogic
Fixes missing BAM channel creation when trimBam is on but PMD is off
2 parents 5cfc57e + 79afba4 commit 87da681

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
@@ -1648,47 +1648,42 @@ process bam_trim {
16481648
"""
16491649
}
16501650

1651-
16521651
if ( params.run_genotyping && params.genotyping_source == 'raw' ) {
16531652
ch_rmdup_for_skipdamagemanipulation.mix(ch_output_from_pmdtools,ch_output_from_bamutils)
16541653
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1655-
16561654
ch_rmdupindex_for_skipdamagemanipulation.mix(ch_outputindex_from_pmdtools,ch_outputindex_from_bamutils)
16571655
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1658-
16591656
} else if ( params.run_genotyping && params.genotyping_source == "trimmed" ) {
16601657
ch_rmdup_for_skipdamagemanipulation.mix(ch_output_from_pmdtools,ch_output_from_bamutils)
16611658
.filter { it =~/.*trimmed.bam/ }
16621659
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1663-
16641660
ch_rmdupindex_for_skipdamagemanipulation.mix(ch_outputindex_from_pmdtools,ch_outputindex_from_bamutils)
16651661
.filter { it =~/.*trimmed.bam.bai|.*.trimmed.bam.csi/ }
16661662
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1667-
16681663
} else if ( params.run_genotyping && params.genotyping_source == "pmd" ) {
16691664
ch_rmdup_for_skipdamagemanipulation.mix(ch_output_from_pmdtools,ch_output_from_bamutils)
16701665
.filter { it =~/.*pmd.bam/ }
16711666
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1672-
16731667
ch_rmdupindex_for_skipdamagemanipulation.mix(ch_outputindex_from_pmdtools,ch_outputindex_from_bamutils)
16741668
.filter { it =~/.*pmd.bam.bai|.*.pmd.bam.csi/ }
16751669
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1676-
16771670
} else if ( !params.run_genotyping && !params.run_trim_bam && !params.run_pmdtools ) {
16781671
ch_rmdup_for_skipdamagemanipulation
16791672
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1680-
16811673
ch_rmdupindex_for_skipdamagemanipulation
1682-
.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 }
16831675
} else if ( !params.run_genotyping && !params.run_trim_bam && params.run_pmdtools ) {
16841676
ch_rmdup_for_skipdamagemanipulation
16851677
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1686-
16871678
ch_rmdupindex_for_skipdamagemanipulation
1688-
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1679+
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
1680+
} else if ( !params.run_genotyping && params.run_trim_bam && !params.run_pmdtools ) {
1681+
ch_rmdup_for_skipdamagemanipulation
1682+
.into { ch_damagemanipulation_for_skipgenotyping; ch_damagemanipulation_for_genotyping_ug; ch_damagemanipulation_for_genotyping_hc; ch_damagemanipulation_for_genotyping_freebayes }
1683+
ch_rmdupindex_for_skipdamagemanipulation
1684+
.into { ch_damagemanipulationindex_for_skipgenotyping; ch_damagemanipulationindex_for_genotyping_hc; ch_damagemanipulationindex_for_genotyping_freebayes }
16891685
}
16901686

1691-
16921687
/*
16931688
Step 12b: Genotyping - UG
16941689
NB: GATK 3.5 is the last release with VCF output in "old" VCF format, not breaking MVA. Therefore we need it (for now at least until downstream tools can read proper 4.2 VCFs... )

0 commit comments

Comments
 (0)