This function gets a dimensionality reduction object (i.e. UMAP, tSNE, etc) from a given ArchRProject.

getReducedDims(
  ArchRProj = NULL,
  reducedDims = "IterativeLSI",
  returnMatrix = TRUE,
  dimsToUse = NULL,
  scaleDims = NULL,
  corCutOff = 0.75
)

Arguments

ArchRProj

An ArchRProject object.

reducedDims

The name of the reducedDims object (i.e. "IterativeLSI") to retrieve from the designated ArchRProject.

returnMatrix

If set to "mat" or "matrix", the function will return the reducedDims object as a matrix with entries for each individual cell. Otherwise, it will return the full reducedDims object.

dimsToUse

A vector containing the dimensions (i.e. 1:30) to return from the reducedDims object.

scaleDims

A boolean describing whether to z-score the reduced dimensions for each cell. This is useful for minimizing the contribution of strong biases (dominating early PCs) and lowly abundant populations. However, this may lead to stronger sample-specific biases since it is over-weighting latent PCs. If NULL this will scale the dimensions depending on if this were set true when the reducedDims were created by the dimensionality reduction method. This idea was introduced by Timothy Stuart.

corCutOff

A numeric cutoff for the correlation of each dimension to the sequencing depth. If the dimension has a correlation to sequencing depth that is greater than the corCutOff, it will be excluded.

Examples


# Get Test ArchR Project
proj <- getTestProject()

# Get Iterative LSI
getReducedDims(proj, reducedDims = "IterativeLSI")