GPCCA.compute_macrostates(n_states=None, n_cells=30, use_min_chi=False, cluster_key=None, en_cutoff=0.7, p_thresh=1e-15)[source]

Compute the macrostates.

  • n_states (Union[int, Tuple[int, int], List[int], Dict[str, int], None]) – Number of macrostates. If None, use the eigengap heuristic.

  • n_cells (Optional[int]) – Number of most likely cells from each macrostate to select.

  • use_min_chi (bool) – Whether to use msmtools.analysis.dense.gpcca.GPCCA.minChi() to calculate the number of macrostates. If True, n_states corresponds to a closed interval [min, max] inside of which the potentially optimal number of macrostates is searched.

  • cluster_key (Optional[str]) – If a key to cluster labels is given, names and colors of the states will be associated with the clusters.

  • en_cutoff (Optional[float]) – If cluster_key is given, this parameter determines when an approximate recurrent class will be labelled as ‘Unknown’, based on the entropy of the distribution of cells over transcriptomic clusters.

  • p_thresh (float) – If cell cycle scores were provided, a Wilcoxon rank-sum test is conducted to identify cell-cycle states. If the test returns a positive statistic and a p-value smaller than p_thresh, a warning will be issued.


Nothing, but updates the following fields:

Return type