Learn R Programming

monocle3 (version 1.0.0)

reduce_dimension: Compute a projection of a cell_data_set object into a lower dimensional space with non-linear dimension reduction methods

Description

Monocle3 aims to learn how cells transition through a biological program of gene expression changes in an experiment. Each cell can be viewed as a point in a high-dimensional space, where each dimension describes the expression of a different gene. Identifying the program of gene expression changes is equivalent to learning a trajectory that the cells follow through this space. However, the more dimensions there are in the analysis, the harder the trajectory is to learn. Fortunately, many genes typically co-vary with one another, and so the dimensionality of the data can be reduced with a wide variety of different algorithms. Monocle3 provides two different algorithms for dimensionality reduction via reduce_dimension (UMAP and tSNE). The function reduce_dimension is the second step in the trajectory building process after preprocess_cds.

UMAP is implemented from the package uwot.

Usage

reduce_dimension(
  cds,
  max_components = 2,
  reduction_method = c("UMAP", "tSNE", "PCA", "LSI", "Aligned"),
  preprocess_method = NULL,
  umap.metric = "cosine",
  umap.min_dist = 0.1,
  umap.n_neighbors = 15L,
  umap.fast_sgd = FALSE,
  umap.nn_method = "annoy",
  cores = 1,
  verbose = FALSE,
  ...
)

Arguments

cds

the cell_data_set upon which to perform this operation.

max_components

the dimensionality of the reduced space. Default is 2.

reduction_method

A character string specifying the algorithm to use for dimensionality reduction. Currently "UMAP", "tSNE", "PCA", "LSI", and "Aligned" are supported.

preprocess_method

A string indicating the preprocessing method used on the data. Options are "PCA" and "LSI". Default is "LSI".

umap.metric

A string indicating the distance metric to be used when calculating UMAP. Default is "cosine". See uwot package's umap for details.

umap.min_dist

Numeric indicating the minimum distance to be passed to UMAP function. Default is 0.1.See uwot package's umap for details.

umap.n_neighbors

Integer indicating the number of neighbors to use during kNN graph construction. Default is 15L. See uwot package's umap for details.

umap.fast_sgd

Logical indicating whether to use fast SGD. Default is TRUE. See uwot package's umap for details.

umap.nn_method

String indicating the nearest neighbor method to be used by UMAP. Default is "annoy". See uwot package's umap for details.

cores

Number of compute cores to use.

verbose

Logical, whether to emit verbose output.

...

additional arguments to pass to the dimensionality reduction function.

Value

an updated cell_data_set object

References

UMAP: McInnes, L, Healy, J, UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction, ArXiv e-prints 1802.03426, 2018

tSNE: Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-SNE. J. Mach. Learn. Res., 9(Nov):2579<U+2013> 2605, 2008.