From eb4b1b5afd202ce7e4079ff1823131b2ffe494b2 Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Mon, 28 Dec 2020 14:24:01 -0600
Subject: [PATCH] Fix exists in upload processed file process

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

diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf
index 1f0a4b2..85a504f 100644
--- a/workflow/rna-seq.nf
+++ b/workflow/rna-seq.nf
@@ -1135,7 +1135,7 @@ process dataQC {
   output:
     path "${repRID}_tin.hist.tsv" into tinHist
     path "${repRID}_tin.med.csv" into  tinMedInfer_fl
-    path "${repRID}.insertSize.inner_distance_freq.txt" into innerDistance
+    path "${repRID}_insertSize.inner_distance_freq.txt" into innerDistance
 
   script:
     """
@@ -1531,7 +1531,7 @@ process uploadProcessedFile {
   exist=\$(curl -s https://${source}/ermrest/catalog/2/entity/RNASeq:Processed_File/Replicate=${repRID})
   if [ "\${exist}" != "[]" ]
   then
-    rids=\$(echo $exist | grep -o '\\"RID\\":\\".\\{7\\}' | sed 's/^.\\{7\\}//')
+    rids=\$(echo \${exist} | grep -o '\\"RID\\":\\".\\{7\\}' | sed 's/^.\\{7\\}//')
     for rid in \${rids}
     do
       python3 deleteEntry.py -r \${rid} -t Processed_File -o ${source} -c \${cookie}
-- 
GitLab