Slingshot¶
Trajectory inference using Slingshot
This process is implemented based on the R package slingshot.
Input¶
sobjfile: The seurat object file in RDS or qs format.
Output¶
outfile: Default:{{in.sobjfile | stem}}.qs.
The output object with the trajectory information.
The lineages are stored in the metadata of the seurat object at columnsLineageX, where X is the lineage number. TheBranchIDcolumn contains the branch id for each cell.
One can usescplotter::CellDimPlot(object, lineages = c("Lineage1", "Lineage2", ...))to visualize the trajectories.
Environment Variables¶
group_by: The column name in metadata to group the cells.
Typically, this column should be the cluster id.
Default is the default identity of the seurat object.reduction: The nonlinear reduction to use for the trajectory analysis.dims(type=auto): The dimensions to use for the analysis.
A list or a string with comma separated values.
Consecutive numbers can be specified with a colon (:) or a dash (-).
Or a single number greater than 1, which will be expanded to1:number.
IfNone, all dimensions will be used.start: The starting group for the Slingshot analysis.end: The ending group for the Slingshot analysis.reverse(flag): Default:False.
Logical value indicating whether to reverse the pseudotime variable.align_start(flag): Default:False.
Whether to align the starting pseudotime values at the maximum pseudotime.seed(type=int): Default:8525.
The seed for the random number generator.subset: An expression in string to subset the cells.split_by: The column name in metadata to split the cells to run the method separately.
After run, the results will be combined together with this column in the final output.
The lineages will be all stored in the columns<prefix>_LineageXand<prefix>_BranchID.
If a lineage is not found in a split, the corresponding columns will be filled withNA.cases: Default:{}.
A dictionary of cases to run the analysis.
The keys are the names of the cases, which will be served as the prefix to add to the column names of the resulting pseudotime variable.
For example, if the case name iscase1, the resulting pseudotime variable will be stored in the columncase1_LineageXandcase1_BranchID.
The values are the arguments and will be inherited from theenvsabove, except forcases.
The default case will be added with the default values underenvswith an empty prefix.outtype: Default:qs2.