stereo.core.StPipeline.filter_cells¶
- StPipeline.filter_cells(min_gene=None, max_gene=None, min_n_genes_by_counts=None, max_n_genes_by_counts=None, pct_counts_mt=None, cell_list=None, filter_raw=True, inplace=True)[source]¶
Filter cells based on counts or the numbers of genes expressed.
- Parameters:
min_gene (
Optional[int]) – minimum number of counts required for a cell to pass fitlering.max_gene (
Optional[int]) – maximum number of counts required for a cell to pass fitlering.min_n_genes_by_counts (
Optional[int]) – minimum number of genes expressed required for a cell to pass filtering.max_n_genes_by_counts (
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.inplace (
bool) – whether to inplace 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.