I begin to use ComplexHeatmap to plot the dymamic change of values across different development stages in R.
I started from two dataframe, for example
df_1
anddf_2
, I merged them intodf_3
(df_3 <- rbind(df_1, df_2)
. I have plot Heatmap ondf_3
, but I want the heatmap to be able to split by data fromdf_1
anddf_2
.So My first question is: Is it possible to cluster the heatmap myself?
from the plot of
df_3
, I saw the dynamic change of values, some are increased as:stage1<stage2<stage3<stage4
; some are static:stage1=stage2=stage3=stage4
, some are are increase first but drop at later stage: iestage1<stage2>stage3>stage4
and so on.My second question is: Is there any way to extract the information (row# in
df_3
) of these subcluster, so I can know which genes belong to which category?
Many thanks,
ComplexHeatmap gives you options to split rows and cluster within each split. Please read the manual section
heatmap-split
It also allows you to get row order. Read section
Set row and column orders
.Please always read the manual well before asking for help. There is no need for the
software-error
tag, there is no error here.