
Run differential expression analysis with edgeR/limma-voom
run_deg_analysis.RdFilters low-expression genes, applies TMM normalization, runs voom
transformation, fits a linear model, and returns the top differentially
expressed genes via limma::topTable.
Arguments
- counts
A raw count matrix (genes x samples).
- coldata
A data frame of sample metadata whose row names match the column names of
counts.- group_col
Character. Name of the column in
coldataused as the grouping factor for differential expression.- ref_level
Character or
NULL. Reference level for the group factor. IfNULL, the default factor ordering is used.
Value
A data frame of differentially expressed genes (p.adj < 0.05) as
returned by limma::topTable, with columns logFC,
AveExpr, t, P.Value, adj.P.Val, and B.