AGENT SKILL

bulk-rna-seq

Bulk RNA-seq differential expression — experimental design, count modeling with DESeq2/edgeR, and enrichment.

License 许可
MIT
所属仓库
TanNhatCMS/jarvis
最近更新
2026-11-07
Stars
★ 0
Forks
1

01 前言 Front Matter

name
bulk-rna-seq
category
scientific
description
Bulk RNA-seq differential expression — experimental design, count modeling with DESeq2/edgeR, and enrichment.

03 SKILL.md 正文

Overview

bulk-rna-seq covers the standard bulk RNA-seq workflow: experimental design (replicates, batching, depth), read quantification, differential expression with DESeq2/edgeR/limma-voom, and downstream interpretation (enrichment, visualization). Bulk RNA-seq remains the workhorse transcriptomic assay — cheaper and statistically better-powered than single-cell for condition comparisons.

When to use

  • Experimental design: replicate numbers, randomization, batch planning, depth.
  • Quantification: Salmon/kallisto (fast, bias-aware) vs STAR + featureCounts.
  • Differential expression: DESeq2, edgeR, limma-voom — choosing and configuring.
  • Contrasts and complex designs: interactions, time series, paired designs.
  • QC: PCA, sample correlations, outlier handling, batch-effect diagnosis.
  • Enrichment: ORA, GSEA, and background-set discipline.
  • Visualization: volcano plots, heatmaps, MA plots.

Core concepts

  • Design first. ≥3 biological replicates per condition (more for variable systems — clinical samples need 6+); randomize processing order; block batches across conditions (never confound batch with condition — the cardinal sin); decide depth by question (20-30M reads standard; more for splicing/rare transcripts). Power analysis via Scotty/RNASeqPower for grant proposals.
  • Quantification. Salmon/kallisto with GC/sequence-bias correction are fast and accurate for gene-level DE; STAR + featureCounts when you need alignments (splicing, variants). Summarize to gene level with tximport (transcript-level uncertainty matters — don't ignore it). Use the same annotation (GENCODE/Ensembl version) throughout.
  • Count models. RNA-seq counts are overdispersed — Poisson is wrong. DESeq2/edgeR fit negative binomial models with empirical-Bayes dispersion shrinkage; limma-voom transforms for linear modeling (good for complex designs). All three agree most of the time — pick one and know it well.
  • Normalization. DESeq2 size factors / edgeR TMM estimate library-size + compositional effects. Never run DE on TPM/FPKM/RPKM. Check size factors for outliers (a sample with extreme size factor is telling you something).
  • The DESeq2 workflow. DESeqDataSetFromTximport → DESeq → results with contrast → lfcShrink (apeglm/ashr — shrinkage stabilizes noisy fold changes, essential for ranking and visualization) → FDR control (Benjamini-Hochberg, typically padj < 0.05 + |log2FC| threshold chosen biologically, not by default).
  • QC before DE. PCA and sample-distance heatmaps first: outliers, batch effects, and mislabeled samples show up here. Investigate before modeling — removing an outlier post-hoc because it "ruins" the result is p-hacking; prespecified QC criteria aren't.
  • Batch effects. Include batch in the design formula when unconfounded; use RUVSeq/sva when batch is unknown but PCA shows structure; ComBat-seq for batch-corrected counts. If batch is confounded with condition, the experiment is uninterpretable — redesign, don't "correct."
  • Enrichment. ORA (hypergeometric on DE gene lists — threshold-dependent, use the detected gene universe as background, not the whole genome); GSEA (ranked-list, no threshold — generally preferred); both need multiple-testing correction and redundancy-aware interpretation (GO terms overlap heavily — use REVIGO or enrichment maps). An enriched pathway is a hypothesis, not a mechanism.
  • Complex designs. Paired samples (~patient + condition), interactions (~genotype*treatment), time series (likelihood-ratio tests, impulse models). Write the design formula from the experimental structure, not by trial and error.

Practical workflow

  1. Design. Replicates, randomization, batch blocking, depth — on paper, before libraries.
  2. Quantify. Salmon with bias correction → tximport to gene level; MultiQC over logs.
  3. QC. PCA, distances, size factors; handle outliers by prespecified criteria.
  4. Model. DESeq2/edgeR with the design reflecting the experiment; check dispersion plots.
  5. Extract. Contrasts of interest; lfcShrink; padj + effect-size thresholds.
  6. Interpret. Volcano/MA plots; GSEA on ranked lists; heatmaps of top genes (z-scored, annotated with condition bars).
  7. Validate. qPCR on key genes (independent samples ideally); functional follow-up for load-bearing claims.
  8. Report. Design, software versions, thresholds, full results tables (not just "significant" genes), GEO deposition.

Example (R sketch):

library(DESeq2)
dds <- DESeqDataSetFromTximport(txi, colData, ~batch + condition)
dds <- DESeq(dds)
res <- lfcShrink(dds, coef="condition_treated_vs_control", type="apeglm")
plotMA(res); EnhancedVolcano(res, lab=rownames(res), x="log2FoldChange", y="padj")

Common pitfalls

  • Batch confounded with condition (unfixable).
  • DE on TPM/FPKM instead of raw counts.
  • Unshrunk log2FCs ranked and interpreted (noise at low counts).
  • Outliers removed post-hoc to improve results.
  • GO enrichment with whole-genome background (inflated).
  • Enriched pathways reported as mechanistic findings.
  • n=2 per group presented as adequately powered.

04 同仓库更多 Skills

TanNhatCMS
TanNhatCMS/jarvis

web-scrape

Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open/fetch fails on JS-heavy pages, or when you need clean markdown/structured extraction from a site. Requires FIRECRAWL_API_KEY.

★ 0
TanNhatCMS
TanNhatCMS/jarvis

design-taste-frontend

tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML/CSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, "AI-made", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.

★ 0
TanNhatCMS
TanNhatCMS/jarvis

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code

★ 0
TanNhatCMS
TanNhatCMS/jarvis

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

★ 0
TanNhatCMS
TanNhatCMS/jarvis

requesting-code-review

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

★ 0
TanNhatCMS
TanNhatCMS/jarvis

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

★ 0