This function will plot Trajectory in seurat object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | plotSeuratTrajectory(
object = NULL,
embedding = "umap",
trajectory = "Trajectory",
name = "Trajectory",
colorBy = "cellcoldata",
log2Norm = TRUE,
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,
plotAs = NULL,
smoothWindow = 5,
addFit = NULL,
addArrow = TRUE,
...
)
|
embedding |
A string indicating the name of the 'embedding' object from the 'seurat' that should be used for embedding plot. |
trajectory |
The order of cell groups to be used for constraining the initial supervised fitting procedure. For example, to get a trajectory from Cluster1 to Cluster2 to Cluster3, input should be c("Cluster1", "Cluster2", "Cluster3"). Cells will then be used from these 3 groups to constrain an initial fit in the group order. |
name |
A string indicating the name in 'meta.data'. |
colorBy |
A string indicating the column name from 'meta.data' or feature in slot data,eg(data,counts,scale.data) |
log2Norm |
A boolean value indicating whether a log2 transformation should be performed on the values from 'colorBy'. |
pal |
The name of a custom palette from 'ArchRPalettes' to use for coloring cells. |
size |
A number indicating the size of the points to plot if 'plotAs' is set to "points". |
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 '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. |
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) 'plotAs' is set to "hex" or (ii) 'plotAs' is set to 'NULL' and the values of 'colorBy' are numeric. |
discreteSet |
The name of a discrete palette from 'ArchRPalettes' for visualizing 'colorBy' in the embedding if a discrete color set is desired. |
continuousSet |
The name of a continuous palette from 'ArchRPalettes' for visualizing 'colorBy' in the embedding if a continuous color set is desired. |
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. |
plotAs |
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". |
smoothWindow |
An integer value indicating the smoothing window for creating inferred Arrow overlay on to embedding. |
addArrow |
A boolean value that indicates whether to add a smoothed arrow in the embedding based on the aligned trajectory. |
... |
Additional parameters to pass to 'ggPoint()' or 'ggHex()'. |
seurat |
An 'Seurat' object. |
imputeWeights |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.