These are chat archives for nextflow-io/nextflow

3rd
Jun 2018
onuryukselen
@onuryukselen
Jun 03 2018 03:06

I'm trying to create pipeline where single or paired end option is entered as params.mate. When paired reads are defined as (param.mate = "pair"), pipeline works well, since "pe" parameter of splitFastq assigned as true (pe:true). In case of single reads, "pe" assigned false (pe:false) and gives the following error.

Anyone has any idea on how to get around this without creating separate process?
Thanks,
Onur

params.mate = "single" //or single
params.pairs = "/home/fastqfiles/*{1,2}.fastq"
Channel
    .fromFilePairs( params.pairs , size: (params.mate != "pair") ? 1 : 2, flat:true)
    .set { reads }

process mapping {
    input:
    set pair_id, file(read1), file(read2) from reads.splitFastq(by: 10000, pe:(params.mate != "pair") ? false : true, file:true)

}

N E X T F L O W  ~  version 0.29.1
Launching `/home/yukseleo/nextflowruns/dolphin_tophat/run329/nextflow.nf` [naughty_magritte] - revision: 709ce6cbb5
ERROR ~ Unknown argument 'pe' for operator 'Fastq' -- Possible arguments: each, by, into, autoClose, limit, elem, decompress, charset, file, compress, record