color annotations using HeatmapAnnotations() output doesn't match input #764
Unanswered
sbouchard3
asked this question in
Q&A
Replies: 1 comment
-
I believe, your color list should have the same names as the columns of the data frame.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to have to different types of annotations on top of my heatmap with top_annotation = 'ha'
I am unable to obtain the colors in my input. When I run 'ha', I obtain other colors and I am unable to change them!
Here is my code:
statut1 <- as.character(m_t[grep("Statut.tumoral", rownames(m_t)),])
risque1 <- as.character(m_t[grep("Risque.et.Invasion", rownames(m_t)),])
anno_df <- data.frame(statut1, risque1)
ha <- HeatmapAnnotation(df = anno_df, col = list(anno_df = c("Cancer - Bas grade" = "red", 'Cancer - Haut grade' = "darkred", 'Normal - Sans Historique' = "darkgreen", 'Normal - En rémission' = "yellow", 'Faible:Non-invasif' = "red", 'Élevé:Non-invasif' = "yellow", 'Élevé:Invasif' = "blue")),na_col = 'black')
Help would be reallly appreciated :)
Thank you very much !
Beta Was this translation helpful? Give feedback.
All reactions