Differential expression per cluster
Source:R/AllGenerics.R
, R/diffExpPerCluster-methods.R
diffExpPerCluster.Rd
Differential expression per cluster
Usage
diffExpPerCluster(object, ...)
# S4 method for SingleCellExperiment
diffExpPerCluster(object, group, numerator, denominator, ...)
Arguments
- object
Object.
- group
character(1)
. Group of interest for differential expression per cluster. Must be afactor
column incolData()
.- numerator
character
. Cells to use in the numerator of the contrast (e.g. treatment).- denominator
character
. Cells to use in the denominator of the contrast (e.g. control).- ...
Passthrough arguments to
diffExp()
.
Note
Updated 2022-10-25.
Cluster identity (ident
) must be defined in colData()
for this
function to work.
Examples
data(SingleCellExperiment_Seurat, package = "AcidTest")
## SingleCellExperiment ====
if (goalie::isInstalled("edgeR")) {
object <- SingleCellExperiment_Seurat
group <- factor(c("group1", "group2"))
SummarizedExperiment::colData(object)$group <- group
suppressMessages({
x <- diffExpPerCluster(
object = object,
group = "group",
numerator = "group2",
denominator = "group1",
caller = "edgeR"
)
})
class(x)
lapply(x, class)
}
#> $`0`
#> [1] "DGELRT"
#> attr(,"package")
#> [1] "edgeR"
#>
#> $`1`
#> [1] "DGELRT"
#> attr(,"package")
#> [1] "edgeR"
#>
#> $`2`
#> [1] "DGELRT"
#> attr(,"package")
#> [1] "edgeR"
#>