schist.tools._select
Module Contents
Functions
|
Selects cells based on the affinity values at a specified level. |
- schist.tools._select.select_affinity(adata: anndata.AnnData, level: str = '1', threshold: float = 0.9999, inverse: bool = False, key: str | None = 'nsbm', update_state: bool | None = False, filter: bool | None = True, copy: bool = False)
Selects cells based on the affinity values at a specified level.
Parameters
- adata
Annotated data matrix. A NestedBlockState object needs to be saved
- level
The level to be used for selection
- threshold
The maximal affinity to be used. Cells with affinities lower than the threshold will be discarded
- inverse
Whether to return cells with affinity lower than the threshold
- key
key of the groupings used to evaluate the model
- update_state
Whether to update the state removing unselected cells
- filter
If False, cells are not filtered and only marked in adata.obs[‘selected’]
- copy
Whether to perform selection in place or return a subsetted object
Returns
Depending on copy, returns or updates adata with selected cells.