AddTrajectory.Rd
This function infers a pseudo-time trajectory based on the supervised input.
It was modified from the package ArchR addTrajectory
to use a Seurat object as input.
For more details, check here https://www.archrproject.com/reference/addTrajectory.html.
Author: Jeffrey Granja
AddTrajectory(
object,
name = "Trajectory",
trajectory = NULL,
group.by = NULL,
reduction = NULL,
dims = NULL,
pre.filter.quantile = 0.9,
post.filter.quantile = 0.9,
use.all = FALSE,
dof = 250,
spar = 1,
seed = 42
)
A Seurat object
A string indicating the name of the fitted trajectory to be added in meta.data
The order of cell groups to be used for constraining the initial supervised fitting procedure
The column name in metadata that contains the cell group
definitions used in trajectory
Name of dimension reduction used to infer the trajectory
How many dimensions to use
Prior to the initial supervised trajectory fitting, cells whose euclidean distance from the cell-grouping center is above the provided quantile will be excluded.
After initial supervised trajectory fitting, cells whose euclidean distance from the cell-grouping center is above the provided quantile will be excluded.
Whether or not to use cells ourside of trajectory groups for post-fitting procedure
The number of degrees of freedom to be used in the spline fit
The sparsity to be used in the spline fit.
Random seed
Seurat object with inferred trajectory
if (FALSE) {
obj <- AddTrajectory(
object = obj,
trajectory = c(2, 1),
group.by = "RNA_snn_res.0.2",
reduction = "dm",
dims = 1:3,
use.all = FALSE
)
}