stlearn.spatial.trajectory.pseudotime¶
- stlearn.spatial.trajectory.pseudotime(adata: AnnData, use_label: str = 'leiden', eps: float = 20, n_neighbors: int = 25, use_rep: str = 'X_pca', threshold: float = 0.01, radius: int = 50, method: Literal['mean', 'median', 'sum'] = 'mean', threshold_spots: int = 5, use_sme: bool = False, reverse: bool = False, pseudotime_key: str = 'dpt_pseudotime', max_nodes: int = 4, run_knn: bool = False, copy: bool = False) AnnData | None[source]¶
Perform pseudotime analysis.
- Parameters:
adata – Annotated data matrix.
use_label – Use label result of cluster method.
eps – The maximum distance between two samples for one to be considered as in the neighborhood of the other. This is not a maximum bound on the distances of points within a cluster. This is the most important DBSCAN parameter to choose appropriately for your data set and distance function.
threshold – Threshold to find the significant connection for PAGA graph.
radius – radius to adjust data for diffusion map
method – method to adjust the data.
use_sme – Use adjusted feature by SME normalization or not
reverse – Reverse the pseudotime score
pseudotime_key – Key to store pseudotime
max_nodes – Maximum number of node in available paths
copy – Return a copy instead of writing to adata.
Notes
Each run clears any previously computed values for: X_diffmap, X_draw_graph_fr, X_diffmap_morphology, split_node, global_graph, centroid_dict, available_paths, threshold_spots, and sub_cluster_labels.
- Return type:
Anndata