cellrank.tl.estimators.CFLARE¶

class
cellrank.tl.estimators.
CFLARE
(obj, inplace=True, read_from_adata=False, obsp_key=None, g2m_key='G2M_score', s_key='S_score', write_to_adata=True, key=None)[source]¶ Clustering and Filtering of Left and Right Eigenvectors based on Markov chains.
This is one of the two main classes of CellRank. We model cellular development as a Markov chain (MC), where each measured cell is represented by a state in the MC. We assume that transition probabilities between these states have already been computed using either the
cellrank.tl.kernels.Kernel
class directly or thecellrank.tl.transition_matrix()
high level function.The MC is timehomogeneous, i.e. the transition probabilities don’t change over time. Further, it’s discrete, as every state in the MC is given by a measured cell state. The state space is finite, as is the number of measured cells and we consider discrete timeincrements.
 Parameters
obj¶ (
Union
[KernelExpression
, ~AnnData,spmatrix
,ndarray
]) – Either acellrank.tl.Kernel
object, ananndata.AnnData
object which stores the transition matrix in.obsp
attribute ornumpy
orscipy
array.inplace¶ (
bool
) – Whether to modifyadata
object inplace or make a copy.read_from_adata¶ (
bool
) – Whether to read available attributes inadata
, if present.obsp_key¶ (
Optional
[str
]) – Key inobj.obsp
whenobj
is ananndata.AnnData
object.g2m_key¶ (
Optional
[str
]) – Key inadata
.obs
. Can be used to detect cellcycle driven start or endpoints.s_key¶ (
Optional
[str
]) – Key inadata
.obs
. Can be used to detect cellcycle driven start or endpoints.write_to_adata¶ (
bool
) – Whether to write the transition matrix toadata
.obsp
and the parameters toadata
.uns
.key¶ (
Optional
[str
]) – Key used when writing transition matrix toadata
. If None, thekey
is set to ‘T_bwd’ ifbackward
is True, else ‘T_fwd’. Only used whenwrite_to_adata=True
.
Attributes
Absorption probabilities.
Annotated data object.
Differentiation potential.
Eigendecomposition.
Whether the Markov chain is irreducible or not.
Whether the transition matrix is sparse or not.
Underlying kernel.
Lineage absorption times.
Lineage drivers.
Recurrent classes of the Markov chain.
Terminal states.
Terminal states probabilities.
Transient classes of the Markov chain.
Transition matrix.
Methods
compute_absorption_probabilities
([keys, …])Compute absorption probabilities of a Markov chain.
compute_eigendecomposition
([k, which, …])Compute eigendecomposition of transition matrix.
compute_lineage_drivers
([lineages, …])Compute driver genes per lineage.
Compute communication classes for the Markov chain.
compute_terminal_states
([use, percentile, …])Find approximate recurrent classes of the Markov chain.
copy
()Return a copy of self, including the underlying
adata
object.fit
(n_lineages[, keys, cluster_key, …])Run the pipeline, computing the initial or terminal states and optionally the absorption probabilities.
plot_absorption_probabilities
(data, prop[, …])Plot discrete states or probabilities in an embedding.
plot_eigendecomposition
([left])Plot eigenvectors in an embedding.
plot_lineage_drivers
(lineage[, n_genes, use_raw])Plot lineage drivers discovered by
compute_lineage_drivers()
.plot_spectrum
([n, real_only, show_eigengap, …])Plot the top eigenvalues in real or complex plane.
plot_terminal_states
(data, prop[, discrete, …])Plot discrete states or probabilities in an embedding.
read
(fname)Deserialize self from a file.
rename_terminal_states
(new_names[, update_adata])Rename the names of
terminal_states
.set_terminal_states
(labels[, cluster_key, …])Set the approximate recurrent classes, if they are known a priori.
write
(fname[, ext])Serialize self to a file.