stereo.core.StPipeline.filter_by_clusters#

StPipeline.filter_by_clusters(cluster_res_key='cluster', groups=None, excluded=False, filter_raw=True, inplace=False)[source]#

Filter cells based on clustering result.

Parameters:
  • cluster_res_key (str) – the key of clustering to get corresponding result from self.result.

  • groups (Union[str, ndarray, List[str], None]) – the groups in clustering result which will be retained or filtered based on the value of excluded.

  • excluded (bool) – set it to True to exclude the groups which specify by parameter groups while False to include.

  • 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.