forked from satijalab/seurat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathColorDimSplit.Rd
88 lines (82 loc) · 3.88 KB
/
ColorDimSplit.Rd
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization.R
\name{ColorDimSplit}
\alias{ColorDimSplit}
\title{Color dimensional reduction plot by tree split}
\usage{
ColorDimSplit(
object,
node,
left.color = "red",
right.color = "blue",
other.color = "grey50",
...
)
}
\arguments{
\item{object}{Seurat object}
\item{node}{Node in cluster tree on which to base the split}
\item{left.color}{Color for the left side of the split}
\item{right.color}{Color for the right side of the split}
\item{other.color}{Color for all other cells}
\item{...}{
Arguments passed on to \code{\link[=DimPlot]{DimPlot}}
\describe{
\item{\code{dims}}{Dimensions to plot, must be a two-length numeric vector specifying x- and y-dimensions}
\item{\code{cells}}{Vector of cells to plot (default is all cells)}
\item{\code{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 \code{\link[RColorBrewer]{brewer.pal.info}}.
By default, ggplot2 assigns colors. We also include a number of palettes from the pals package.
See \code{\link{DiscretePalette}} for details.}
\item{\code{pt.size}}{Adjust point size for plotting}
\item{\code{reduction}}{Which dimensionality reduction to use. If not specified, first searches for umap, then tsne, then pca}
\item{\code{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}
\item{\code{split.by}}{Name of a metadata column to split plot by;
see \code{\link{FetchData}} for more details}
\item{\code{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}
\item{\code{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)}
\item{\code{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)}
\item{\code{seed}}{Sets the seed if randomly shuffling the order of points.}
\item{\code{label}}{Whether to label the clusters}
\item{\code{label.size}}{Sets size of labels}
\item{\code{label.color}}{Sets the color of the label text}
\item{\code{label.box}}{Whether to put a box around the label text (geom_text vs
geom_label)}
\item{\code{repel}}{Repel labels}
\item{\code{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 \code{cols.highlight} and other cells black (white if dark.theme = TRUE);
will also resize to the size(s) passed to \code{sizes.highlight}}
\item{\code{cols.highlight}}{A vector of colors to highlight the cells as; will
repeat to the length groups in cells.highlight}
\item{\code{sizes.highlight}}{Size of highlighted cells; will repeat to the length
groups in cells.highlight}
\item{\code{na.value}}{Color value for NA points when using custom scale}
\item{\code{ncol}}{Number of columns for display when combining plots}
\item{\code{combine}}{Combine plots into a single \code{\link[patchwork]{patchwork}ed}
ggplot object. If \code{FALSE}, return a list of ggplot objects}
}}
}
\value{
Returns a DimPlot
}
\description{
Returns a DimPlot colored based on whether the cells fall in clusters
to the left or to the right of a node split in the cluster tree.
}
\examples{
pbmc_small
pbmc_small <- BuildClusterTree(object = pbmc_small, verbose = FALSE)
PlotClusterTree(pbmc_small)
ColorDimSplit(pbmc_small, node = 5)
}
\seealso{
\code{\link{DimPlot}}
}