Generalized helper function that pulls the data from an object, passes the dataframe to a Python function, and places the resulting dataframe in the appropriate slot

ReductionBridge(object, ...)

# S3 method for Seurat
ReductionBridge(
  object,
  reduction_use = "pca",
  reduction_save,
  function_use,
  dims_use = NULL,
  assay_use = NULL,
  ...
)

# S3 method for SingleCellExperiment
ReductionBridge(
  object,
  reduction_use = "PCA",
  reduction_save,
  function_use,
  dims_use = NULL,
  ...
)

Arguments

object

A Seurat or SingleCellExperiment object to be transformed.

...

Extra parameters to pass to the dimensional reduction function.

reduction_use

Prior dimensional reduction to use for calculations (i.e. pca, ica, cca, etc...)

reduction_save

Name to use for the reduction (i. e. tsne, umap, etc...)

function_use

Dimensional reduction function to call.

dims_use

Dimensions of `reduction_use` to pass to `function_use`

Value

Seurat object

SingleCellExperiment object