Closed endrebak closed 5 years ago
Have you checked whether the order of matrix rows and your annotations have the same order?
try:
head(rownames(m))
head(row_annotation)
Are the two outputs the same?
That was my error. I thought ComplexHeatmap used the names of the annotation vector to find the correct mapping. This is because I cluster and therefore reorder the rows. But it seems like as long as the annotation vector is the same order as the input matrix everything works - which is very convenient!
My mistake and thanks again for this great library.
Hi and thanks for this great package.
I have a question about the order of my row_annotation.
I want to map from sample names to groups. For example
fetal_placenta
belongs to the groupOther
, but in the graph below it has the color of Neurosph.When I print the vector I use for row annotations, it looks like this:
so my mapping vector is correct.
This is how I create my mapping vector and plot the heatmap:
Do you have any idea what I might be doing wrong? Thanks :)