It is so strange that the Heatmap function doesn't give me the desired input row order when using the rowAnnotation.
What I want is that it directly plots the matrix, because I already sorted the matrix according to the frequency.
But, what I get now.
It feels like the rowAnnotation function doesn't work at all no matter how to set it. If it works, the row annotation should be ordered by the frequency row annotation labels. I can send you my raw data and code to your email if necessary.
Hi Zuguang,
It is so strange that the Heatmap function doesn't give me the desired input row order when using the rowAnnotation.
What I want is that it directly plots the matrix, because I already sorted the matrix according to the frequency.
But, what I get now.
It feels like the rowAnnotation function doesn't work at all no matter how to set it. If it works, the row annotation should be ordered by the frequency row annotation labels. I can send you my raw data and code to your email if necessary.
rownames_list <- rownames(d) rownames_list_split <- strsplit(rownames_list, ";") Phylum_names <- sapply(rownames_list_split, function(x) x[1]) rownames(d) <- Phylum_names
group1 = rep(c("Bacteroidota", "Proteobacteria", "Desulfobacterota", "Cyanobacteria", "Chloroflexota", "Acidobacteriota", .....), c(67,47,32,25,24,18,14,10,10,9,8,7,7,5,4,3,3,3,3,3,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1)) col_list = list(F = c("Bacteroidota"="#03045e", "Omnitrophota"="#0077b6", ......)) ha2 = rowAnnotation(F = Phylum_names, simple_anno_size = unit(0.3, "cm"), col=col_list, show_annotation_name = FALSE)
The row annotation function works on my other matrixes, but just not on this one. So strange.
Best,
Bing