Is it possible to create a Metagenomeseq heatmap with two coloured bars on the top?
1
0
Entering edit mode
Key • 0
@key-12577
Last seen 7.7 years ago

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 • 1.4k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States

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 COMMENT

Login before adding your answer.

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