]> git.donarmstrong.com Git - rsem.git/commitdiff
Added check in rsem-plot-model for .stat output directory
authorColin Dewey <cdewey@biostat.wisc.edu>
Thu, 12 May 2011 16:24:19 +0000 (11:24 -0500)
committerColin Dewey <cdewey@biostat.wisc.edu>
Thu, 12 May 2011 16:24:19 +0000 (11:24 -0500)
rsem-plot-model

index c15a75f230c018da6ffc0cde6171f6d1f6fa0686..7ca89ec007e2889433ca4cb8111d5696344f47cc 100755 (executable)
@@ -2,15 +2,21 @@
 
 argv <- commandArgs(TRUE)
 if (length(argv) != 2) {
-  cat("Usage: rsem-plot-model sample_name outF\n")
+  cat("Usage: rsem-plot-model sample_name output_plot_file\n")
   q(status = 1)
 }
 
 strvec <- strsplit(argv[1], split = "/")[[1]]
 token <- strvec[length(strvec)]
 
-modelF <- paste(argv[1], ".stat/", token, ".model", sep = "")
-cntF <- paste(argv[1], ".stat/", token, ".cnt", sep = "")
+stat.dir <- paste(argv[1], ".stat", sep = "")
+if (!file.exists(stat.dir)) {
+  cat("Error: directory does not exist: ", stat.dir, "\n", sep = "")
+  cat(strwrap("This version of rsem-plot-model only works with the output of RSEM versions >= 1.1.8"), sep="\n")
+  q(status = 1)
+}
+modelF <- paste(stat.dir, "/", token, ".model", sep = "")
+cntF <- paste(stat.dir, "/", token, ".cnt", sep = "")
 
 pdf(argv[2])