From 6f6aa9d52632c32fae0f46d47859fed0918a77c9 Mon Sep 17 00:00:00 2001
From: Venkat Malladi <venkat.malladi@utsouthwestern.edu>
Date: Wed, 26 Dec 2018 19:33:15 -0600
Subject: [PATCH] Update script name, R version and end result.

---
 workflow/conf/biohpc.config   | 2 +-
 workflow/main.nf              | 3 +--
 workflow/scripts/diff_peaks.R | 6 +-----
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/workflow/conf/biohpc.config b/workflow/conf/biohpc.config
index 6c9806f..73bffa1 100644
--- a/workflow/conf/biohpc.config
+++ b/workflow/conf/biohpc.config
@@ -53,7 +53,7 @@ process {
     executor = 'local'
   }
   withName: diffPeaks {
-    module = ['R/3.4.1-gccmkl']
+    module = ['R/3.3.2-gccmkl']
     cpus = 32
   }
   withName: motifSearch {
diff --git a/workflow/main.nf b/workflow/main.nf
index 2dbf708..b869164 100644
--- a/workflow/main.nf
+++ b/workflow/main.nf
@@ -428,7 +428,6 @@ process diffPeaks {
   script:
   if (noUniqueExperiments.size() == 1) {
     """
-    touch design_diffpeak_annotatePeaks.tsv
     touch no_diffbind.bed
     touch no_diffbind.csv
     touch heatmap.pdf
@@ -438,7 +437,7 @@ process diffPeaks {
   }
   else {
     """
-    Rscript $baseDir/scripts/dba.R $designDiffPeaks
+    Rscript $baseDir/scripts/diff_peaks.R $designDiffPeaks
     """
   }
 
diff --git a/workflow/scripts/diff_peaks.R b/workflow/scripts/diff_peaks.R
index 31ccf72..76caa95 100644
--- a/workflow/scripts/diff_peaks.R
+++ b/workflow/scripts/diff_peaks.R
@@ -8,7 +8,7 @@ args <- commandArgs(trailingOnly=TRUE)
 
 # Check input args
 if (length(args) != 1) {
-  stop("Usage: dba.r [ annotate_design.tsv ] ", call.=FALSE)
+  stop("Usage: diff_peaks.R [ annotate_design.tsv ] ", call.=FALSE)
 }
 
 # Build DBA object from design file
@@ -48,7 +48,3 @@ for (i in c(1:length(data$contrasts))) {
  write.table(report,contrast_name,sep="\t",quote=F,row.names=F)
  write.table(report[,c(1:3)],contrast_bed_name,sep="\t",quote=F,row.names=F, col.names=F)
 }
-
-# Write new design file
-newdesign = data.frame(Condition=new_SampleID, Peaks=new_Peaks)
-write.csv(newdesign,"design_diffpeak_annotatePeaks.csv",row.names=F, quote=F, sep='\t')
-- 
GitLab