- dynamo.vf.velocities(adata, init_cells=None, 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.
List]) – 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 found in the adata.obs_name, they will be treated as cell indices and must be integers.
str]) – 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.
BaseVectorField]) – 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.
str]) – 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 this function will then predict cell fate in high dimensional space.
str) – The key of the PCA loading matrix in .uns. Only used when basis is pca.
- Return type:
AnnData object that is updated with the “velocities” related key in the .uns.