sc-enrichment
БесплатноБез исполняемых скриптовНе проверенLoad when running bulk-style pathway enrichment (ORA / GSEA / GSEA-R / GSVA-R) on a per-group ranked DE / marker list against a gene-set library. Skip when…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
sc-enrichment
When to use
The user has a clustered / labelled scRNA AnnData and wants per-group pathway enrichment from a marker / DE ranking against a gene-set library. Four methods × two engines:
ora(default) — over-representation analysis on the top-K markers per group (--ora-padj-cutoff/--ora-log2fc-cutoff/--ora-max-genes).gsea— pre-ranked GSEA using the ranking metric fromsc.tl.rank_genes_groups(--gsea-ranking-metric,--gsea-min-size/--gsea-max-size, etc.).gsea_r— R-backedfgsea/clusterProfiler-style GSEA.gsva_r— GSVA per-cell or per-group score matrix (R only;--groupbyrequired).
Engine selection (--engine auto/python/r) is independent — auto
picks the right engine for the method.
For per-cell scoring (no rankings, just gene sets) use
sc-pathway-scoring. For de-novo factorisation (no gene sets) use
sc-gene-programs.
Inputs & Outputs
| Input | Format | Required |
|---|---|---|
| Clustered / labelled AnnData | .h5ad |
yes (unless --demo) |
| Gene sets | .gmt (--gene-sets) OR library alias (--gene-set-db hallmark/kegg/...) OR marker source (--gene-set-from-markers) |
yes (unless --demo) |
| Group column | --groupby (auto-resolves if unset) |
optional (required for gsva_r) |
| Output | Path | Notes |
|---|---|---|
| AnnData | processed.h5ad |
preserved with contract metadata |
| All terms | tables/enrichment_results.csv |
per-group × term, score / pvalue / pvalue_adj |
| Significant subset | tables/enrichment_significant.csv |
filtered at --fdr-threshold |
| Group summary | tables/group_summary.csv |
counts + top term per group |
| Ranking used | tables/ranking_input.csv |
the gene ranking actually fed to the method |
| Top terms | tables/top_terms.csv |
top---top-terms for figures |
| GSEA running scores | tables/gsea_running_scores.csv |
when method == gsea (Python) |
| GSVA R scores | tables/gsva_r_scores.csv |
when method == gsva_r |
| Figures | top_terms_bar.png, group_term_dotplot.png, group_enrichment_summary.png, gsea_running_scores.png, gsva_r_heatmap.png (gsva_r only) |
rendered via _lib/viz/stat_enrichment.py |
| Report | report.md + result.json |
always |
Flow
- Load AnnData (
--input) or build a demo. - Resolve gene-set source: GMT path / library alias /
--gene-set-from-markers(treats another skill's marker output as a gene-set library). - Resolve
--groupby; forora/gseabuild per-group rankings fromsc.tl.rank_genes_groupswith--ranking-method(Wilcoxon / t-test / logreg). - Filter rankings by method-specific cutoffs (
--ora-*for ORA,--gsea-*for GSEA). - Run enrichment via Python or R engine; standardise the result table to a common schema (
group,term,gene_set,source,library_mode,engine,method_used,score,pvalue,pvalue_adj, ...). - Build group-summary + top-terms tables; render figures.
- Save tables, figures,
processed.h5ad,report.md,result.json.
Gotchas
--inputisValueError, notparser.errorhere.sc_enrichment.py:280raisesValueError("--input is required unless--demois used.")(more standard than sibling skills that useparser.error/SystemExit). Once--inputis given,:284raisesFileNotFoundError(f"Input path not found: {path}")for a missing path.- One of
--gene-sets/--gene-set-db/--gene-set-from-markersis required.sc_enrichment.py:407raisesValueError("Provide either--gene-sets <local.gmt>or--gene-set-db <hallmark|kegg|...>.")when none of the three are supplied. Library aliases includehallmark,kegg,reactome,go_bp; arbitrary strings are passed through to the EnrichR library API. - Marker-as-gene-set requires specific columns.
sc_enrichment.py:367raisesFileNotFoundError(f"...")for a missing--gene-set-from-markerspath;:372raisesValueError("Marker gene-set source must containgroupandnamescolumns.")when the file is malformed (e.g., didn't come fromsc-markers/sc-de). gsva_rrequires--groupby.sc_enrichment.py:1212raisesValueError("gsva_r needs a groupby column. Use --groupby <column>."). The other 3 methods can auto-resolve--groupbyfromleiden/louvain/cell_typeif unset.- R-engine paths need bundled R scripts present.
sc_enrichment.py:620raisesFileNotFoundError(f"R script not found: {r_script}")forgsea_r;:734raises the same shape forgsva_r. These are bundled with the skill — only fails if the install is incomplete. - Zero overlap between gene sets and the dataset is a hard fail.
sc_enrichment.py:1313raisesValueError("No overlapping genes remained after aligning the selected gene sets to the dataset gene universe.")after the gene-symbol mapping step. Runsc-standardize-inputupstream if symbols don't match. result.json["method_used"]differs from--methodwhen engine routes to R.
Установить sc-enrichment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sc-enrichment?
Load when running bulk-style pathway enrichment (ORA / GSEA / GSEA-R / GSVA-R) on a per-group ranked DE / marker list against a gene-set library. Skip when computing per-cell pathway scores in-place (use sc-pathway-scoring) or for de-novo gene-program discovery (use sc-gene-programs).
Как установить скилл sc-enrichment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-enrichment запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic