Command Palette

Search for a command to run...

Назад к скиллам
скилл № 90290

sc-de

Differential expression for single-cell RNA-seq using exploratory Scanpy ranking, R-backed MAST, or replicate-aware pseudobulk DESeq2. The wrapper separates…

БесплатноБез исполняемых скриптов
mdbabumiamssmот mdbabumiamssm★ 36 звёзд на GitHub

Установить sc-de в Claude Code и Claude Desktop

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

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

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

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

Single-Cell Differential Expression

Why This Exists

  • Without it: users mix exploratory marker tests with replicate-aware inference and misread the results.
  • With it: the wrapper makes the statistical path explicit and preserves the public DE contract.
  • Why OmicsClaw: one interface covers quick Scanpy ranking and the heavier pseudobulk route.

Core Capabilities

  1. Five DE paths: Wilcoxon, t-test, logistic regression, MAST, and DESeq2 pseudobulk.
  2. Separation of statistical questions: exploratory single-cell ranking versus replicate-aware pseudobulk inference.
  3. Matrix-aware contract: normalized expression for ranking paths, raw counts for DESeq2 pseudobulk.
  4. Direct DE figure exports: marker dotplot and rank-gene summary where supported.
  5. Downstream-ready export: processed AnnData, DE tables, report, structured result JSON, README, and notebook artifacts.

Scope Boundary

Implemented methods:

  1. wilcoxon
  2. t-test
  3. logreg
  4. mast for R-backed hurdle-model DE
  5. deseq2_r for pseudobulk DE

Input Formats

Format Extension / form Current wrapper support Notes
AnnData .h5ad yes current direct input path
Demo --demo yes bundled fallback

Input Expectations

  • Accepted input: processed .h5ad
  • wilcoxon, t-test, logreg, and mast expect X = normalized_expression
  • deseq2_r expects raw counts, preferably in layers["counts"], otherwise aligned raw counts in adata.raw, otherwise count-like adata.X
  • All methods require a grouping column in obs
  • If you want cluster markers, this skill usually comes after sc-clustering
  • If you want replicate-aware treated-vs-control DE, this skill usually comes after sc-cell-annotation or another step that defines celltype_key

Workflow

  1. Load the AnnData object and inspect the matrix contract.
  2. Preflight the statistical question: exploratory ranking vs replicate-aware condition DE.
  3. Validate matrix state and required metadata for the requested method.
  4. Run Scanpy ranking, MAST, or pseudobulk DESeq2.
  5. Export tables, figures, figure_data, and processed.h5ad.
  6. Record method metadata for downstream traceability.

CLI Reference

python skills/singlecell/scrna/sc-de/sc_de.py \
  --input <processed.h5ad> --groupby leiden --method wilcoxon --output <dir>

python skills/singlecell/scrna/sc-de/sc_de.py \
  --input <processed.h5ad> --groupby condition \
  --group1 treated --group2 control --method t-test --output <dir>

python skills/singlecell/scrna/sc-de/sc_de.py \
  --input <processed.h5ad> --groupby leiden --method logreg \
  --logreg-solver saga --output <dir>

python skills/singlecell/scrna/sc-de/sc_de.py \
  --input <processed.h5ad> --method deseq2_r \
  --groupby condition --group1 treated --group2 control \
  --sample-key sample_id --celltype-key cell_type \
  --pseudobulk-min-cells 10 --pseudobulk-min-counts 1000 --output <dir>

Public Parameters

Parameter Role Notes
--method DE backend wilcoxon, t-test, logreg, mast, or deseq2_r
--groupby grouping column core comparison axis
--group1 / --group2 comparison levels especially important for mast and deseq2_r
--n-top-genes compact export size ranking-output control
--logreg-solver logistic-regression optimizer logreg only
--sample-key replicate/sample column required by deseq2_r
--celltype-key pseudobulk aggregation label used by deseq2_r
--pseudobulk-min-cells minimum cells per pseudobulk bin deseq2_r only
--pseudobulk-min-counts minimum counts per pseudobulk bin deseq2_r only
--padj-threshold / --log2fc-threshold figure summary thresholds mostly affects exported volcano/summary figures

Algorithm / Methodology

Exploratory ranking paths

Current OmicsClaw exploratory DE includes:

  1. wilcoxon
  2. t-test
  3. logreg
  4. mast

These paths answer the cluster-marker or group-ranking question on normalized expression from adata.X.

Replicate-aware pseudobulk path

Current OmicsClaw deseq2_r:

  1. expects raw counts, ideally from layers["counts"]
  2. aggregates counts to pseudobulk using sample_key and celltype_key
  3. runs DESeq2 through the shared R bridge

Important implementation note:

  • deseq2_r is the only path here that is explicitly replicate-aware in the current wrapper.

Output Contract

Successful runs write:

  • processed.h5ad
  • report.md
  • result.json
  • tables/de_full.csv
  • tables/markers_top.csv
  • figure_data/manifest.json
  • reproducibility/commands.sh

Visualization Contract

The current wrapper writes direct figure outputs rather than a recipe-driven gallery:

  • exploratory methods:
    • figures/marker_dotplot.png
    • figures/rank_genes_groups.png
    • figures/de_effect_summary.png
    • `f
Полный SKILL.md на GitHub

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

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

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

FAQ

Что делает скилл sc-de?

Differential expression for single-cell RNA-seq using exploratory Scanpy ranking, R-backed MAST, or replicate-aware pseudobulk DESeq2. The wrapper separates cluster/group marker ranking from sample-aware condition DE.

Как установить скилл sc-de?

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

Скилл sc-de запускает скрипты?

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

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

Сравнить sc-de с