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

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



An ArchRProject object.


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


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.


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


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.


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.