plotTrajectory.Rd
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"),
...
)
An ArchRProject
object.
The name of the embedding to use to visualize the given trajectory
. See addEmbedding()
for more information.
The column name in cellColData
that refers the trajectory to be plotted. See addTrajectory()
for more information.
A string indicating whether points in the plot should be colored by a column in cellColData
("cellColData")
or by a data matrix in the associated ArrowFiles (i.e. "GeneScoreMatrix", "MotifMatrix", "PeakMatrix").
The name of the column in cellColData
or the featureName/rowname of the data matrix to be used for plotting.
For example if colorBy is "cellColData" then name
refers to a column name in the cellcoldata (see getCellcoldata()
). If colorBy
is "GeneScoreMatrix" then name
refers to a gene name which can be listed by getFeatures(ArchRProj, useMatrix = "GeneScoreMatrix")
.
A boolean value indicating whether a log2 transformation should be performed on the values from colorBy
.
The weights to be used for imputing numerical values for each cell as a linear combination of other cells'
values. See addImputationWeights()
and getImutationWeights()
for more information.
The name of a custom palette from ArchRPalettes
to use for coloring cells.
A number indicating the size of the points to plot if plotAs
is set to "points".
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.
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 numeric xth quantile of all dots within each individual hexagon will determine the numerical value for
coloring to be displayed. This occurs when (i) plotAs
is set to "hex" or (ii) plotAs
is set to NULL
and the values of colorBy
are numeric.
The name of a discrete palette from ArchRPalettes
for visualizing colorBy
in the embedding if a discrete color set is desired.
The name of a continuous palette from ArchRPalettes
for visualizing colorBy
in the embedding if a continuous 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.
A string that indicates whether points ("points") should be plotted or a hexplot ("hex") should be plotted. By default
if colorBy
is numeric, then plotAs
is set to "hex".
An integer value indicating the smoothing window for creating inferred Arrow overlay on to embedding.
The path to a file to be used for logging ArchR output.