Skip to contents

Get coefficient names

Usage

coefNames(obj)

# S4 method for dreamletResult
coefNames(obj)

Arguments

obj

A dreamletResult object

Value

array storing names of coefficients

Examples

library(muscat)
library(SingleCellExperiment)

data(example_sce)

# create pseudobulk for each sample and cell cluster
pb <- aggregateToPseudoBulk(example_sce,
  assay = "counts",
  cluster_id = "cluster_id",
  sample_id = "sample_id",
  verbose = FALSE
)

# voom-style normalization
res.proc <- processAssays(pb, ~group_id)
#>   B cells...
#> 0.26 secs
#>   CD14+ Monocytes...
#> 0.38 secs
#>   CD4 T cells...
#> 0.29 secs
#>   CD8 T cells...
#> 0.3 secs
#>   FCGR3A+ Monocytes...
#> 0.41 secs

# Differential expression analysis within each assay,
# evaluated on the voom normalized data
res.dl <- dreamlet(res.proc, ~group_id)
#>   B cells...
#> 0.22 secs
#>   CD14+ Monocytes...
#> 0.25 secs
#>   CD4 T cells...
#> 0.24 secs
#>   CD8 T cells...
#> 0.29 secs
#>   FCGR3A+ Monocytes...
#> 1.1 secs

# show coefficients estimated for each cell type
coefNames(res.dl)
#> [1] "(Intercept)"  "group_idstim"