Preprocessing: pp

Contents

Preprocessing: pp#

Filtering based on both marker intensity and cell-level observational values/quantiles. Common transforms used for marker intensity values. If backend is set to GPU (and configured), some functions wrap rapids_singlecell functions. Otherwise, same functions wrap scanpy.

Functions#

pp.set_backend

Set the backend to use for processing.

pp.filter_by_obs_count

Filters cells which belong to a category in AnnData.obs with a cell count less than a min_value and/or more than a max_value.

pp.filter_by_obs_value

Filters cells which have a value of a given AnnData.obs column less than a min_value and/or more than a max_value.

pp.filter_by_obs_quantile

Filters cells which have a value of a given AnnData.obs column less than the min_quantile and/or more than the max_quantile.

pp.filter_by_var_value

Filters cells which have a value of a given AnnData.var column less than a min_value and/or more than a max_value.

pp.filter_by_var_quantile

Filters cells which have a value of a given AnnData.var column less than the min_quantile and/or more than the max_quantile.

pp.fill_na

Fill NaNs in a given layer or .X with a given value.

pp.log1p

Apply log1p transformation (natural log transform with pseudocount) to a given layer or .X.

pp.arcsinh

Apply arcsinh transformation with a given cofactor to a given layer or .X.

pp.zscore

Apply z-score transformation along the rows of a given layer or .X.

pp.scale

Scale columns and rows to have 0 mean and unit variance in a given layer or .X.

pp.percentile

Normalise data to the 95th or 99th percentile.

pp.neighbors

Compute a neighborhood graph in a given expression or embedding space.

pp.add_obs_as_var

Adds .obs features as .var features to an AnnData.

pp.subset_adata_by_var

Subsets an AnnData object by var names.

pp.subset_adata_by_obs_category

Subsets an AnnData object by obs category or categories.