diff region_motif_compare.r @ 31:0e031bf8c5b1 draft

Uploaded
author jeremyjliu
date Wed, 04 Feb 2015 13:52:22 -0500
parents 4439b2ed86e9
children 9525574f700f
line wrap: on
line diff
--- a/region_motif_compare.r	Mon Jan 05 22:28:37 2015 -0500
+++ b/region_motif_compare.r	Wed Feb 04 13:52:22 2015 -0500
@@ -4,7 +4,7 @@
 # corrections. All enrichment ratios relative to overall count / gc ratios.
 # Author: Jeremy liu
 # Email: jeremy.liu@yale.edu
-# Date: 14/07/03
+# Date: 15/02/04
 # Note: This script is meant to be invoked with the following command
 # R --slave --vanilla -f ./region_motif_compare.r --args <workingdir> <db> <intab1> <intab2> 
 #   <enriched_tab> <depleted_tab> <plots_png>
@@ -24,20 +24,19 @@
 # Set common and data directories
 args <- commandArgs()
 workingDir = args[7]
-dbDir = concat(workingDir, "/region_motif_db")
 dbCode = args[8]
 # dbCode "c" implemented when pwmFile is loaded
 if (dbCode == "t" | dbCode == "p") {
-	pwmFile = concat(dbDir, "/pwms/pouya.pwms.from.seq.RData")
+	pwmFile = concat(workingDir, "/pwms/pouya.pwms.from.seq.RData")
 } else if (dbCode == "j") {
-	pwmFile = concat(dbDir, "/pwms/jaspar.jolma.pwms.from.seq.RData")
+	pwmFile = concat(workingDir, "/pwms/jaspar.jolma.pwms.from.seq.RData")
 } else if (dbCode == "m") {
-	pwmFile = concat(dbDir, "/pwms/mm9.pwms.from.seq.RData")
+	pwmFile = concat(workingDir, "/pwms/mm9.pwms.from.seq.RData")
 } else if (dbCode == "c") { # rest of dbCode "c" implemeted when pwmFile loaded
-	pwmFile = concat(dbDir, "/pwms/pouya.pwms.from.seq.RData")
-	pwmFile2 = concat(dbDir, "/pwms/jaspar.jolma.pwms.from.seq.RData")
+	pwmFile = concat(workingDir, "/pwms/pouya.pwms.from.seq.RData")
+	pwmFile2 = concat(workingDir, "/pwms/jaspar.jolma.pwms.from.seq.RData")
 } else {
-	pwmFile = concat(dbDir, "/pwms/pouya.pwms.from.seq.RData")
+	pwmFile = concat(workingDir, "/pwms/pouya.pwms.from.seq.RData")
 }
 
 # Set input and reference files
@@ -48,7 +47,7 @@
 plotsPng = args[13]
 
 # Load dependencies
-source(concat(workingDir, "/region_motif_lib/plotting.r"))
+source(concat(workingDir, "/plotting.r"))
 
 # Auxiliary function to read in tab file and prepare the data
 read_tsv <- function(file) {