| heatmapdmn {DirichletMultinomial} | R Documentation |
Produce a heat map summarizing count data, grouped by Dirichlet component.
heatmapdmn(count, fit1, fitN, ntaxa = 30, ...,
transform = sqrt, lblwidth = 0.2 * nrow(count), col = .gradient)
count |
A matrix of sample x taxon counts, as supplied to
|
fit1 |
An instance of class |
fitN |
An instance of class |
ntaxa |
The |
... |
Additional arguments, ignored. |
transform |
Transformation to apply to count data prior to visualization; this does not influence mixture membership or taxnomic ordering. |
lblwidth |
The proportion of the plot to dedicate to taxanomic labels, as a fraction of the number of samples to be plotted. |
col |
The colors used to display (possibly transformed, by
|
Columns of the heat map correspond to samples. Samples are grouped by Dirichlet component, with average (Dirichlet) components summarized as a separate wide column. Rows correspond to taxonomic groups, ordered based on contribution to Dirichlet components.
Martin Morgan mailto:mtmorgan@fhcrc.org
## counts
fl <- system.file(package="DirichletMultinomial", "extdata",
"Twins.csv")
count <- t(as.matrix(read.csv(fl, row.names=1)))
## all and best-fit clustering
data(fit)
lplc <- sapply(fit, laplace)
best <- fit[[which.min(lplc)]]
heatmapdmn(count, fit[[1]], best, 30)