Description Usage Arguments Value Note See Also Examples
View source: R/visualization.R
Graphs the output of a dimensional reduction technique on a 2D scatter plot where each point is a cell and it's positioned based on the cell embeddings determined by the reduction technique. By default, cells are colored by their identity class (can be changed with the group.by parameter).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | DimPlot(
object,
dims = c(1, 2),
cells = NULL,
cols = NULL,
pt.size = NULL,
reduction = NULL,
group.by = NULL,
split.by = NULL,
shape.by = NULL,
order = NULL,
shuffle = FALSE,
seed = 1,
label = FALSE,
label.size = 4,
label.color = "black",
label.box = FALSE,
repel = FALSE,
cells.highlight = NULL,
cols.highlight = "#DE2D26",
sizes.highlight = 1,
na.value = "grey50",
ncol = NULL,
combine = TRUE,
raster = NULL,
raster.dpi = c(512, 512)
)
PCAPlot(object, ...)
TSNEPlot(object, ...)
UMAPPlot(object, ...)
|
object |
Seurat object |
dims |
Dimensions to plot, must be a two-length numeric vector specifying x- and y-dimensions |
cells |
Vector of cells to plot (default is all cells) |
cols |
Vector of colors, each color corresponds to an identity class. This may also be a single character
or numeric value corresponding to a palette as specified by |
pt.size |
Adjust point size for plotting |
reduction |
Which dimensionality reduction to use. If not specified, first searches for umap, then tsne, then pca |
group.by |
Name of one or more metadata columns to group (color) cells by (for example, orig.ident); pass 'ident' to group by identity class |
split.by |
Name of a metadata column to split plot by;
see |
shape.by |
If NULL, all points are circles (default). You can specify any
cell attribute (that can be pulled with FetchData) allowing for both
different colors and different shapes on cells. Only applicable if |
order |
Specify the order of plotting for the idents. This can be useful for crowded plots if points of interest are being buried. Provide either a full list of valid idents or a subset to be plotted last (on top) |
shuffle |
Whether to randomly shuffle the order of points. This can be useful for crowded plots if points of interest are being buried. (default is FALSE) |
seed |
Sets the seed if randomly shuffling the order of points. |
label |
Whether to label the clusters |
label.size |
Sets size of labels |
label.color |
Sets the color of the label text |
label.box |
Whether to put a box around the label text (geom_text vs geom_label) |
repel |
Repel labels |
cells.highlight |
A list of character or numeric vectors of cells to
highlight. If only one group of cells desired, can simply
pass a vector instead of a list. If set, colors selected cells to the color(s)
in |
cols.highlight |
A vector of colors to highlight the cells as; will repeat to the length groups in cells.highlight |
sizes.highlight |
Size of highlighted cells; will repeat to the length groups in cells.highlight |
na.value |
Color value for NA points when using custom scale |
ncol |
Number of columns for display when combining plots |
combine |
Combine plots into a single |
raster |
Convert points to raster format, default is |
raster.dpi |
Pixel resolution for rasterized plots, passed to geom_scattermore(). Default is c(512, 512). |
... |
Extra parameters passed to |
A patchworked
ggplot object if
combine = TRUE
; otherwise, a list of ggplot objects
For the old do.hover
and do.identify
functionality, please see
HoverLocator
and CellSelector
, respectively.
FeaturePlot
HoverLocator
CellSelector
FetchData
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.