snapatac2.pp.call_cells#
- snapatac2.pp.call_cells(data, use_rep, inplace=True, n_jobs=8)[source]#
Calling cells based on the number of feature counts.
This implements Cell Ranger’s [cell calling algorithm](https://www.10xgenomics.com/support/software/cell-ranger/latest/algorithms-overview/cr-gex-algorithm), which is based on two primary algorithms: Order of magnitude (OrdMag) and EmptyDrops.
Currently only OrdMag is implemented.
- Parameters:
data (
AnnData
|list
[AnnData
]) – The (annotated) data matrix of shapen_obs
xn_vars
. Rows correspond to cells and columns to regions.data
can also be a list of AnnData objects. In this case, the function will be applied to each AnnData object in parallel.use_rep (
str
|ndarray
[float
]) – The representation to use for filtering. This can be a string or a numpy array.inplace (
bool
) – Perform computation inplace or return result.n_jobs (
int
) – Number of parallel jobs to use whendata
is a list.
- Returns:
If
inplace = True
, directly subsets the data matrix. Otherwise return indices of cells that pass the filtering.- Return type:
np.ndarray | None