cellrank.external.kernels.StationaryOTKernel
- class cellrank.external.kernels.StationaryOTKernel(adata, g, terminal_states=None, **kwargs)[source]
Stationary optimal transport kernel from [Zhang et al., 2021].
This class requires the statOT package, which can be installed as pip install statot POT.
- Parameters
adata (
anndata.AnnData
) – Annotated data object.terminal_states (
Union
[str
,Series
,None
]) – Key inanndata.AnnData.obs
or a categoricalpandas.Series
where non-NaN values mark the terminal states. If None, terminal states are assumed to be present inanndata.AnnData.obs
['terminal_states']
.g (
Union
[str
,ndarray
]) – Key inanndata.AnnData.obs
containing relative growth rates for cells or the array itself.kwargs (
Any
) – Keyword arguments for the parent class.
Attributes
Annotated data object.
None.
Underlying base kernels.
Parameters which are used to compute the transition matrix.
(n_cells, n_cells)
.Row-normalized transition matrix.
Methods
compute_transition_matrix
(eps, dt[, basis, ...])Compute transition matrix using stationary OT [Zhang et al., 2021].
copy
([deep])Not implemented.
plot_projection
([basis, key_added, ...])Plot
transition_matrix
as a stream or a grid plot.plot_random_walks
([n_sims, max_iter, seed, ...])Plot random walks in an embedding.
plot_single_flow
(cluster, cluster_key, time_key)Visualize outgoing flow from a cluster of cells [Mittnenzweig et al., 2021].
read
(fname[, adata, copy])Deserialize self from a file.
write
(fname[, write_adata, ext])Serialize self to a file.
write_to_adata
([key, copy])Write the transition matrix and parameters used for computation to the underlying
adata
object.