cellrank.tl.estimators.GPCCA

class cellrank.tl.estimators.GPCCA(obj, obsp_key=None, **kwargs)[source]

Generalized Perron Cluster Cluster Analysis [Reuter et al., 2018] as implemented in pyGPCCA.

Coarse-grains a discrete Markov chain into a set of macrostates and computes coarse-grained transition probabilities among the macrostates. Each macrostate corresponds to an area of the state space, i.e. to a subset of cells. The assignment is soft, i.e. each cell is assigned to every macrostate with a certain weight, where weights sum to one per cell. Macrostates are computed by maximizing the ‘crispness’ which can be thought of as a measure for minimal overlap between macrostates in a certain inner-product sense. Once the macrostates have been computed, we project the large transition matrix onto a coarse-grained transition matrix among the macrostates via a Galerkin projection. This projection is based on invariant subspaces of the original transition matrix which are obtained using the real Schur decomposition [Reuter et al., 2018].

Parameters

Attributes

absorption_probabilities

Absorption probabilities.

absorption_times

Mean and variance of the time until absorption.

adata

Annotated data object.

backward

Direction of kernel.

coarse_T

Coarse-grained transition matrix.

coarse_initial_distribution

Coarse-grained initial distribution.

coarse_stationary_distribution

Coarse-grained stationary distribution.

eigendecomposition

Eigendecomposition of transition_matrix.

kernel

Underlying kernel expression.

lineage_drivers

Potential lineage drivers.

macrostates

Macrostates of the transition matrix.

macrostates_memberships

Macrostate membership matrix.

params

Estimator parameters.

priming_degree

Priming degree.

schur_matrix

Schur matrix.

schur_vectors

Real Schur vectors of the transition matrix.

shape

Shape of the kernel.

terminal_states

Categorical annotation of terminal states.

terminal_states_memberships

Terminal state membership matrix.

terminal_states_probabilities

Aggregated probability of cells to be in terminal states.

transition_matrix

Transition matrix of kernel.

Methods

compute_absorption_probabilities([keys, ...])

Compute absorption probabilities.

compute_eigendecomposition([k, which, ...])

Compute eigendecomposition of transition_matrix.

compute_lineage_drivers([lineages, method, ...])

Compute driver genes per lineage.

compute_lineage_priming([method, early_cells])

Compute the degree of lineage priming.

compute_macrostates([n_states, n_cells, ...])

Compute the macrostates.

compute_schur([n_components, ...])

Compute Schur decomposition.

compute_terminal_states(*args, **kwargs)

Compute terminal states of the process.

copy(*[, deep])

Return a copy of self.

fit([n_states, n_cells, cluster_key])

Prepare self for terminal states prediction.

from_adata(adata, obsp_key)

Deserialize self from anndata.AnnData.

plot_absorption_probabilities([states, ...])

Plot continuous or categorical observations in an embedding or along pseudotime.

plot_coarse_T([show_stationary_dist, ...])

Plot the coarse-grained transition matrix between macrostates.

plot_lineage_drivers(lineage[, n_genes, ...])

Plot lineage drivers discovered by compute_lineage_drivers().

plot_lineage_drivers_correlation(lineage_x, ...)

Show scatter plot of gene-correlations between two lineages.

plot_macrostate_composition(key[, width, ...])

Plot stacked histogram of macrostates over categorical annotations.

plot_macrostates([states, color, discrete, ...])

Plot continuous or categorical observations in an embedding or along pseudotime.

plot_schur_matrix([title, cmap, figsize, ...])

Plot the Schur matrix.

plot_spectrum([n, real_only, show_eigengap, ...])

Plot the top eigenvalues in real or complex plane.

plot_terminal_states([states, color, ...])

Plot continuous or categorical observations in an embedding or along pseudotime.

predict([method, n_cells, alpha, ...])

Automatically select terminal states from macrostates.

read(fname[, adata, copy])

Deserialize self from a file.

rename_terminal_states(new_names)

Rename categories in terminal_states.

set_terminal_states(labels[, cluster_key, ...])

Manually define terminal states.

set_terminal_states_from_macrostates([...])

Manually select terminal states from macrostates.

to_adata([keep, copy])

Serialize self to anndata.Anndata.

write(fname[, write_adata, ext])

Serialize self to a file.