技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
pydeseq2【数据与研究】Route PyDESeq2 bulk RNA-seq differential expression analysis tasks across data validation, DEA fitting, statistical results, and model internals.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task involves PyDESeq2, the Python implementation of DESeq2-like bulk RNA-seq differential expression analysis. It helps agents prepare raw count data, fit DeseqDataSet models, compute DeseqStats results, troubleshoot design/contrast problems, and inspect advanced normalization or VST internals.
python -m pip install pydeseq2.python scripts/check_pydeseq2_environment.py.DefaultInference(n_cpus=1) or a user-approved count.sub-skills/data-io-validation/SKILL.md: read this for count/metadata CSVs, orientation fixes, index alignment, AnnData construction, formula/design matrix prerequisites, and validation errors before modeling.sub-skills/dea-workflows/SKILL.md: read this for end-to-end DeseqDataSet.deseq2() workflows, single-factor and multi-factor designs, continuous covariates, outlier refit, low-memory mode, fitted object exports, and safe synthetic smoke runs.sub-skills/statistics-and-results/SKILL.md: read this after fitting a dataset to choose contrasts, run DeseqStats.summary(), interpret results_df, use thresholded tests, shrink LFCs, export tables, or create MA plots.sub-skills/model-fitting-internals/SKILL.md: read this for staged fitting order, size-factor methods, deseq2_norm* helpers, dispersion/LFC internals, Cooks outliers, VST, train/test normalization, and AnnData storage keys.from pydeseq2.dds import DeseqDataSet
from pydeseq2.default_inference import DefaultInference
from pydeseq2.ds import DeseqStats
inference = DefaultInference(n_cpus=1)
dds = DeseqDataSet(
counts=counts_df,
metadata=metadata,
design="~condition",
inference=inference,
quiet=True,
)
dds.deseq2()
stat_res = DeseqStats(dds, contrast=["condition", "B", "A"], quiet=True)
stat_res.summary()
results_df = stat_res.results_df
references/package-overview.md: package scope, supported Python/dependencies, object model, and when PyDESeq2 is or is not a fit.references/troubleshooting.md: cross-cutting install/import, dependency, plotting, CPU, data, and package-scope failures.references/repo-provenance.md: source snapshot and evidence baseline for deciding whether this skill is stale.references/repo-routing-metadata.json: structured import metadata consumed by DisCo's repo-skills-router update process.scripts/check_pydeseq2_environment.py: verifies package metadata, imports, synthetic fixture loading, and optional tiny fitting with --smoke-fit.Run the script with python scripts/check_pydeseq2_environment.py --json when another agent needs machine-readable environment facts.
DeseqDataSet stores intermediate model state in AnnData fields such as obs, var, varm, layers, obsm, and uns.DeseqDataSet.deseq2() fits the model; DeseqStats.summary() computes the result table.results_df are log2 scale; internal dds.varm["LFC"] values are natural-log scale.["condition", "B", "A"] require formula-based designs; direct design matrices generally require numeric contrast vectors.dds.to_picklable_anndata() when a fitted object must be pickled.This skill is for using PyDESeq2 as a package. It does not cover maintainer-only docs builds, release automation, or extending the repository implementation itself. For repository maintenance tasks, use a Python repository maintenance skill instead of this package-usage skill.