Question: How do you show/export color scale of a heatmap generated by plotMRheatmap of metagenomeSeq?
0
24 months ago by
chawonhe0
chawonhe0 wrote:

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)

modified 24 months ago • written 24 months ago by chawonhe0
Answer: How do you show/export color scale of a heatmap generated by plotMRheatmap of me
0
24 months ago by
United States
James W. MacDonald50k wrote:

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.

Answer: How do you show/export color scale of a heatmap generated by plotMRheatmap of me
0
24 months ago by
chawonhe0
chawonhe0 wrote:

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