Skip to content

Commit 0725bf9

Browse files
committed
Thanks @micans
1 parent ea4d42c commit 0725bf9

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

main.nf

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,10 @@ if( params.bwa_index && (params.aligner == 'bwa' | params.bwamem)){
223223
.fromPath("${params.bwa_index}/**.*")
224224
.ifEmpty { exit 1, "BWA index not found: ${params.bwa_index}" }
225225
.into{ch_bwa_index_existing;ch_bwa_index_bwamem_existing}
226-
ch_bwa_index = Channel.create()
227-
ch_bwa_index_bwamem = Channel.create()
228226
} else {
229-
ch_bwa_index_existing = Channel.create()
230-
ch_bwa_index_bwamem_existing = Channel.create()
227+
//Create empty channels to make sure later mix() does not fail
228+
ch_bwa_index_existing = Channel.empty()
229+
ch_bwa_index_bwamem_existing = Channel.empty()
231230
}
232231

233232
//Validate that either pairedEnd or singleEnd has been specified by the user!
@@ -885,10 +884,10 @@ process markDup{
885884
}
886885

887886
//If no deduplication runs, the input is mixed directly from samtools filter, if it runs either markdup or dedup is used thus mixed from these two channels
888-
ch_dedup_for_pmdtools = Channel.create()
887+
ch_dedup_for_pmdtools = Channel.empty()
889888

890889
//Bamutils TrimBam Channel
891-
ch_for_bamutils = Channel.create()
890+
ch_for_bamutils = Channel.empty()
892891

893892
if(!params.skip_deduplication){
894893
ch_dedup_for_pmdtools.mix(ch_markdup_bam,ch_dedup_bam).into {ch_for_pmdtools;ch_for_bamutils}

0 commit comments

Comments
 (0)