Skip to content

Commit 2c7c8d4

Browse files
committed
Add more bugfixes
1 parent 8084e70 commit 2c7c8d4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

main.nf

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,13 @@ if( params.readPaths ){
337337
.map { row -> [ file( row ) ] }
338338
.ifEmpty { exit 1, "params.readPaths or params.bams was empty - no input files supplied!" }
339339
.dump()
340-
.into { ch_bam_to_fastq_convert }
340+
.set { ch_bam_to_fastq_convert }
341341

342342
//Set up clean channels
343343
ch_read_files_fastqc = Channel.empty()
344344
ch_read_files_complexity_filter_poly_g = Channel.empty()
345345
ch_read_files_clip = Channel.empty()
346+
ch_read_unmap = Channel.empty()
346347
}
347348
} else if (!params.bam){
348349
Channel
@@ -358,12 +359,13 @@ if( params.readPaths ){
358359
.ifEmpty { exit 1, "Cannot find any bam file matching: ${params.reads}\nNB: Path needs" +
359360
"to be enclosed in quotes!\n" }
360361
.dump() //For debugging purposes
361-
.into { ch_bam_to_fastq_convert }
362+
.set { ch_bam_to_fastq_convert }
362363

363364
//Set up clean channels
364365
ch_read_files_fastqc = Channel.empty()
365366
ch_read_files_complexity_filter_poly_g = Channel.empty()
366367
ch_read_files_clip = Channel.empty()
368+
ch_read_unmap = Channel.empty()
367369

368370
}
369371

@@ -540,7 +542,8 @@ process convertBam {
540542
file bam from ch_bam_to_fastq_convert
541543

542544
output:
543-
set val("${base}"), file("*.fastq.gz") into (ch_read_files_converted_fastqc, ch_read_files_converted_fastp, ch_read_files_converted_mapping_bwa, ch_read_files_converted_mapping_cm, ch_read_files_converted_mapping_bwamem)
545+
set val("${base}"), file("*.fastq.gz") into (ch_read_files_converted_fastqc, ch_read_files_converted_fastp, ch_read_files_converted_mapping_bwa, ch_read_files_converted_mapping_cm, ch_read_files_converted_mapping_bwamem,
546+
ch_read_unmap_convertBam)
544547

545548
script:
546549
base = "${bam.baseName}"
@@ -931,7 +934,7 @@ process strip_input_fastq {
931934
when: params.strip_input_fastq
932935

933936
input:
934-
set val(name), file(fq) from ch_read_unmap
937+
set val(name), file(fq) from ch_read_unmap.mix(ch_read_unmap_convertBam)
935938
file bam from ch_bwa_mapped_reads_strip.mix(ch_circular_mapped_reads_strip, ch_bwamem_mapped_reads_strip)
936939

937940
output:

0 commit comments

Comments
 (0)