cat/fastq: update conditional (#2085)

update conditional
This commit is contained in:
Matthias De Smet 2022-09-20 14:46:01 +02:00 committed by GitHub
parent d8ba32c6b5
commit c13f2274fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,7 @@ process CAT_FASTQ {
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def readList = reads.collect{ it.toString() } def readList = reads.collect{ it.toString() }
if (meta.single_end) { if (meta.single_end) {
if (readList.size > 1) { if (readList.size >= 1) {
""" """
cat ${readList.join(' ')} > ${prefix}.merged.fastq.gz cat ${readList.join(' ')} > ${prefix}.merged.fastq.gz
@ -33,7 +33,7 @@ process CAT_FASTQ {
""" """
} }
} else { } else {
if (readList.size > 2) { if (readList.size >= 2) {
def read1 = [] def read1 = []
def read2 = [] def read2 = []
readList.eachWithIndex{ v, ix -> ( ix & 1 ? read2 : read1 ) << v } readList.eachWithIndex{ v, ix -> ( ix & 1 ? read2 : read1 ) << v }