Skip to content

Commit ea4d42c

Browse files
committed
Dependent channels for bwa index
1 parent c86a50a commit ea4d42c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

main.nf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,12 @@ 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-
}
226+
ch_bwa_index = Channel.create()
227+
ch_bwa_index_bwamem = Channel.create()
228+
} else {
229+
ch_bwa_index_existing = Channel.create()
230+
ch_bwa_index_bwamem_existing = Channel.create()
231+
}
227232

228233
//Validate that either pairedEnd or singleEnd has been specified by the user!
229234
if( params.singleEnd || params.pairedEnd ){
@@ -383,7 +388,7 @@ process makeBWAIndex {
383388
file wherearemyfiles
384389

385390
output:
386-
file "*.{amb,ann,bwt,pac,sa,fasta,fa}" into (ch_bwa_index,ch_bwa_index_bwamem_existing)
391+
file "*.{amb,ann,bwt,pac,sa,fasta,fa}" into (ch_bwa_index,ch_bwa_index_bwamem)
387392
file "where_are_my_files.txt"
388393

389394
script:

0 commit comments

Comments
 (0)