forked from 10XGenomics/seurat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddModuleScore.Rd
69 lines (60 loc) · 1.62 KB
/
AddModuleScore.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{AddModuleScore}
\alias{AddModuleScore}
\title{Calculate module scores for feature expression programs in single cells}
\usage{
AddModuleScore(object, features, pool = NULL, nbin = 24, ctrl = 100,
k = FALSE, assay = NULL, name = "Cluster", seed = 1)
}
\arguments{
\item{object}{Seurat object}
\item{features}{Feature expression programs in list}
\item{pool}{List of features to check expression levels agains, defaults to \code{rownames(x = object)}}
\item{nbin}{Number of bins of aggregate expression levels for all analyzed features}
\item{ctrl}{Number of control features selected from the same bin per analyzed feature}
\item{k}{Use feature clusters returned from DoKMeans}
\item{assay}{Name of assay to use}
\item{name}{Name for the expression programs}
\item{seed}{Set a random seed}
}
\value{
Returns a Seurat object with module scores added to object meta data
}
\description{
Calculate the average expression levels of each program (cluster) on single cell level,
subtracted by the aggregated expression of control feature sets.
All analyzed features are binned based on averaged expression, and the control features are
randomly selected from each bin.
}
\examples{
\dontrun{
cd_features <- list(c(
'CD79B',
'CD79A',
'CD19',
'CD180',
'CD200',
'CD3D',
'CD2',
'CD3E',
'CD7',
'CD8A',
'CD14',
'CD1C',
'CD68',
'CD9',
'CD247'
))
pbmc_small <- AddModuleScore(
object = pbmc_small,
features = cd_features,
ctrl = 5,
name = 'CD_Features'
)
head(x = pbmc_small[])
}
}
\references{
Tirosh et al, Science (2016)
}