plotMRheatmap: Basic heatmap plot function for normalized counts.

View source: R/plotMRheatmap.R

plotMRheatmapR Documentation

Basic heatmap plot function for normalized counts.

Description

This function plots a heatmap of the 'n' features with greatest variance across rows (or other statistic).

Usage

plotMRheatmap(obj, n, norm = TRUE, log = TRUE, fun = sd, ...)

Arguments

obj

A MRexperiment object with count data.

n

The number of features to plot. This chooses the 'n' features of greatest positive statistic.

norm

Whether or not to normalize the counts - if MRexperiment object.

log

Whether or not to log2 transform the counts - if MRexperiment object.

fun

Function to select top 'n' features.

...

Additional plot arguments.

Value

plotted matrix

See Also

cumNormMat

Examples


data(mouseData)
trials = pData(mouseData)$diet
heatmapColColors=brewer.pal(12,"Set3")[as.integer(factor(trials))];
heatmapCols = colorRampPalette(brewer.pal(9, "RdBu"))(50)
#### version using sd
plotMRheatmap(obj=mouseData,n=200,cexRow = 0.4,cexCol = 0.4,trace="none",
             col = heatmapCols,ColSideColors = heatmapColColors)
#### version using MAD
plotMRheatmap(obj=mouseData,n=50,fun=mad,cexRow = 0.4,cexCol = 0.4,trace="none",
             col = heatmapCols,ColSideColors = heatmapColColors) 


HCBravoLab/metagenomeSeq documentation built on March 17, 2024, 3:21 p.m.