- dynamo.vf.velocities(adata, init_cells, init_states=None, basis=None, vector_field_class=None, layer='X', dims=None, Qkey='PCs')
Calculate the velocities for any cell state with the reconstructed vector field function.
AnnData) – AnnData object that contains the reconstructed vector field function in the uns attribute.
init_cells (list (default: None)) – Cell name or indices of the initial cell states for the historical or future cell state prediction with numerical integration. If the names in init_cells are not find in the adata.obs_name, it will be treated as cell indices and must be integers.
ndarrayor None (default: None)) – Initial cell states for the historical or future cell state prediction with numerical integration.
basis (str or None (default: None)) – The embedding data to use for calculating velocities. If basis is either umap or pca, the reconstructed trajectory will be projected back to high dimensional space via the inverse_transform function.
vectorfield) – If not None, the speed will be computed using this class instead of the vector field stored in adata. You can set up the class with a known ODE function, useful when the data is generated through simulation.
layer (str or None (default: 'X')) – Which layer of the data will be used for predicting cell fate with the reconstructed vector field function. The layer once provided, will override the basis argument and then predicting cell fate in high dimensional space.
Qkey (str (default: 'PCs')) – The key of the PCA loading matrix in .uns. Only used when basis is pca.
adata – AnnData object that is updated with the “velocities” related key in the .uns.
- Return type