forked from satijalab/seurat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildClusterTree.Rd
72 lines (62 loc) · 2 KB
/
BuildClusterTree.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.R
\name{BuildClusterTree}
\alias{BuildClusterTree}
\title{Phylogenetic Analysis of Identity Classes}
\usage{
BuildClusterTree(
object,
assay = NULL,
features = NULL,
dims = NULL,
reduction = "pca",
graph = NULL,
slot = "data",
reorder = FALSE,
reorder.numeric = FALSE,
verbose = TRUE
)
}
\arguments{
\item{object}{Seurat object}
\item{assay}{Assay to use for the analysis.}
\item{features}{Genes to use for the analysis. Default is the set of
variable genes (\code{VariableFeatures(object = object)})}
\item{dims}{If set, tree is calculated in dimension reduction space;
overrides \code{features}}
\item{reduction}{Name of dimension reduction to use. Only used if \code{dims}
is not NULL.}
\item{graph}{If graph is passed, build tree based on graph connectivity between
clusters; overrides \code{dims} and \code{features}}
\item{slot}{slot/layer to use.}
\item{reorder}{Re-order identity classes (factor ordering), according to
position on the tree. This groups similar classes together which can be
helpful, for example, when drawing violin plots.}
\item{reorder.numeric}{Re-order identity classes according to position on
the tree, assigning a numeric value ('1' is the leftmost node)}
\item{verbose}{Show progress updates}
}
\value{
A Seurat object where the cluster tree can be accessed with \code{\link{Tool}}
}
\description{
Constructs a phylogenetic tree relating the 'aggregate' cell from each
identity class. Tree is estimated based on a distance matrix constructed in
either gene expression space or PCA space.
}
\details{
Note that the tree is calculated for an 'aggregate' cell, so gene expression
or PC scores are summed across all cells in an identity class before the
tree is constructed.
}
\examples{
\dontrun{
if (requireNamespace("ape", quietly = TRUE)) {
data("pbmc_small")
pbmc_small
pbmc_small <- BuildClusterTree(object = pbmc_small)
Tool(object = pbmc_small, slot = 'BuildClusterTree')
}
}
}
\concept{tree}