clusterExperiment icon indicating copy to clipboard operation
clusterExperiment copied to clipboard

plotHeatmap: support ordered factors in sampleData in the legend?

Open allonw opened this issue 9 years ago • 2 comments

  1. Can plotHeatmap take account of the order of ordered factors when plotting them in the legend?
  2. When one of the sampleData metadata has spaces, plotHeatmap breaks with an error that doesn't report what's wrong
library(clusterExperiment)

aaa = matrix(runif(100), nrow = 10)
anno = factor(sample.int(3, size = 10, replace = TRUE), ordered = TRUE)
levels(anno) = c("low activity", "medium activity", "high activity")

#Error in cut.default(a, breaks = 100) : 'x' must be numeric
plotHeatmap(data = aaa, sampleData = as.data.frame(anno))

#works, but ignores the order of the factor
plotHeatmap(data = aaa, sampleData = as.data.frame(make.names(anno)))

allonw avatar Jun 20 '16 00:06 allonw

I missed the error part of this. So I opened the error as a separate issue and adjusted the title.

epurdom avatar Nov 30 '16 07:11 epurdom

Because problem with ordered factors in aheatmap (#184) have not added this yet as enhancement.

epurdom avatar Jun 03 '17 22:06 epurdom