Skip to contents

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 a factor column in colData().

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().

Value

list containing:

  • caller = "edgeR": DGELRT.

  • caller = "DESeq2": DESeqResults.

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"
#>