# HG changeset patch # User greg # Date 1513792870 18000 # Node ID 269e7e466b0082035f0d88570ed82aa448ddcce2 # Parent 8cfcf32c42820346a7c2114c6c6bfd9bc45a61d5 Uploaded diff -r 8cfcf32c4282 -r 269e7e466b00 create_heatmaps.R --- a/create_heatmaps.R Wed Dec 20 13:01:02 2017 -0500 +++ b/create_heatmaps.R Wed Dec 20 13:01:10 2017 -0500 @@ -3,15 +3,17 @@ suppressPackageStartupMessages(library("optparse")) option_list <- list( - make_option(c("-i", "--input_dir"), action="store", dest="input_dir", help="IDEAS para files directory"), - make_option(c("-o", "--output_dir"), action="store", dest="output_dir", help="PDF output directory") + make_option(c("--input_dir"), action="store", dest="input_dir", help="IDEAS para files directory"), + make_option(c("--output_dir"), action="store", dest="output_dir", help="PDF output directory"), + make_option(c("--script_dir"), action="store", dest="script_dir", help="R script source directory") ) parser <- OptionParser(usage="%prog [options] file", option_list=option_list); args <- parse_args(parser, positional_arguments=TRUE); opt <- args$options; -source("create_heatmap.R"); +heatmap_path <- paste(opt$script_dir, "create_heatmap.R", sep="/"); +source(heatmap_path); para_files <- list.files(path=opt$input_dir, pattern="\\.para$", full.names=TRUE); for (i in 1:length(para_files)) {