From c255d989f191ef4b8cd2dc50ffc5c70c82487e79 Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Sat, 25 Apr 2020 13:34:59 -0500
Subject: [PATCH] Add more columns

---
 workflow/rna-seq.nf | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf
index 615c68e..3c67be3 100644
--- a/workflow/rna-seq.nf
+++ b/workflow/rna-seq.nf
@@ -44,6 +44,28 @@ script_parseMeta = Channel.fromPath("${baseDir}/scripts/parseMeta.py")
 script_calculateTPM = Channel.fromPath("${baseDir}/scripts/calculateTPM.R")
 script_inferMeta = Channel.fromPath("${baseDir}/scripts/inferMeta.sh")
 
+/*
+ * trackStart: track start of pipeline
+ */
+process trackStart {
+  script:
+  """
+  hostname
+  ulimit -a
+  export https_proxy=\${http_proxy}
+  
+  aws dynamodb put-item \
+    --table-name pipeline.tracking \
+    --item '{ \
+      "sessionId": {"S": "${workflow.sessionId}"}, \
+      "pipeline": {"S": "cellranger_count"}, \
+      "start": {"S": "${workflow.start}"}, \
+      "astrocyte": {"BOOL": ${params.astrocyte}}, \
+      "status": {"S": "started"}, \
+      "nextflowVersion": {"S": "${workflow.nextflow.version}"}}'
+  """
+ }
+
 /*
  * splitData: split bdbag files by replicate so fetch can occure in parallel, and rename files to replicate rid
  */
@@ -828,4 +850,4 @@ process dataQC {
       echo "echo \"LOG: running tin.py on \${i}\" >> ${repRID}.rseqc.err; tin.py -i ${repRID}.sorted.deduped.\${i}.bam  -r ./bed/genome.bed 1>>${repRID}.rseqc.log 2>>${repRID}.rseqc.err; cat ${repRID}.sorted.deduped.\${i}.tin.xls | tr -s \"\\w\" \"\\t\" | grep -P \\\"\\\\t\${i}\\\\t\\\";";
     done | parallel -j `nproc` -k 1>> ${repRID}.sorted.deduped.tin.xls 2>>${repRID}.rseqc.err
     """
-}
\ No newline at end of file
+}
-- 
GitLab