From bb191595f9f70596b8b86f13ed1aff38beae8e3d Mon Sep 17 00:00:00 2001
From: Beibei Chen <beibei.chen@utsouthwestern.edu>
Date: Mon, 28 Nov 2016 16:22:38 -0600
Subject: [PATCH] runDiffBind R code works

---
 workflow/main.nf               | 7 +++----
 workflow/scripts/runDiffBind.R | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/workflow/main.nf b/workflow/main.nf
index 6588352..b12867b 100644
--- a/workflow/main.nf
+++ b/workflow/main.nf
@@ -100,10 +100,9 @@ process diffbind {
    file "*"
    """
    module load R/3.2.1-intel
-   cp design.txt design.shiny.txt
-   cp geneset.gmt geneset.shiny.gmt
-   Rscript  $baseDir/scripts/dea.R
-   perl $baseDir/scripts/concat_edgeR.pl *.edgeR.txt
+   #cp design.txt design.shiny.txt
+   #cp geneset.gmt geneset.shiny.gmt
+   Rscript  $baseDir/scripts/runDiffBind.R
  """
 }
 
diff --git a/workflow/scripts/runDiffBind.R b/workflow/scripts/runDiffBind.R
index e95d454..2eb624b 100644
--- a/workflow/scripts/runDiffBind.R
+++ b/workflow/scripts/runDiffBind.R
@@ -16,7 +16,7 @@ dba.plotPCA(data, DBA_TISSUE, label=DBA_CONDITION)
 dev.off()
 
 #Save peak reads count
-normcount <- dba.peakset(dta, bRetrieve=T)
+normcount <- dba.peakset(data, bRetrieve=T)
 write.table(as.data.frame(normcount),"diffbind.normcount.txt",sep="\t",quote=F,row.names=F)
 
 #Retriving the differentially bound sites
-- 
GitLab