stereo.algorithm.get_niche.GetNiche.main

GetNiche.main(niche_distance, cluster_1, cluster_2, cluster_res_key=None, method='fixed', theta=0.1, filter_raw=True, inplace=False)[source]

To ensure the accuracy and specificity of this juxtacrine signaling model, we extract cells bordering their niches and statistically calculate their CCC activity scores of L-R pairs under the assumption that intercellular L-R communications routinely exist among closely neighboring cells

Parameters:
  • niche_distance (float) – the maximum distance between cells in order to form a niche.

  • cluster_1 (str) – one cell cluster in the interaction.

  • cluster_2 (str) – the other cell cluster in the interaction.

  • cluster_res_key (Optional[str]) – the key which specifies the clustering result in data.tl.result.

  • method (str) – method for calculating niche, choose from ‘fixed’ or ‘adaptive’.

  • theta (float) – the parameter used to control border region selection, only available for ‘adaptive’ method.

  • filter_raw (bool) – this function will create a new data object by filtering cells, this parameter determine whether to filter raw data meanwhile, default to True.

  • inplace (bool) – whether to replace the previous express matrix or get a new StereoExpData object with the new express matrix, default by False. # noqa

return: a new StereoExpData or AnnBasedStereoExpData object representing a niche.