From 51f9e8ff47b4d9be20b075dae72b90a8e64119b1 Mon Sep 17 00:00:00 2001 From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu> Date: Tue, 19 Jan 2021 11:42:37 -0600 Subject: [PATCH] Physically move fastqc process up --- workflow/rna-seq.nf | 92 ++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf index fac3f7b..43d3c04 100644 --- a/workflow/rna-seq.nf +++ b/workflow/rna-seq.nf @@ -528,6 +528,52 @@ fastqReadError.into { fastqReadError_failPreExecutionRun_fastq } +/* + *fastqc: run fastqc on untrimmed fastq's +*/ +process fastqc { + tag "${repRID}" + + input: + path (fastq) from fastqs_fastqc + val fastqCountError_fastqc + val fastqReadError_fastqc + + output: + path ("*.fastq.gz", includeInputs:true) into fastqs_trimData + path ("*_fastqc.zip") into fastqc + path ("rawReads.csv") into rawReadsInfer_fl + + when: + fastqCountError_fastqc == 'false' + fastqReadError_fastqc == 'false' + + script: + """ + hostname > ${repRID}.fastqc.log + ulimit -a >> ${repRID}.fastqc.log + + # run fastqc + echo -e "LOG: running fastq on raw fastqs" >> ${repRID}.fastqc.log + fastqc *.fastq.gz -o . + + # count raw reads + zcat *.R1.fastq.gz | echo \$((`wc -l`/4)) > rawReads.csv + """ +} + +// Extract number of raw reads metadata into channel +rawReadsInfer = Channel.create() +rawReadsInfer_fl.splitCsv(sep: ",", header: false).separate( + rawReadsInfer +) + +// Replicate inferred raw reads for multiple process inputs +rawReadsInfer.into { + rawReadsInfer_aggrQC + rawReadsInfer_uploadQC +} + /* * trimData: trims any adapter or non-host sequences from the data */ @@ -1648,52 +1694,6 @@ assignedReadsInfer.into { assignedReadsInfer_uploadQC } -/* - *fastqc: run fastqc on untrimmed fastq's -*/ -process fastqc { - tag "${repRID}" - - input: - path (fastq) from fastqs_fastqc - val fastqCountError_fastqc - val fastqReadError_fastqc - - output: - path ("*.fastq.gz", includeInputs:true) into fastqs_trimData - path ("*_fastqc.zip") into fastqc - path ("rawReads.csv") into rawReadsInfer_fl - - when: - fastqCountError_fastqc == 'false' - fastqReadError_fastqc == 'false' - - script: - """ - hostname > ${repRID}.fastqc.log - ulimit -a >> ${repRID}.fastqc.log - - # run fastqc - echo -e "LOG: running fastq on raw fastqs" >> ${repRID}.fastqc.log - fastqc *.fastq.gz -o . - - # count raw reads - zcat *.R1.fastq.gz | echo \$((`wc -l`/4)) > rawReads.csv - """ -} - -// Extract number of raw reads metadata into channel -rawReadsInfer = Channel.create() -rawReadsInfer_fl.splitCsv(sep: ",", header: false).separate( - rawReadsInfer -) - -// Replicate inferred raw reads for multiple process inputs -rawReadsInfer.into { - rawReadsInfer_aggrQC - rawReadsInfer_uploadQC -} - /* *dataQC: calculate transcript integrity numbers (TIN) and bin as well as calculate innerdistance of PE replicates */ -- GitLab