Agent SkillsRunchuan-BU/BioClaw › differential-expression

differential-expression

GitHub

用于批量转录组差异表达分析,支持计数模型拟合、对比处理、阈值筛选及可视化,生成发表级图表和通路分析就绪的基因列表。

container/skills/differential-expression/SKILL.md Runchuan-BU/BioClaw

Trigger Scenarios

需要分析bulk RNA-seq或类似计数矩阵的差异表达 需要生成火山图、MA图或PCA等可视化结果 需要进行条件、治疗或基因型比较并导出显著差异基因表

Install

npx skills add Runchuan-BU/BioClaw --skill differential-expression -g -y
More Options

Non-standard path

npx skills add https://github.com/Runchuan-BU/BioClaw/tree/main/container/skills/differential-expression -g -y

Use without installing

npx skills use Runchuan-BU/BioClaw@differential-expression

指定 Agent (Claude Code)

npx skills add Runchuan-BU/BioClaw --skill differential-expression -a claude-code -g -y

安装 repo 全部 skill

npx skills add Runchuan-BU/BioClaw --all -g -y

预览 repo 内 skill

npx skills add Runchuan-BU/BioClaw --list

SKILL.md

Frontmatter
{
    "name": "differential-expression",
    "tool_type": "python",
    "description": "Bulk transcriptomics differential expression with count-aware modeling, design validation, contrast handling, thresholded exports, and publication-ready DE figures.",
    "primary_tool": "PyDESeq2"
}

Differential Expression

Version Compatibility

Reference examples assume:

  • pydeseq2 0.4+
  • pandas 2.2+
  • numpy 1.26+
  • matplotlib 3.8+

Verify before use:

  • Python: python -c "import pydeseq2, pandas; print(pydeseq2.__version__, pandas.__version__)"

Overview

Use this skill for count-based DE from bulk RNA-seq or similar count matrices when the user needs:

  • robust model fitting
  • explicit contrasts
  • ranked gene tables
  • volcano and MA plots
  • pathway-ready output tables

When To Use This Skill

  • raw count matrix and sample metadata are available
  • the task is condition, treatment, or genotype comparison
  • batch or pairing terms may need explicit modeling

Quick Route

  • no replicates: do not pretend formal DE is robust
  • 2 replicates per group: possible but conservative interpretation
  • 3 or more replicates per group: standard starting point

Progressive Disclosure

Prerequisites

Requirement Recommendation
minimum replicates per group >= 2
preferred replicates per group >= 3
input values raw integer counts

Expected Inputs

  • raw count matrix
  • sample metadata
  • explicit contrast such as treated vs control

Expected Outputs

  • results/de_results.tsv
  • results/de_ranked_genes.tsv
  • figures/volcano.pdf
  • figures/ma_plot.pdf
  • qc/sample_pca.pdf

Starter Pattern

from pydeseq2.dds import DeseqDataSet
from pydeseq2.ds import DeseqStats

dds = DeseqDataSet(
    counts=counts_df,
    metadata=metadata_df,
    design_factors=["condition", "batch"],
)
dds.deseq2()
stats = DeseqStats(dds, contrast=("condition", "treated", "control"))
stats.summary()
res = stats.results_df.sort_values("padj")
res.to_csv("results/de_results.tsv", sep="\t")

Workflow

1. Validate the design

Check:

  • replicate counts
  • factor levels
  • batch balance
  • paired structure
  • confounded variables

2. Fit a count-aware model

Use raw counts, not TPM or log-normalized expression, for count-based DE frameworks.

3. Apply explicit filtering and ranking

Common reporting thresholds:

  • padj < 0.05
  • abs(log2FoldChange) >= 1

Export both the full table and a thresholded table.

4. Visualize results

At minimum:

  • sample PCA
  • volcano plot
  • MA plot

5. Export pathway-ready artifacts

Produce a ranked gene list sorted by signed effect or Wald statistic for enrichment workflows.

Output Artifacts

results/
├── de_results.tsv
├── de_significant.tsv
└── de_ranked_genes.tsv
figures/
├── sample_pca.pdf
├── volcano.pdf
└── ma_plot.pdf
qc/
└── design_check.tsv

Quality Review

  • raw counts only for model fitting
  • no fully confounded batch and condition
  • outlier samples reviewed before publication claims
  • all final tables should include baseMean, log2FoldChange, pvalue, and padj

Anti-Patterns

  • running DE on TPM as if it were count-based
  • omitting batch or pairing terms that clearly exist
  • showing only thresholded genes and hiding the full table
  • using p-value alone without effect size

Related Skills

  • Bulk RNA Expression
  • RNA Quantification
  • Pathway Analysis

Optional Supplements

  • pydeseq2

Version History

  • a79b8c4 Current 2026-07-25 11:44

Same Skill Collection

.claude/skills/add-figure/SKILL.md
.claude/skills/add-gmail/SKILL.md
.claude/skills/add-omics-runtime-pack/SKILL.md
.claude/skills/add-telegram-swarm/SKILL.md
.claude/skills/add-telegram/SKILL.md
.claude/skills/add-voice-transcription/SKILL.md
.claude/skills/convert-to-docker/SKILL.md
.claude/skills/customize/SKILL.md
.claude/skills/debug/SKILL.md
.claude/skills/setup/SKILL.md
.claude/skills/x-integration/SKILL.md
container/skills/agent-browser/SKILL.md
container/skills/atac-seq/SKILL.md
container/skills/bio-tools/SKILL.md
container/skills/blast-search/SKILL.md
container/skills/cell-annotation/SKILL.md
container/skills/chip-seq/SKILL.md
container/skills/metagenomics/SKILL.md
container/skills/proteomics/SKILL.md
container/skills/pubmed-search/SKILL.md
container/skills/query-alphafold/SKILL.md
container/skills/query-clinvar/SKILL.md
container/skills/query-ensembl/SKILL.md
container/skills/query-geo/SKILL.md
container/skills/query-interpro/SKILL.md
container/skills/query-kegg/SKILL.md
container/skills/query-opentarget/SKILL.md
container/skills/query-pdb/SKILL.md
container/skills/query-reactome/SKILL.md
container/skills/query-stringdb/SKILL.md
container/skills/query-uniprot/SKILL.md
container/skills/report-template/SKILL.md
container/skills/scrna-preprocessing-clustering/SKILL.md
container/skills/sds-gel-review/SKILL.md
container/skills/sec-report/SKILL.md
container/skills/sequence-analysis/SKILL.md
container/skills/skills-hub/SKILL.md
container/skills/structural-biology/SKILL.md

Metadata

Files
0
Version
a79b8c4
Hash
24096a46
Indexed
2026-07-25 11:44

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 09:31
浙ICP备14020137号-1 $Гость$