How do you show/export color scale of a heatmap generated by plotMRheatmap of metagenomeSeq?
2
0
Entering edit mode
chawonhe • 0
@chawonhe-13340
Last seen 7.5 years ago

Hello!

I have used metagenomeSeq to normalize the read counts and was able to generate a heatmap. However, I cannot find a way to also show and export the color scale of the heatmap. The codes that I used for making a heatmap is just the same as in the manual document of metagenomeSeq:

trials = pData(mydata)$Farm
heatmapColColors = brewer.pal(12, "Set3")[as.integer(factor(trials))]

heatmapCols = colorRampPalette(brewer.pal(9, "RdBu"))(50) 

plotMRheatmap(obj =mydata, n = 200, cexRow = 0.4, cexCol = 0.4, trace = "none", col = heatmapCols, ColSideColors = heatmapColColors) 

Thank you in advance!

 

metagenomeseq plotmrheatmap color key • 1.5k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 3 days ago
United States

The plotMRheatmap function just uses heatmap.2 from the gplots package. The default is to include a color scale, so you should get one by default. For example, if I run the example code I get a heatmap with a key.

 

ADD COMMENT
0
Entering edit mode
chawonhe • 0
@chawonhe-13340
Last seen 7.5 years ago

Oh, I see that the color scale shows up when I do it in R. I've been working on R studio until now.

ADD COMMENT

Login before adding your answer.

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