how to do splitFastq by file number instead of read num in nextflow

58 Views Asked by At

splitFastq has a parameter by, only support read number. I thought of firstly calculating the read num of fastq and then divide the desired file number to get this value. But I dont know how to pass it from a channel.

So my input channel ch_A is like: [id, val(readnum), id.fq1, id.fq2], [id2, val(readnum), id2.fq1, id2.fq2],...

how to pass readnum to the next splitFastq?

I tried ch_A.splitFastq(by:{ tuple -> tuple[1]}) but I got error

0

There are 0 best solutions below