Mercurial > repos > greg > ideas
comparison create_heatmap.R @ 122:7229e52fa8e1 draft
Uploaded
author | greg |
---|---|
date | Fri, 17 Nov 2017 14:04:23 -0500 |
parents | 755d4a3754d2 |
children | 7d49fc24e06a |
comparison
equal
deleted
inserted
replaced
121:755d4a3754d2 | 122:7229e52fa8e1 |
---|---|
109 palette(defpalette); | 109 palette(defpalette); |
110 dev.off(); | 110 dev.off(); |
111 } | 111 } |
112 | 112 |
113 # Read the inputs. | 113 # Read the inputs. |
114 para_files <- list.files(path=input_dir, pattern="*.para", full.names=TRUE); | 114 para_files <- list.files(path=opt$input_dir, pattern="\\.para$", full.names=TRUE); |
115 for (i in 1:length(para_files) { | 115 for (i in 1:length(para_files)) { |
116 para_file <- para_files[i]; | 116 para_file <- para_files[i]; |
117 para_file_base_name <- strsplit(para_file, ".para", fixed=TRUE)[1]; | 117 para_file_base_name <- strsplit(para_file, split="/")[[1]][2] |
118 output_file_name <- paste(opt$output_dir, "/", para_file_base_name, ".pdf", sep=""); | 118 output_file_name <- gsub(".para", ".pdf", para_file_base_name) |
119 output_file_path <- paste(opt$output_dir, "/", output_file_name, sep=""); | |
119 data_frame <- read.table(para_file, comment="!", header=T); | 120 data_frame <- read.table(para_file, comment="!", header=T); |
120 create_heatmap(data_frame, output_file_name); | 121 create_heatmap(data_frame, output_file_path); |
121 } | 122 } |