From 1478420854e463bf8cf8e945026cc58f4f82a36e Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Fri, 6 Mar 2020 17:27:43 -0600
Subject: [PATCH] Add back process

---
 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 16aca0e..e252ec3 100755
--- a/workflow/rna-seq.nf
+++ b/workflow/rna-seq.nf
@@ -336,7 +336,7 @@ process alignData {
  *dedupData: mark the duplicate reads, specifically focused on PCR or optical duplicates
 */
 process dedupData {
-  tag "${repRID}"git reset --soft HEAD^
+  tag "${repRID}"
   publishDir "${outDir}/bam", mode: 'copy', pattern: "*.deduped.bam"
   publishDir "${logsDir}", mode: 'copy', pattern: "*.dedup.{out,err}"
 
@@ -404,3 +404,25 @@ process makeBigWig {
     """
 }
 
+/*
+ *Run featureCounts and get the counts, tpm, and fpkm
+*/
+process makeFeatureCounts {
+  tag "${repRID}"
+  publishDir "${outDir}/featureCounts", mode: 'copy', pattern: "${repRID}*.featureCounts*"
+  publishDir "${logsDir}", mode: 'copy', pattern: "${repRID}.makeFetureCounts.{out,err}"
+
+  input:
+    path script_calculateTPM
+    tuple val (repRID1), path (bam), path (bai) from featureCountsIn
+    tuple val (repRID2), path (genome), path (gtf) from featureCountsRef
+
+  output:
+    tuple val ("${repRID}"), path ("${repRID}.featureCounts.summary"), path ("${repRID}.featureCounts"), path ("${bam}.featureCounts.sam") into featureCountsOut
+
+  script:
+    """
+    featureCounts -R SAM -p -G ${genome} -T `nproc` -a ${gtf} -o ${repRID}.featureCounts ${repRID}.sorted.deduped.bam
+    Rscript calculateTPM.R --count "${repRID}.featureCounts"
+    """
+}
-- 
GitLab