- dynamo.vf.diffusionMatrix(adata, X_data=None, V_data=None, genes=None, layer=None, basis='umap', dims=None, n=30, VecFld=None, residual='vector_field')
Calculate the diffusion matrix from the estimated velocity vector and the reconstructed vector field.
AnnData) – an Annodata object.
str) – Which basis of the data will be used for diffusion matrix calculation.
int) – Number of nearest neighbors when the nearest neighbor graph is not included.
VecFldDict]) – The reconstructed vector field function.
str) – Method to calculate residual velocity vectors for diffusion matrix calculation. If average, all velocity of the nearest neighbor cells will be minused by its average velocity; if vector_field, all velocity will be minused by the predicted velocity from the reconstructed deterministic velocity vector field.
- AnnData object that is updated with the diffusion_matrix key in the uns attribute which is a list of
the diffusion matrix for each cell. A column diffusion corresponds to the square root of the sum of all elements for each cell’s diffusion matrix will also be added.
- Return type: