pygot.tools.traj.latent_velocity

pygot.tools.traj.latent_velocity#

pygot.tools.traj.latent_velocity(adata, odefunc, embedding_key='X_pca', time_key=None)[source]#

Latent velocity inference using trained model.

Arguments:#

adata: AnnData

Annotated data matrix.

odefunc: class:ODEwrapper or class:ODEwrapperNoTime

trained NeuralODE model by function fit_velocity_model

embedding_key: str

Name of latent space, in adata.obsm

time_key: str (default: None)

Name of time label, in adata.obs, use if the model input contains time label

returns:

latent_velocity (.obsm) – latent velocity array, (n_cells, latent_dim), store in adata.obsm[velocity_key]

rtype:

:class`np.ndarray`