plotTrajectory | R Documentation |
This function will plot a trajectory that was created onto an embedding.
plotTrajectory(
ArchRProj = NULL,
embedding = "UMAP",
trajectory = "Trajectory",
colorBy = "colData",
name = "Trajectory",
log2Norm = NULL,
imputeWeights = if (!grepl("coldata", tolower(colorBy[1]))) getImputeWeights(ArchRProj),
pal = NULL,
size = 0.2,
rastr = TRUE,
quantCut = c(0.01, 0.99),
quantHex = 0.5,
discreteSet = NULL,
continuousSet = NULL,
randomize = TRUE,
keepAxis = FALSE,
baseSize = 6,
addArrow = TRUE,
plotAs = NULL,
smoothWindow = 5,
logFile = createLogFile("plotTrajectory"),
...
)
ArchRProj |
An |
embedding |
The name of the embedding to use to visualize the given |
trajectory |
The column name in |
colorBy |
A string indicating whether points in the plot should be colored by a column in |
name |
The name of the column in |
log2Norm |
A boolean value indicating whether a log2 transformation should be performed on the values from |
imputeWeights |
The weights to be used for imputing numerical values for each cell as a linear combination of other cells'
values. See |
pal |
The name of a custom palette from |
size |
A number indicating the size of the points to plot if |
rastr |
A boolean value that indicates whether the plot should be rasterized. This does not rasterize lines and labels, just the internal portions of the plot. |
quantCut |
If this is not |
quantHex |
The numeric xth quantile of all dots within each individual hexagon will determine the numerical value for
coloring to be displayed. This occurs when (i) |
discreteSet |
The name of a discrete palette from |
continuousSet |
The name of a continuous palette from |
randomize |
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. |
keepAxis |
A boolean value that indicates whether the x and y axis ticks and labels should be plotted. |
baseSize |
The base font size to use in the plot. |
addArrow |
A boolean value that indicates whether to add a smoothed arrow in the embedding based on the aligned trajectory. |
plotAs |
A string that indicates whether points ("points") should be plotted or a hexplot ("hex") should be plotted. By default
if |
smoothWindow |
An integer value indicating the smoothing window for creating inferred Arrow overlay on to embedding. |
logFile |
The path to a file to be used for logging ArchR output. |
... |
Additional parameters to pass to |
# Get Test ArchR Project
proj <- getTestProject()
#Add Trajectory
proj <- addTrajectory(proj, trajectory = c("C1", "C2", "C3"), embedding = "UMAP", force = TRUE)
#Plot Trajectory
p <- plotTrajectory(proj, smoothWindow = 20)
#PDF
plotPDF(p, name = "Trajcetory", ArchRProj = proj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.