Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bio-differential-expression-edger-basics

БесплатноБез исполняемых скриптовНе проверен

Performs differential expression on bulk RNA-seq count data with edgeR's negative-binomial GLM and quasi-likelihood F-test framework. Covers DGEList…

lilinjiот lilinji★ 18 звёзд на GitHub

Об этом скилле

Version Compatibility

Reference examples tested with: edgeR 4.0+, limma 3.58+, statmod 1.5+ (for voom internals), tximport 1.30+ (for catchSalmon path)

Before using code patterns, verify installed versions match. If versions differ:

  • R: packageVersion('<pkg>') then ?function_name to verify parameters

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

edgeR Basics

"Find differentially expressed genes between conditions" -> Fit a negative-binomial GLM per gene with empirical-Bayes-moderated dispersions, test coefficients with the quasi-likelihood F-test (proper finite-sample FPR control), and report ranked DE lists.

The Single Most Important Modern Insight -- edgeR v4 changed the QL framework and legacy=FALSE is now default

Chen, Chen, Lun, Baldoni, Smyth (2025) Nucleic Acids Res 53(2):gkaf018 introduced a bias-corrected adjusted profile likelihood (APL) for dispersion estimation that handles small/zero counts properly, and reworked the QL framework. glmQLFit() in v4 takes legacy=FALSE by default. Old (v3) pipelines that worked perfectly in 2023 now produce subtly different numbers in 2025 -- not wrong, just different. If a tutorial result doesn't match, check which version was used; set legacy=TRUE to reproduce v3 exactly OR (preferred) re-run with v4 defaults and accept the new -- better -- numbers.

Two other v4 changes worth knowing: (1) calcNormFactors() is deprecated in favor of normLibSizes() (same function, new name); (2) method='TMM' remains the documented default; method='TMMwsp' (TMM with singleton pairing) is an alternative introduced for samples with many zeros and is the preferred choice for sparse / low-count data. Pass method= explicitly for reproducibility. Old names still work, so old scripts run, but new code should use the new names.

The choice between Wald-equivalent (glmLRT) and QL-F (glmQLFTest) is not a stylistic preference: glmQLFTest is the modern default because it accounts for uncertainty in the dispersion estimate via an additional QL dispersion. glmLRT is anti-conservative with small n. The two p-values differ -- glmQLFTest p-values are typically >= glmLRT p-values for the same model (the second-stage QL dispersion correction is usually >= 1).

Algorithmic Taxonomy

Test What it does When mandatory Failure mode
QL F-test (glmQLFit + glmQLFTest) NB GLM with second-stage QL dispersion to model dispersion uncertainty DEFAULT for any modern bulk DE None within design assumptions
LRT (glmFit + glmLRT) Likelihood-ratio of nested GLMs using point dispersion estimate Only when n>=10/group AND simple design AND no QL F-test available Anti-conservative with small n -- inflated false positives
Exact test (exactTest) Conditional NB test for two groups, no covariates Legacy; one-factor two-group ONLY Cannot adjust for batch or covariates
TREAT (glmTreat) Tests H0: LFC <= tau vs HA:
voom + lmFit + eBayes Linear model with empirical-Bayes moderation on voom-weighted log-CPM Heterogeneous library sizes (>3x); samples with widely varying quality Assumes log-normal-after-weighting; less direct count model
voomWithQualityWeights voom + per-sample quality weights from arrayWeights (Liu 2015) Some samples markedly worse quality (low RIN, contamination) With very small n, sample weights are noisy

Decision Tree by Scenario

Scenario Recommended path Why
Standard bulk RNA-seq, n>=3/group, modern script filterByExpr -> normLibSizes -> estimateDisp(robust=TRUE) -> glmQLFit(robust=TRUE) -> glmQLFTest Modern default with proper FPR control
n=2-3/group edgeR QL F-test (over DESeq2) Schurch 2016 RNA 22:839 + edgeR v4 changes: QL is the tightest FPR control at small n
Library sizes vary >3x or RIN heterogeneous voom or voomWithQualityWeights + lmFit + eBayes Precision weights downweight noisy observations per sample
Pre-specified biologically meaningful fold-change threshold glmTreat(fit, coef=..., lfc=log2(1.5)) Post-hoc filtering by
Multi-group, "any change" omnibus glmQLFTest(fit, coef=2:k) Joint F-test on multiple coefficients
Multi-group, all pairwise contrasts ~ 0 + group parameterization + makeContrasts Clean, readable contrasts
Transcript-level DE (DTE) catchSalmon() / catchKallisto() -> DGEList with overdispersion Baldoni 2024 NAR 52:e13: properly handles inferential variance
Cross-tool sanity check Run DESeq2 in parallel; expect >=70% overlap at top 500 <60% overlap sugge
Полный SKILL.md на GitHub

Установить bio-differential-expression-edger-basics в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/basic_workflow.Rexamples/batch_correction.Rexamples/contrasts.Rusage-guide.md

FAQ

Что делает скилл bio-differential-expression-edger-basics?

Performs differential expression on bulk RNA-seq count data with edgeR's negative-binomial GLM and quasi-likelihood F-test framework. Covers DGEList construction, filterByExpr, TMM/TMMwsp normalization, robust dispersion estimation, glmQLFit/glmQLFTest, TREAT for magnitude-bounded hypotheses, contrasts via no-intercept designs, voom and voomWithQualityWeights for heterogeneous samples, and the edgeR v4 bias-corrected APL changes. Use when running bulk DE with edgeR, choosing edgeR over DESeq2 (small n, transcript DE via catchSalmon, large samples), needing TREAT for a fold-change-threshold hypothesis, troubleshooting v3-to-v4 reproducibility, building paired or interaction designs, or handling library-quality heterogeneity.

Как установить скилл bio-differential-expression-edger-basics?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bio-differential-expression-edger-basics запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bio-differential-expression-edger-basics с