How to instruct `splitCsv` to split by any whitespaces

80 views Asked by At
workflow parse_sample {
    take:
    samplesheet // file: /path/to/samplesheet.csv

    main:
    Channel.fromPath( samplesheet )
        .splitCsv ( header:true, sep:'\t' ) 
        .map { create_fastq_channel(it) }   //       [test1, [stlfr1, stlfr2, pf1, pf2]]
        //.view()
        .set { reads }                      
    emit: reads   
}

above is my current script. how to split by not only tab, but also any kinds of whitespaces (like tabs and/or one or multiple spaces etc)

1

There are 1 answers

0
Calli On BEST ANSWER
main:
    toCsv(samplesheet)
        .splitCsv ( header:true, sep:'\t' ) 
        .map { create_fastq_channel(it) }  
        //.view()
        .set { reads }                      
    emit: reads