I have a question about channel.fromFilePairs() . I have the following nextflow script:
params.reads = "/path/to/my_reads/sample03_L001_R{1,2}_001.fastq.gz"
my_reads_ch = channel.fromFilePairs(params.reads)
println "reads: $my_reads_ch"
The script prints [sample03_L001_R, [/path/to/my_reads/sample03_L001_R1_001.fastq.gz, /path/to/my_reads/sample03_L001_R2_001.fastq.gz]]. The desired output is [sample03,[/path/to/my_reads/sample03_L001_R1_001.fastq.gz, /path/to/my_reads/sample03_L001_R2_001.fastq.gz]].
How do I remove the “_L001_R”?
I’ve tried
channel.fromFilePairs(params.reads).map{it[0] – /_w+/, it[1]}
That gives me an ERROR: Unknown method invocation ‘negative’ on Pattern type.
Any suggestions? Many thanks
Samuel Morrison is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.