plot_heatmap | R Documentation |
This function visualizes a probe by sample matrix as a heatmap.
plot_heatmap( dat, group = NULL, covar = NULL, dist = "pearson", p = 2L, top = NULL, filter_method = "pairwise", center = FALSE, hclustfun = "complete", pal_group = "npg", pal_covar = "Blues", pal_tiles = "RdBu", title = "Omic Heatmap" )
dat |
Omic data matrix or matrix-like object with rows corresponding to probes and columns to samples. |
group |
Optional character or factor vector of length equal to sample size. Alternatively, a data frame or list of such vectors, optionally named. |
covar |
Optional continuous covariate of length equal to sample size. Alternatively, a data frame or list of such vectors, optionally named. |
dist |
Distance measure to be used. Supports all methods available in
|
p |
Power of the Minkowski distance. |
top |
Optional number (if > 1) or proportion (if < 1) of top probes to be used for t-SNE. |
filter_method |
String specifying whether to apply a |
center |
Center each probe prior to computing distances? |
hclustfun |
The agglomeration method to be used for hierarchical
clustering. Supports all methods available in |
pal_group |
String specifying the color palette to use if |
pal_covar |
String specifying the color palette to use if |
pal_tiles |
String specifying the color palette to use for heatmap
tiles. Options include the complete collection of |
title |
Optional plot title. |
Heatmaps are a common and intuitive way to display the values of an omic data matrix, especially after top probes have been selected for closer investigation. Hierarchical clustering dendrograms cluster both the rows and the columns, revealing latent structure in the data. Annotation tracks atop the figure may be used to investigate associations with phenotypic features.
Available distance measures include: "euclidean"
, "maximum"
,
"manhattan"
, "canberra"
, "minkowski"
, "cosine"
,
"pearson"
, "kendall"
, "spearman"
, "bray"
,
"kulczynski"
, "jaccard"
, "gower"
, "altGower"
,
"morisita"
, "horn"
, "mountford"
, "raup"
,
"binomial"
, "chao"
, "cao"
, "mahalanobis"
, "MI"
,
or "KLD"
. Some distance measures are unsuitable for certain types of
data. See dist_mat
for more details on these methods and links
to documentation on each.
The top
argument optionally filters data using either probewise
variance (if filter_method = "common"
) or the leading fold change
method of Smyth et al. (if filter_method = "pairwise"
). See
plot_mds
for more details.
mat <- matrix(rnorm(100 * 10), nrow = 100, ncol = 10) grp <- rep(c("A", "B"), each = 5) plot_heatmap(mat, group = grp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.