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]¶ Compute the initial/terminal states of a Markov chain via spectral heuristics.
This estimator uses the left eigenvectors of the transition matrix to filter to a set of recurrent cells and the right eigenvectors to cluster this set of cells into discrete groups.
- Parameters
obj¶ (
Union
[KernelExpression
, ~AnnData,spmatrix
,ndarray
]) – Either acellrank.tl.kernels.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 cell-cycle driven start- or endpoints.s_key¶ (
Optional
[str
]) – Key inadata
.obs
. Can be used to detect cell-cycle 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, method, …])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.