Create a heatmap
2
0
Entering edit mode
4.2 years ago

Hi every one,

I have an expression matrix that contains 20 rows (20 genes) and 435 columns (435 samples), all columns represent seven stages of a disease, I want to create a heatmap between genes and each stage. can I convert multiple columns to one column by averaging? In other words, convert the columns of each stage into one column by averaging.

I would be very pleased if you could guide me.

R • 1.0k views
ADD COMMENT
1
Entering edit mode

You can combine the columns how you like as long that it makes sense. For example, averaging doesn't make much sense if the underlying distribution of the data is multimodal or heavily skewed.

ADD REPLY
0
Entering edit mode

Yes you can do this. But if you have analysed the data using something like limma or edgeR, then your differential expression pipeline might already have computed the treatment means. You might be able to skip your averaging step and use precomputed results.

ADD REPLY
0
Entering edit mode
4.2 years ago
H.Hasani ▴ 990

why don't you annotate them using ComplexHeatmap? if you wanted to average over the stages then I wouldn't use heatmap for it, probably a boxplot with the different categories on one axis and the distribution of gene expression on the second axis.

hth

ADD COMMENT
0
Entering edit mode
4.2 years ago

I am sorry for the delay in replying, Thanks so much for your valuable answers.

ADD COMMENT

Login before adding your answer.

Traffic: 2849 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