stereo.core.StPipeline.filter_genes#

StPipeline.filter_genes(min_cell=None, max_cell=None, gene_list=None, mean_umi_gt=None, filter_raw=True, inplace=True)[source]#

Filter genes based on the numbers of cells or counts.

Parameters:
  • min_cell (Optional[int]) – minimum number of cells expressed required for a gene to pass filering.

  • max_cell (Optional[int]) – maximum number of cells expressed required for a gene to pass filering.

  • gene_list (Union[ndarray, list, None]) – the list of genes to be retained.

  • mean_umi_gt (Optional[float]) – genes mean umi should greater than this.

  • 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, if True, the data will be replaced by those filtered.