From 3b6afce4406917f7b715ff03ef53591e8e443c23 Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Tue, 19 Jan 2021 21:31:06 -0600
Subject: [PATCH] Make dummy fastqc output if fail

---
 workflow/rna-seq.nf | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf
index e9e74d6..f9c9b3a 100644
--- a/workflow/rna-seq.nf
+++ b/workflow/rna-seq.nf
@@ -558,14 +558,15 @@ process fastqc {
 
     # run fastqc
     echo -e "LOG: running fastq on raw fastqs" >> ${repRID}.fastqc.log
-    fastqc *.fastq.gz -o . 2> fastqcErrorOut
-    fastqcErrorOut=\$(echo \${fastqcErrorOut} | grep -o 'Failed to process file')
+    fastqc *.fastq.gz -o . 2> fastqcErrorOut.txt
+    fastqcErrorOut=\$(cat fastqcErrorOut.txt | grep -o 'Failed to process file')
     fastqFileError=false
     fastqFileError_details=""
     if [ "\${fastqcErrorOut}" != "" ]
     then
       fastqFileError=true
       fastqFileError_details="**There is an error with the structure of the fastq**"
+      touch dummy_fastqc.zip
     fi
 
     # count raw reads
-- 
GitLab