Implement trajectory inference based on low-dimensional embeddings and clusters using Slingshot or other methods.
AddTrajectory(
spe,
use_cluster = "clusters",
reduction = NULL,
name = NULL,
traject.method = "Slingshot",
target.clus = NULL,
start.clus = NULL,
seed = 1,
return.all.branch = FALSE,
...
)
A SpatialExperiment object.
a string, the name of clusters in the colData of the SpatialExperiment object used for trajectory inference.
a string, the name of reduction slot used in trajectory inference.
a string, the name of inferrend pseudotime, default as "PT".
a string, the method used to conduct trajectory inference, default as 'Slingshot'.
a string, the cluster to be used as end point.
a string, the cluster to be used as the start point.
a positive integer, the random seed.
a logical value, whether return all inferred braches, default as FALSE
implies only the merged pseudotime is returned.
other arguments pass to other method.
return a revised SpatialExperiment object. The colData of the SpatialExperiment object adds a column named name (PT).