# HG changeset patch # User greg # Date 1515178505 18000 # Node ID 9e0b4ceba74ae8e53f4616b180d5365441fcd905 # Parent 08e77c1051888c7ddbd7b88f1eed634a81327c02 Uploaded diff -r 08e77c105188 -r 9e0b4ceba74a create_heatmap.R --- 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