stereo.core.StPipeline.filter_cells¶
- StPipeline.filter_cells(min_counts=None, max_counts=None, min_genes=None, max_genes=None, pct_counts_mt=None, cell_list=None, filter_raw=True, excluded=False, inplace=True, **kwargs)[source]¶
Filter cells based on counts or the numbers of genes expressed.
- Parameters:
min_counts (
Optional[int]) – minimum number of counts required for a cell to pass fitlering.max_counts (
Optional[int]) – maximum number of counts required for a cell to pass fitlering.min_genes (
Optional[int]) – minimum number of genes expressed required for a cell to pass filtering.max_genes (
Optional[int]) – maximum number of genes expressed required for a cell to pass filtering.pct_counts_mt (
Optional[float]) – maximum number ofpct_counts_mtrequired for a cell to pass filtering.cell_list (
Optional[list]) – the list of cells to be retained.filter_raw (
Optional[bool]) – whether to filter raw data meanwhile.excluded (
Optional[bool]) – set it to True to exclude the cells which are specified by parametercell_listwhile False to include.inplace (
bool) – whether to replace the previous data or return a new data.
- Returns:
An object of StereoExpData.
Depending on
inplace, ifTrue, the data will be replaced by those filtered.