cellrank.tl.estimators.GPCCA.fit

GPCCA.fit(n_lineages=None, cluster_key=None, keys=None, method='krylov', compute_absorption_probabilities=True, **kwargs)[source]

Run the pipeline, computing the macrostates, initial or terminal states and optionally the absorption probabilities.

It is equivalent to running:

if n_lineages is None or n_lineages == 1:
    compute_eigendecomposition(...)  # get the stationary distribution
if n_lineages > 1:
    compute_schur(...)

compute_macrostates(...)

if n_lineages is None:
    compute_terminal_states(...)
else:
    set_terminal_states_from_macrostates(...)

if compute_absorption_probabilities:
    compute_absorption_probabilities(...)
Parameters
  • n_lineages (Optional[int]) – Number of lineages. If None, it will be determined automatically.

  • cluster_key (Optional[str]) – Match computed states against pre-computed clusters to annotate the states. For this, provide a key from adata .obs where cluster labels have been computed.

  • keys (Optional[Sequence[str]]) – Determines which initial or terminaltates to use by passing their names. Further, initial or terminal states can be combined. If e.g. the terminal states are [‘Neuronal_1’, ‘Neuronal_1’, ‘Astrocytes’, ‘OPC’], then passing keys=['Neuronal_1, Neuronal_2', 'OPC'] means that the two neuronal terminal states are treated as one and the ‘Astrocyte’ state is excluded.

  • method (str) – Method to use when computing the Schur decomposition. Valid options are: ‘krylov’ or ‘brandts’.

  • compute_absorption_probabilities (bool) – Whether to compute the absorption probabilities or only the initial or terminal states.

  • **kwargs – Keyword arguments for cellrank.tl.estimators.GPCCA.compute_macrostates().

Returns

Nothing, just makes available the following fields:

Return type

None