Question: Is it possible to create a Metagenomeseq heatmap with two coloured bars on the top?
gravatar for Key
2.1 years ago by
Key0 wrote:



I am using the following to create a heatmap with metagenomeseq;

tax.table= import_biom("table.from_txt_json.biom")
Mapfile= import_qiime_sample_data("total_map.txt")
qiimefiles=merge_phyloseq(tax.table, Tree, Mapfile)

physeq_meta <- phyloseq_to_metagenomeSeq(qiimefiles)

trials = pData(physeq_meta)$Timepoint
heatmapColColors = brewer.pal(12, "Set3")[as.integer(factor(trials))]
heatmapCols = colorRampPalette(brewer.pal(9, "RdBu"))(50)

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

These generates a heatmap with a coloured bar under the dendogram at the top grouping my samples by timepoint. I also want to group my samples by illness and can do this in another heatmap by changing timepoint to illness but my question is; is it possible to have the two different groupings as bars on the one heatmap using metagenomeseq?

I am very new to R so I am unsure if this is possible. All help appreciated.


metagenomeseq heatmap • 426 views
ADD COMMENTlink modified 2.1 years ago by James W. MacDonald49k • written 2.1 years ago by Key0
Answer: Is it possible to create a Metagenomeseq heatmap with two coloured bars on the t
gravatar for James W. MacDonald
2.1 years ago by
United States
James W. MacDonald49k wrote:

No. This function calls heatmap.2 from the gplots package. While that function was pretty sweet back in the day, it's been superceded by packages like ComplexHeatmap (with which you can do what you want, albeit requiring you to learn how to do so).

ADD COMMENTlink written 2.1 years ago by James W. MacDonald49k
Please log in to add an answer.


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