Hello, Stars.
I would like to annotate text in my heatmap, but not easy with my trials...
First my data frame is like this: which is saved as inte33.csv
This is the R code I used for generation of heatmap:
gene_expression_df = read.csv("inte33.csv")
gene_matrix <- as.matrix(gene_expression_df[, c("F7", "F7R")])
color_fun <- colorRamp2(c(-4, 0, 4), c("red", "black", "green"))
Heatmap(gene_matrix,
col = color_fun,
show_row_names = F,
show_column_names = T,
show_row_dend = F,
show_column_dend = F,
row_names_side = "left",
width = unit(4, "cm"))
After this code, what I get is:
And what I want to do in this heatmap is that I would like to add some text. example is like this:
So, I would like to add text from 1: 10 rows, 11: 30, to 30: 60 and so on....
Please, help me.
Thank you.
I think using
ComplexHeatmap
with annotations could accomplish this well.It looks like they're already using ComplexHeatmap. They'd probably benefit from this section of the manual though: https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-annotations.html#zoom-annotation