- dynamo.pd.andecestor(adata, init_cells, init_states=None, cores=1, t_end=50, basis='umap', n_neighbors=5, direction='forward', interpolation_num=250, last_point_only=False, metric='euclidean', metric_kwds=None, seed=19491001, **kwargs)
Predict the ancestors or descendants of a group of initial cells (states) with the given 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 not found in the adata.obs_name, it will be treated as cell indices and must be integers.
str) – The key in adata.obsm that points to the embedding data to use for predicting cell fate.
int) – Number of cores to calculate nearest neighbor graph.
int) – The length of the time period from which to predict cell state forward or backward over time. This is used by the odeint function.
int) – Number of nearest neighbors.
str) – The direction to predict the cell fate. One of the forward, backward or both string.
int) – The number of uniformly interpolated time points.
str) – The distance metric to use for the tree. The default metric is ‘euclidean’, and with p=2 is equivalent to the standard Euclidean metric. See the documentation of
DistanceMetricfor a list of available metrics. If metric is “precomputed”, X is assumed to be a distance matrix and must be square during fit. X may be a sparse graph, in which case only “nonzero” elements may be considered neighbors.
int) – Random seed to ensure the reproducibility of each run.
kwargs – Additional arguments that will be passed to each nearest neighbor search algorithm.
- Return type:
Nothing but update the adata object with a new column in .obs that stores predicted ancestors or descendants.