TrajectoryPlot.Rd
This function generates a scatter plot to visualize the inferred trajectory.
It was modified from the package ArchR plotTrajectory
to use a Seurat object as input.
For more details, check here https://www.archrproject.com/reference/plotTrajectory.html.
TrajectoryPlot(
object = NULL,
trajectory = "Trajectory",
reduction = NULL,
size = 0.2,
rastr = FALSE,
quantCut = c(0.01, 0.99),
continuousSet = NULL,
discreteSet = NULL,
randomize = TRUE,
keepAxis = FALSE,
baseSize = 6,
addArrow = FALSE,
smoothWindow = 5
)
Seurat object
Name of one metadata column to group the cells, usually this refers to the clustering results
Which dimension reduction is used to visualize the trajectory
A number indicating the size of the points to plot
Whether the plot should be rasterized
If this is not NULL, a quantile cut is performed to threshold the top and bottom of the distribution of numerical values. This prevents skewed color scales caused by strong outliers. The format of this should be c(x,y) where x is the lower threshold and y is the upper threshold. For example, quantileCut = c(0.025,0.975) will take the 2.5th percentile and 97.5 percentile of values and set values below/above to the value of the 2.5th and 97.5th percentile values respectively.
The name of a continuous palette from ArchRPalettes for visualizing colorBy in the embedding if a continuous color set is desired.
The name of a discrete palette from ArchRPalettes for visualizing colorBy in the embedding if a discrete color set is desired.
A boolean value that indicates whether to randomize points prior to plotting to prevent cells from one cluster being present at the front of the plot.
A boolean value that indicates whether the x and y axis ticks and labels should be plotted.
The base font size to use in the plot.
A boolean value that indicates whether to add a smoothed arrow in the embedding based on the aligned trajectory.
An integer value indicating the smoothing window for creating inferred Arrow overlay on to embedding.
A ggplot object
if (FALSE) {
p <- TrajectoryPlot(
object = obj,
reduction = "dm",
continuousSet = "blueYellow",
size = 1
)
}