Question: Including taxa names in heatmap in metagenomeseq
0
17 months ago by
arguello.rguez0 wrote:

Hi,

I am preparing a heatmap in metagenomeseq. When asking to prepare the heatmap only including the significant OTUs, I get the plot with the OTU number.

How can I change this OTU number to its genus for instance?

Thanks in advance (seel below the code)

heatmapColColors = c("grey","green")[as.integer(factor(pd_Donor$Donor))] heatmapCols = colorRampPalette(c("white","light blue","blue","dark blue"))(50) significant_OTU <- which(MRfulltable(Donor_A, number=length(Donor_A$taxa))$adjPvalues<=0.05) plotMRheatmap(obj = metHMEX6_A[significant_OTU,] , n=length(significant_OTU), margins=c(4,14),cexRow = 0.7, cexCol = 1, trace = "none", col = heatmapCols, ColSideColors = heatmapColColors, lhei = c(2, 8)) ADD COMMENTlink modified 17 months ago by Joseph Nathaniel Paulson270 • written 17 months ago by arguello.rguez0 Answer: Including taxa names in heatmap in metagenomeseq 1 17 months ago by United States Joseph Nathaniel Paulson270 wrote: Easiest way would probably be to extract the normalized matrix and then put that into plotMRheatmap heatmapColColors = c("grey","green")[as.integer(factor(pd_Donor$Donor))] heatmapCols = colorRampPalette(c("white","light blue","blue","dark blue"))(50) significant_OTU <- which(MRfulltable(Donor_A, number=length(Donor_A$taxa))$adjPvalues<=0.05) nmat = MRcounts(metHMEX6_A[significant_OTU,],norm=TRUE,log=TRUE) ROWNAMES(NMAT) = FDATA(METHMEX6_A[SIGNIFICANT_OTU,])$GENUS # OR WHATEVER THE GENUS COLUMN NAME IS plotMRheatmap(obj = nmat , n=length(significant_OTU), margins=c(4,14),cexRow = 0.7, cexCol = 1, trace = "none", col = heatmapCols, ColSideColors = heatmapColColors, lhei = c(2, 8)) On 2018-01-23 09:28, arguello.rguez [bioc] wrote: > Activity on a post you are following on support.bioconductor.org [1] > > User arguello.rguez [2] wrote Question: Including taxa names in heatmap in metagenomeseq [3]: > > Hi, > > I am preparing a heatmap in metagenomeseq. When asking to prepare the heatmap only including the significant OTUs, I get the plot with the OTU number. > > How can I change this OTU number to its genus for instance? > > Thanks in advance (seel below the code) > > heatmapColColors = c("grey","green")[as.integer(factor(pd_Donor$Donor))] > heatmapCols = colorRampPalette(c("white","light blue","blue","dark blue"))(50) > significant_OTU <- which(MRfulltable(Donor_A, number=length(Donor_A$taxa))$adjPvalues<=0.05) > plotMRheatmap(obj = metHMEX6_A[significant_OTU,] , n=length(significant_OTU), margins=c(4,14),cexRow = 0.7, cexCol = 1, trace = "none", col = heatmapCols, ColSideColors = heatmapColColors, lhei = c(2, 8)) > ------------------------- > > Post tags: gut microbiome, heatmap, metagenomeseq > > You may reply via email or visit Including taxa names in heatmap in metagenomeseq Links: ------ [1] https://support.bioconductor.org [2] arguello.rguez [3] Including taxa names in heatmap in metagenomeseq