Preprocess Single Cell and Spatial Data for analysis in spacedeconv
preprocess.Rd
This function prepares SingleCellExperiment
or SpatialExperiment
objects for downstream analysis by performing a series of preprocessing steps. These steps include converting non-SpatialExperiment objects to SingleCellExperiment
format, filtering based on UMI counts, optionally removing mitochondrial genes, and ensuring data integrity.
Arguments
- object
The input object, which can be a
SingleCellExperiment
,SpatialExperiment
, AnnData, or Seurat object. The function will convert AnnData or Seurat objects toSingleCellExperiment
if needed.- min_umi
The minimum UMI count threshold for cells or spots to be included in the analysis. This filter helps to remove low-quality observations that might not provide reliable data.
- max_umi
The maximum UMI count threshold, used to exclude cells or spots with extremely high UMI counts. This parameter is optional.
- assay
The name of the assay to use to compute the preprocessing Default is "counts"
- remove_mito
A logical flag indicating whether mitochondrial genes should be removed from the dataset.