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.