本文へ移動
cccskills
無料GitHub で公開

bioconductor-edger

Estimates differential gene expression for short read sequence count using methods appropriate for count data. If you have paired data you may also want to consider Tophat/Cufflinks. Input must be raw count data for each sequence arranged i

インストール方法を見る

含まれるファイル(1)

  • SKILL.md11.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

edgeR — Comprehensive Skill Guide

Domain: RNA-seq / ChIP-seq / ATAC-seq Bioconductor: edgeR Paper: Robinson MD, McCarthy DJ, Smyth GK (2010). Bioinformatics, 26:139-140.

Empirical analysis of digital gene expression data. Handles small sample sizes well; supports a wide range of experimental designs via generalized linear models.

Dependencies & Environment

Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.

  • Version: 4.10.1 · Bioconductor: 3.23 · R: ≥ 4.6
  • Depends: limma
  • Imports: locfit
  • Install: BiocManager::install("edgeR")

When to Use

  • Bulk RNA-seq differential expression
  • ChIP-seq read count differential binding
  • ATAC-seq differential accessibility
  • Multi-group comparisons with contrasts
  • Complex experimental designs (factorial, nested, batch)

Alternatives: DESeq2, limma-voom, NOISeq

Do NOT Use When

  • Pre-normalized data (TPM, FPKM, RPKM) — requires raw counts.
  • Continuous phenotype association — use linear regression or limma.
  • Single-cell RNA-seq — use Seurat, scran, or muscat for pseudobulk.
  • Proteomics/metabolomics unless data genuinely follows negative binomial.

Data Requirements

RequirementDetails
Min Replicates≥2 per group; n=2 is supported but power is very low
Input FormatRaw integer count matrix (genes × samples)
Must Not UseNormalized values; edgeR normalizes internally via TMM
Coverage≥5M aligned reads per sample typical for bulk RNA-seq

Installation

if (!require("BiocManager", quietly=TRUE))
    install.packages("BiocManager")
BiocManager::install("edgeR")
library(edgeR)

Workflows

Standard GLM Workflow (Quasi-Likelihood)

Recommended for most RNA-seq experiments

Setup DGEList

library(edgeR)
d <- DGEList(counts=counts, group=group)

Filter and normalise

keep <- filterByExpr(d)
d <- d[keep,]
d <- calcNormFactors(d)             # TMM normalisation

Design matrix and dispersion

design <- model.matrix(~group)
d <- estimateDisp(d, design, robust=TRUE)
plotBCV(d)                          # check BCV estimates

Fit and test

fit <- glmQLFit(d, design, robust=TRUE)
qlf <- glmQLFTest(fit, coef=2)     # test second coefficient (vs intercept)
plotQLDisp(fit)                     # check quasi-likelihood dispersion
top <- topTags(qlf, n=Inf)$table
sig <- top[top$FDR < 0.05,]

Multi-group Contrasts

Pairwise comparisons between multiple groups

Build contrasts

group <- factor(c("A","A","B","B","C","C"))
design <- model.matrix(~0+group)     # no intercept for cleaner contrasts
colnames(design) <- levels(group)
d <- estimateDisp(d, design)
fit <- glmQLFit(d, design)
contr <- makeContrasts(BvsA=B-A, CvsA=C-A, BvsC=B-C, levels=design)
res_BvsA <- glmQLFTest(fit, contrast=contr[,"BvsA"])
topTags(res_BvsA)

Key Functions & Parameters

DGEList()

Container for count data

ParameterDescription
countsmatrix of raw counts (genes × samples)
groupfactor of sample groups
lib.sizeoptional: library sizes (computed automatically if absent)
norm.factorsoptional: normalisation factors

filterByExpr()

Automatic count filter — removes lowly expressed genes

ParameterDescription
yDGEList
groupfactor (uses y$samples$group if absent)
min.countminimum count per sample (default 10)
min.total.countminimum total count (default 15)

calcNormFactors()

Compute TMM normalisation factors

ParameterDescription
objectDGEList
method'TMM' (default) | 'TMMwspll' | 'RLE' | 'upperquartile' | 'none'

estimateDisp()

Estimate common and tagwise dispersions (BCV)

ParameterDescription
yDGEList
designmodel matrix from model.matrix()
robustlogical; robust estimation (default FALSE)
trend.method'locfit' | 'none' | 'movingave'

glmQLFit()

Fit quasi-likelihood negative binomial GLM (preferred for small n)

ParameterDescription
yDGEList
designmodel matrix
robustlogical; robustify prior df estimation

glmQLFTest()

Quasi-likelihood F-test for coefficient(s)

ParameterDescription
glmfitDGEGLM from glmQLFit
coefcolumn index/name of design matrix to test
contrastcontrast vector/matrix instead of coef

topTags()

Extract top DE genes from test result

ParameterDescription
objectDGELRT or DGEExact
nnumber of genes (default 10; use Inf for all)
adjust.method'BH' (default) | 'BY' | 'holm' | 'none'
sort.by'PValue' | 'logFC' | 'none'

Scientific Assumptions

The method assumes the following about your data and experiment:

  • Counts are negative binomial distributed.
  • Dispersion is shared across genes with similar expression (empirical Bayes shrinkage).
  • Most genes are NOT differentially expressed (used in TMM normalization).
  • The quasi-likelihood F-test (QLF) accounts for additional gene-level variation not captured by NB.

Result Interpretation

  • logFC: log2 fold-change; positive = higher in first group of contrast.
  • PValue / FDR: BH-adjusted FDR; standard cutoff FDR < 0.05.
  • logCPM: average log2-CPM (counts per million) — low logCPM → low-count gene, LFC less reliable.
  • F statistic (QLF): larger F = more evidence for DE; compare across genes, not absolute value.
  • Use plotBCV() to inspect biological coefficient of variation — unusually high BCV indicates outlier samples.
  • Use plotSmear() as an MA plot equivalent to check for systematic bias.

