I want to read a column from a text file which contains the paths to all of my FASTQ files. I then want to run each of these files through the various processes in my pipeline. I think I've successfully created the channel, but I am getting an error when I try and run the check process:
Script:
#!/usr/bin/env nextflow
designFile = file("design.tsv")
fastqChannel = Channel
.from(designFile)
.splitCsv(header: true)
.subscribe { row ->
println "${row.fastq}"
}
process check {
input:
file reads_fastq from fastqChannel
output:
file fastqc_html
shell:
"""
fastqc ${reads_fastq}
"""
}
Output:
$ ./main.nf check
N E X T F L O W ~ version 0.19.1
Launching ./main.nf
A.fastq
B.fastq
C.fastq
[warm up] executor > local
ERROR ~ Channel `reads_fastq` has been used twice as an input by process `check` and another operator
-- Check script 'main.nf' at line: 11 or see '.nextflow.log' file for more details Any help greatly appreciated,
James