Question: Is it possible to create a Metagenomeseq heatmap with two coloured bars on the top?
0
gravatar for Key
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")
Tree=read_tree("otu.tre")
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
ADD COMMENTlink 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
gravatar for James W. MacDonald
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).

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

Help
Access

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