Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Merge pull request #11 from HendrikSchultheis/master
Browse files Browse the repository at this point in the history
Fix: Heatmap static
  • Loading branch information
HendrikSchultheis authored Apr 17, 2018
2 parents 7473410 + 8433e8a commit 9f20a94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/function.R
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,10 @@ create_heatmap <- function(data, unitlabel='auto', row.label=T, row.custom.label
#
if(!is.null(winsorize.colors)) {
breaks <- seq(winsorize.colors[1], winsorize.colors[2], length = length(colors))
colors <- circlize::colorRamp2(breaks, colors)
} else {
breaks <- seq(min(apply(data[, -1], 2, function(x) {min(x, na.rm = TRUE)})), max(apply(data[, -1], 2, function(x) {max(x, na.rm = TRUE)})), length = length(colors))
}
colors <- circlize::colorRamp2(breaks, colors)

#convert data to data.frame so rownames can be used for annotation
prep.data <- as.data.frame(data[, -1])
Expand Down

0 comments on commit 9f20a94

Please sign in to comment.