Hi Everyone!!
I a new to nextflow and was trying to make a FASTQC workflow script. The script run fine on a Pair of FASTQ files, however, it doesn't loop over all the FASTQ files. What could be possibly wrong.
## I ran using the following command
nextflow run 01_fastqc.nf --raw 'data/*R{1,2}_001.fastq.gz'
01_fastqc.nf
contains
nextflow.enable.dsl=2
params.raw = "data/*{1,2}.fastq.gz"
params.outdir="results/01_rawfastqc"
process FASTQC {
publishDir "$params.outdir"
input:
tuple val(sample_id), path(reads)
output:
tuple val(sample_id), path("fastqc_out")
script:
"""
mkdir fastqc_out
fastqc -t 10 -o fastqc_out ${reads[0]} ${reads[1]}
multiqc -f fastqc_out -o fastqc_out/
"""
}
reads_ch = Channel.fromFilePairs(params.raw, checkIfExists: true )
workflow {
FASTQC(reads_ch)
}
I made some amends. I am still skeptical as to what changed but the following code works now. I think
fastqc
directory was getting overwrite again and again.Ah, yes overwriting issue, good catch!