Get the "average" of a column in a heatmap, combine 3 heatmaps into 1?
1
0
Entering edit mode
15 months ago
sarahgzb ▴ 40

Hey guys,

So I have 3 gene signatures that I wanna look into on my own RNASeq data. I've created hierarchical clustering heatmaps for these gene signatures, and I want to get the "average" expression of a sample/column, so I can combine these values into a new figure like the one below. Is there some sort of numerical value I can get from the pheatmap function for each column in a heatmap, so I can put it into a a new heatmap like the picture?

enter image description here

heatmap RNA-seq • 876 views
ADD COMMENT
0
Entering edit mode

Why do you need to average your data after generating the heatmap rather than transforming your input matrix?

ADD REPLY
1
Entering edit mode
15 months ago
zau saa ▴ 150

You can use pheatmapobj$gtable$grobs[[4]]$label to get the order of the column in pheatmap object and then compute the average of each column in order.

ADD COMMENT

Login before adding your answer.

Traffic: 1805 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6