Best Practices

  • Use filterByExpr() for automatic gene filtering — it accounts for library size.
  • TMM normalisation (calcNormFactors) is the default and works well for most datasets.
  • Use glmQLFit + glmQLFTest for small sample sizes (n<10 per group).
  • Use glmFit + glmLRT for large datasets — slightly more powerful but less robust.
  • Always provide a design matrix (model.matrix()) for multi-factor experiments.
  • For pairwise contrasts use makeContrasts() — do not subset samples post-hoc.
  • Plot plotBCV(d) and plotQLDisp(fit) to check dispersion estimates.
  • For ChIP-seq: use csaw windows instead of gene-level counts.

When to Choose This vs Alternatives

AlternativePrefer this tool whenPrefer alternative when
DESeq2You need GLM quasi-likelihood tests; complex multifactor designs; very small n (n=2).You prefer apeglm LFC shrinkage or want IHW for multiple testing.
limma-voomYou have large datasets or complex contrasts that benefit from linear model flexibility.You prefer moderated t-statistics and eBayes; microarray or large n (≥5/group).

Benchmark Evidence

Key studies that have validated or benchmarked this tool:

  • Robinson MD, McCarthy DJ, Smyth GK (2010). Bioinformatics 26:139. PMID:19910308
    Original edgeR paper; empirical Bayes dispersion estimation outperforms Poisson models.

  • Law CW et al. (2014). Genome Biol 15:R29. PMID:24926665
    edgeR-QLF and limma-voom show best performance for RNA-seq DE across sample sizes.

Common Errors & Troubleshooting

Error in estimateDisp: no residual df

Cause: Saturated model — number of coefficients equals number of samples

Fix: Reduce model complexity or add replicates

dispersion values all negative

Cause: Very few samples; BCV estimate is unstable

Fix: Use estimateGLMCommonDisp with method='deviance'

From Community Q&A (Biostars)

Additional Notes from Official Documentation

Extracted from the edgeR Bioconductor vignette(s)

What is it?

edgeR is a package for differential analyses of read count data from sequencing technologies such as RNA-seq, ChIP-seq, ATAC-seq, BS-seq and CUT&RUN. It has particularly strong capabilities for expression analyses of RNA-seq data, including gene expression, transcript expression and tests for differential splicing. edgeR implements novel statistical methods based on the negative binomial distribution as a model for count variability, including empirical Bayes methods, exact tests, and generalized linear models. The package is especially suitable for analysing designed experiments with multiple experimental factors but possibly small numbers of replicates. It has unique abilities to model transcript specific variation even in small samples, a capability essential for prioritizing genes or

How to get help

The edgeR User’s Guide is available by or alternatively from the edgeR landing page . Documentation for specific functions is available through the usual R help system, e.g., ?glmFit . Further questions about the package should be directed to the Bioconductor support site .

> library(edgeR)
> edgeRUsersGuide()

Further reading

Chen Y, Chen L, Lun ATL, Baldoni PL, Smyth GK (2024). edgeR 4.0: powerful differential analysis of sequencing data with expanded functionality and improved support for small counts and larger datasets. bioRxiv doi: 10.1101/2024.01.21.576131 . Chen, Y, Pal, B, Visvader, JE, Smyth, GK (2017). Differential methylation analysis of reduced representation bisulfite sequencing experiments using edgeR. F1000Research 6, 2055. doi:10.12688/f1000research.13196.2 Chen Y, Lun ATL, Smyth GK (2016). From reads to genes to pathways: differential expression analysis of RNA-Seq experiments using Rsubread and the edgeR quasi-likelihood pipeline. F1000Research 5, 1438. doi:10.12688/f1000research.8987.2 McCarthy, DJ, Chen, Y, Smyth, GK (2012). Differential expression analysis of multifactor RNA-Seq experiment

Resources


<!-- biomate-cta -->

Run this on BioMate

This skill is the knowledge layer — when, why, and how to use edger. To run this analysis on your own data with managed compute, automated QC, and reproducible outputs, use BioMate — free to start.

▶ Open edger on BioMate →

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

The package contains functions for exploratory oligonucleotide array analysis. The dependence on tkWidgets only concerns few convenience functions. 'affy' is fully functional without it.

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

This tool uses the label-tree function from HyPhy to annotate a phylogenetic tree. It allows users to select a subset of leaves using either a regular expression or a list of sequence names, and then apply a specified label to these selecte

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

This package provides a client for the Bioconductor AnnotationHub web resource. The AnnotationHub web resource provides a central location where genomic files (e.g., VCF, bed, wig) and other resources from standard locations (e.g., UCSC, En

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

apeglm provides Bayesian shrinkage estimators for effect sizes for a variety of GLM models, using approximation of the posterior for individual coefficients.

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

ASURAT is a software for single-cell data analysis. Using ASURAT, one can simultaneously perform unsupervised clustering and biological interpretation in terms of cell type, disease, biological process, and signaling pathway activity. Inputting a single-cell RNA-seq data and knowledge-based databases, such as Cell Ontology, Gene Ontology, KEGG, etc., ASURAT transforms gene expression tables into original multivariate tables, termed sign-by-sample matrices (SSMs).

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

AUCell allows to identify cells with active gene sets (e.g. signatures, gene modules...) in single-cell RNA-seq data. AUCell uses the "Area Under the Curve" (AUC) to calculate whether a critical subset of the input gene set is enriched with

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

bioMate-AI のスキルをすべて見る

このスキルの問題を報告する