reduce_dimension: Compute a projection of a cell_data_set object into a lower...

Description Usage Arguments Value References

View source: R/reduce_dimensions.R

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_dimensions (UMAP and tSNE). The function reduce_dimensions is the second step in the trajectory building process after preprocess_cds.

UMAP is implemented from the package uwot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
reduce_dimension(
  cds,
  max_components = 2,
  reduction_method = c("UMAP", "tSNE", "PCA"),
  preprocess_method = c("PCA", "LSI"),
  umap.metric = "cosine",
  umap.min_dist = 0.1,
  umap.n_neighbors = 15L,
  umap.fast_sgd = FALSE,
  umap.nn_method = "annoy",
  umap.save_model = NULL,
  verbose = FALSE,
  cores = 1,
  num_dim = NULL,
  seed = 2020,
  ...
)

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", and "PCA" 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.

umap.save_model

path to save umap model. Default NULL (don't save a model); See uwot package's umap for details.

verbose

Logical, whether to emit verbose output.

cores

Number of compute cores to use.

num_dim

Numeric indicating the number of prinicipal components to be in downstream ordering. Default value is NULL which will result in use of all PCs

...

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– 2605, 2008.

monocle3 - this function only differs from that found in monocle3 in \ that it allows for selection of num_dim


scfurl/m3addon documentation built on Aug. 9, 2021, 5:30 p.m.