Question: Is it possible to create a Metagenomeseq heatmap with two coloured bars on the top?
0
2.5 years ago by
Key0
Key0 wrote:

Hi,

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)
dev.off()

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.

Thanks!!!

metagenomeseq heatmap • 488 views
modified 2.5 years ago by James W. MacDonald51k • written 2.5 years ago by Key0
Answer: Is it possible to create a Metagenomeseq heatmap with two coloured bars on the t
0
2.5 years ago by
United States
James W. MacDonald51k 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).