Skip to contents

Perform a UMAP dimensionality reduction on the expression values or pca results.

Usage

runUMAP(
  fcd,
  input_type,
  data_slot,
  nNeighbors = 15,
  nComponents = 2,
  min_dist = 0.2,
  metric = "euclidean",
  seed = 91,
  prefix = NULL,
  nThreads = 32,
  nPC = ncol(fcd[[input_type]][[data_slot]]),
  ret_model = FALSE,
  markers = colnames(fcd$expr[[data_slot]]),
  discard = FALSE
)

Arguments

fcd

flow cytometry dataset.

input_type

data to use for the calculation of the UMAP, e.g. "expr" or "pca".

data_slot

data slot to use for the calculation of the UMAP, e.g. "orig" or "norm".

nNeighbors

Number of items that define the neighborhood around each point. Default = 15.

nComponents

Number of components for UMAP calculation. Default = 2.

min_dist

Min_dist for UMAP calculation. Default = 0.2.

metric

Metric for UMAP calculation. Default = "euclidean".

seed

A seed is set for reproducibility.

prefix

Optional prefix for the slot name of the output.

nThreads

Number of threads to be used in the UMAP calculation. Default = 32.

nPC

Number of PCs used in the UMAP calculation. Default = All.

ret_model

LOGICAL if the UMAP model should be saved for future projection of the data using learnUMAP.

markers

Vector of marker names to include or exclude from UMAP calculation according to the discard parameter. See functions used_markers and measured_markers for the extraction of markers directly from the condor object.

discard

LOGICAL to decide if the markers specified should be included, "F", or excluded, "T", from the UMAP calculation. Default = F.

Value

The function returns a fcd including a data frame with the UMAP coordinates saved in fcd$umap. The name of the output consists of the prefix (if given) and the data slot. If a nPC is given it will be added to the output name.

Details

runUMAP

See [Melville J (2023). uwot: The Uniform Manifold Approximation and Projection (UMAP) Method for Dimensionality Reduction. R package version 0.1.16](https://github.com/jlmelville/uwot) for more details on the umap method.