plot_lle | R Documentation |
This function plots a low-dimensional projection of an omic data matrix using locally linear embedding.
plot_lle( dat, group = NULL, covar = NULL, k = ncol(dat)/4L, top = NULL, dims = c(1L, 2L), label = FALSE, pal_group = "npg", pal_covar = "Blues", size = NULL, alpha = NULL, title = "LLE", legend = "right", hover = FALSE, D3 = FALSE )
dat |
Omic data matrix or matrix-like object with rows corresponding to
probes and columns to samples. It is strongly recommended that data be
filtered and normalized prior to plotting. Raw counts stored in |
group |
Optional character or factor vector of length equal to sample size, or up to two such vectors organized into a list or data frame. Supply legend title(s) by passing a named list or data frame. |
covar |
Optional continuous covariate. If non- |
k |
How many nearest neighbors should the algorithm consider when building projections? See Details. |
top |
Optional number (if > 1) or proportion (if < 1) of most variable probes to be used for LLE. |
dims |
Vector specifying which principal components to plot. Must be of
length two unless |
label |
Label data points by sample name? Defaults to |
pal_group |
String specifying the color palette to use if |
pal_covar |
String specifying the color palette to use if |
size |
Point size. |
alpha |
Point transparency. |
title |
Optional plot title. |
legend |
Legend position. Must be one of |
hover |
Show sample name by hovering mouse over data point? If |
D3 |
Render plot in three dimensions? |
Locally linear embedding is a feature extraction method that projects a high-dimensional dataset in two or three dimensions. It prioritizes local over global structure, and is designed to capture nonlinearities that would be impossible to detect using PCA or classical MDS.
By default, the number of nearest neighbors k used in the LLE
projection is fixed at one quarter the sample size. This is an arbitrary
value that may be unsuitable for some datasets. The parameter may be
optimized using Kayo's method (2006). See See lle::calc_k
.
Roweis, S.T. & Saul, L.K. (2000). Nonlinear Dimensionality Reduction by Locally Linear Embedding. Science, 290(5500): 2323-2326.
Kayo, O. (2006). Locally Linear Embedding Algorithm: Extensions and Applications (Unpublished doctoral dissertation). University of Oulu, Finland.
plot_pca
, plot_tsne
mat <- matrix(rnorm(1000 * 5), nrow = 1000, ncol = 5) plot_lle(mat) library(DESeq2) dds <- makeExampleDESeqDataSet() dds <- rlog(dds) plot_lle(dds, group = colData(dds)$condition)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.