Skip to contents

Run UMAP dimensionality reduction

Usage

run_umap(
  x,
  assay = "exprs",
  n_neighbors = 50,
  min_dist = 0.01,
  n_threads = NULL,
  out_dir = NULL
)

Arguments

x

A SpatialExperiment object.

assay

.

n_neighbors

The size of local neighborhood (in terms of number of neighboring sample points) used for manifold approximation. Larger values result in more global views of the manifold, while smaller values result in more local data being preserved. In general values should be in the range 2 to 100.

min_dist

The effective minimum distance between embedded points. Smaller values will result in a more clustered/clumped embedding where nearby points on the manifold are drawn closer together, while larger values will result on a more even dispersal of points. The value should be set relative to the spread value, which determines the scale at which embedded points will be spread out.

n_threads

Number of threads to use (except during stochastic gradient descent). Default is half the number of concurrent threads supported by the system. For nearest neighbor search, only applies if nn_method = "annoy". If n_threads > 1, then the Annoy index will be temporarily written to disk in the location determined by tempfile.

out_dir

Name of the output analysis directory. If specified, the object will be saved there.

Value

A SpatialExperiment object.