Mercurial > repos > greg > ideas
comparison create_heatmap.R @ 140:17e8829bbae2 draft
Uploaded
author | greg |
---|---|
date | Tue, 19 Dec 2017 12:29:29 -0500 |
parents | 3180393013cc |
children | a976dd6fcd1b |
comparison
equal
deleted
inserted
replaced
139:84c909b549a9 | 140:17e8829bbae2 |
---|---|
117 # Read the inputs. | 117 # Read the inputs. |
118 para_files <- list.files(path=opt$input_dir, pattern="\\.para$", full.names=TRUE); | 118 para_files <- list.files(path=opt$input_dir, pattern="\\.para$", full.names=TRUE); |
119 for (i in 1:length(para_files)) { | 119 for (i in 1:length(para_files)) { |
120 para_file <- para_files[i]; | 120 para_file <- para_files[i]; |
121 para_file_base_name <- strsplit(para_file, split="/")[[1]][2] | 121 para_file_base_name <- strsplit(para_file, split="/")[[1]][2] |
122 output_file_name <- gsub(".para", ".pdf", para_file_base_name) | 122 output_file_base_name <- gsub(".para", "", para_file_base_name) |
123 output_file_name <- paste(output_file_base_name, "state", i, "pdf", sep=".") | |
123 output_file_path <- paste(opt$output_dir, output_file_name, sep="/"); | 124 output_file_path <- paste(opt$output_dir, output_file_name, sep="/"); |
124 data_frame <- read.table(para_file, comment="!", header=T); | 125 data_frame <- read.table(para_file, comment="!", header=T); |
125 create_heatmap(data_frame, output_file_path); | 126 create_heatmap(data_frame, output_file_path); |
126 } | 127 } |