h_diff_expr_voom: 'limma'/voom Differential Expression Analysis

View source: R/differential.R

h_diff_expr_voomR Documentation

limma/voom Differential Expression Analysis

Description

[Experimental]

This helper functions performs the differential expression analysis with the voom method from the limma package (via limma::voom(), limma::lmFit() and limma::eBayes()) for given counts in a AnyHermesData object and a corresponding design matrix.

Usage

h_diff_expr_voom(object, design, ...)

Arguments

object

(AnyHermesData)
input.

design

(matrix)
design matrix.

...

additional arguments internally passed to limma::eBayes() (robust, trend, proportion, winsor.tail.p, stdev.coef.lim).

Value

A data frame with columns log2_fc (estimated log2 fold change), stat (moderated t-statistic), p_val (raw p-value), adj_p_pval (Benjamini-Hochberg adjusted p-value).

References

\insertRef

limma_packagehermes

\insertRef

voom_methodhermes

Examples

object <- hermes_data

# Create the design matrix corresponding to the factor of interest.
design <- model.matrix(~SEX, colData(object))

# Then perform the differential expression analysis.
result <- h_diff_expr_voom(object, design)
head(result)

# Sometimes we might want to specify method details.
result2 <- h_diff_expr_voom(object, design, trend = TRUE, robust = TRUE)
head(result2)

insightsengineering/hermes documentation built on March 11, 2024, 11:04 p.m.