changeset 146:9e0b4ceba74a draft

Uploaded
author greg
date Fri, 05 Jan 2018 13:55:05 -0500
parents 08e77c105188
children 387b460ddd43
files create_heatmap.R
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/create_heatmap.R	Thu Jan 04 14:45:28 2018 -0500
+++ b/create_heatmap.R	Fri Jan 05 13:55:05 2018 -0500
@@ -74,9 +74,9 @@
         if(regexpr("ctcf", tolower(histone_marks[i])) > 0) {
             histone_mark_color[i,] = c(200, 0, 250);
         }
-        state_color = get_state_color(data_matrix, histone_mark_color)[,2];
+        state_color = get_state_color(data_matrix, histone_mark_color)[,];
     }
-    rect(rep(p+0.2, num_rows), 1:num_rows-0.8, rep(p+0.8, num_rows), 1:num_rows-0.2, col=state_color);
+    rect(rep(p+0.2, num_rows), 1:num_rows-0.8, rep(p+0.8, num_rows), 1:num_rows-0.2, col=state_color[,2]);
     palette(defpalette);
     if (!is.null(output_file_name)) {
         dev.off();
@@ -106,4 +106,4 @@
     h = apply(h, 1, function(x){hsv(x[1], x[2], x[3])});
     rt = cbind(rt, h);
     return(rt);
-}
+}
\ No newline at end of file