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★ 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
- Five DE paths: Wilcoxon, t-test, logistic regression, MAST, and DESeq2 pseudobulk.
- Separation of statistical questions: exploratory single-cell ranking versus replicate-aware pseudobulk inference.
- Matrix-aware contract: normalized expression for ranking paths, raw counts for DESeq2 pseudobulk.
- Direct DE figure exports: marker dotplot and rank-gene summary where supported.
- Downstream-ready export: processed AnnData, DE tables, report, structured result JSON, README, and notebook artifacts.
Scope Boundary
Implemented methods:
wilcoxont-testlogregmastfor R-backed hurdle-model DEdeseq2_rfor 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, andmastexpectX = normalized_expressiondeseq2_rexpects raw counts, preferably inlayers["counts"], otherwise aligned raw counts inadata.raw, otherwise count-likeadata.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-annotationor another step that definescelltype_key
Workflow
- Load the AnnData object and inspect the matrix contract.
- Preflight the statistical question: exploratory ranking vs replicate-aware condition DE.
- Validate matrix state and required metadata for the requested method.
- Run Scanpy ranking, MAST, or pseudobulk DESeq2.
- Export tables, figures,
figure_data, andprocessed.h5ad. - 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:
wilcoxont-testlogregmast
These paths answer the cluster-marker or group-ranking question on normalized expression from adata.X.
Replicate-aware pseudobulk path
Current OmicsClaw deseq2_r:
- expects raw counts, ideally from
layers["counts"] - aggregates counts to pseudobulk using
sample_keyandcelltype_key - runs DESeq2 through the shared R bridge
Important implementation note:
deseq2_ris the only path here that is explicitly replicate-aware in the current wrapper.
Output Contract
Successful runs write:
processed.h5adreport.mdresult.jsontables/de_full.csvtables/markers_top.csvfigure_data/manifest.jsonreproducibility/commands.sh
Visualization Contract
The current wrapper writes direct figure outputs rather than a recipe-driven gallery:
- exploratory methods:
figures/marker_dotplot.pngfigures/rank_genes_groups.pngfigures/de_effect_summary.png- `f
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
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), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…