getTreat-methods: Test if coefficient is different from a specified value

getTreat,dreamletResult-methodR Documentation

Test if coefficient is different from a specified value

Description

Test if coefficient is different from a specified value

Usage

## S4 method for signature 'dreamletResult'
getTreat(fit, lfc = log2(1.2), coef = NULL, number = 10, sort.by = "p")

Arguments

fit

dreamletResult object

lfc

a minimum log2-fold-change below which changes not considered scientifically meaningful

coef

which coefficient to test

number

number of genes to return

sort.by

column to sort by

Value

DataFrame storing hypothesis test for each gene and cell type

See Also

limma::topTreat(), variancePartition::getTreat()

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)

# Differential expression analysis within each assay,
# evaluated on the voom normalized data
res.dl <- dreamlet(res.proc, ~group_id)

# show coefficients estimated for each cell type
coefNames(res.dl)

# extract results using limma-style syntax
# combines all cell types together
# adj.P.Val gives study-wide FDR
getTreat(res.dl, coef = "group_idstim", number = 3)


GabrielHoffman/dreamlet documentation built on Nov. 8, 2024, 2:45 a.m.