Mercurial > repos > greg > ideas
diff create_heatmaps.R @ 143:269e7e466b00 draft
Uploaded
author | greg |
---|---|
date | Wed, 20 Dec 2017 13:01:10 -0500 |
parents | a976dd6fcd1b |
children | 08e77c105188 |
line wrap: on
line diff
--- 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)) {