Question: How to split a heatmap at specific row?
0
gravatar for S20
11 weeks ago by
S200
S200 wrote:

I am trying to build a heatmap in R. I wanted to split the heatmap at specific rows. For example my matrix is as:

ID A B C

FD_1 0.3 0.2 1

FD_2 0.4 1 0.9

FD_3 0.6 0.8 0.2

FS_1 0.3 0.2 1

FS_2 0.4 1 0.9

FS_3 0.6 0.8 0.2

FS_4 0.4 1 0.9

FS_5 0.6 0.8 0.2

FE_1 0.3 0.2 1

FE_2 0.4 1 0.9

FE_3 0.6 0.8 0.2

FE_4 0.4 1 0.9

I want to make a heatmap that includes 3 slice: one for 3 FD, one for 5 FS and one for 4 FE. And label each slice with their name as FD, FS and FE.

I'm using this code:

Heatmap(M_matrix, name = "level", row_split = M_matrix$ID)

But it is not working!

Any suggestion? Thanks

heatmap split R • 239 views
ADD COMMENTlink modified 11 weeks ago by geek_y11k • written 11 weeks ago by S200
1
gravatar for geek_y
11 weeks ago by
geek_y11k
Barcelona
geek_y11k wrote:

ComplexHeatmap should help you. Otherwise subset your data frame into three DFs and make threes separate heatmaps and use grid functionality of r.

ADD COMMENTlink written 11 weeks ago by geek_y11k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1052 users visited in the last hour