sc-cell-annotation
БесплатноБез исполняемых скриптовНе проверенLoad when assigning cell-type labels to a clustered scRNA AnnData via marker dictionaries, CellTypist, PopV, KNNPredict, SingleR, scmap, SCSA, or a manual…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
sc-cell-annotation
When to use
The user has a clustered AnnData (e.g. obs["leiden"]) and wants
labelled cell types in obs["cell_type"]. Pick a method by
data / reference availability:
markers(default) — built-in or custom marker-gene scoring.manual— user-supplied cluster-to-label map (--manual-mapor--manual-map-file).celltypist— pretrainedImmune_All_Low.pklstyle classifier.popv/knnpredict— reference AnnData mapping (PopV consensus or lightweight KNN).singler/scmap— R-backed reference annotation.scsa— Fisher-test DB scoring (--species,--tissue).
This skill labels — for ranking the genes that justify a label use
sc-markers; for replicate-aware condition DE use sc-de.
Inputs & Outputs
| Input | Format | Required |
|---|---|---|
| Clustered AnnData | .h5ad with normalised .X and a cluster column in obs |
yes (unless --demo) |
| Reference (popv / knnpredict / singler / scmap) | .h5ad (popv / knnpredict) or atlas selector ("HPCA", etc.) |
conditional |
Manual map (manual) |
inline string '0=T cell;1,2=Myeloid' or --manual-map-file |
conditional |
Custom marker file (markers) |
JSON / CSV via --marker-file |
optional |
| Output | Path | Notes |
|---|---|---|
| Annotated AnnData | processed.h5ad |
adds obs["cell_type"], obs["annotation_requested_method"], optional obs["annotation_score"], optional obsm["cell_type_prob"] |
| Annotation overview | tables/annotation_summary.csv |
always |
| Counts / proportions | tables/cell_type_counts.csv |
always |
| Cluster ↔ cell-type | tables/cluster_annotation_matrix.csv |
when a cluster_key is resolved |
| Figures | figures/embedding_cell_type.png, figures/embedding_cluster_vs_cell_type.png, figures/cluster_to_cell_type_heatmap.png, figures/cell_type_counts.png, figures/embedding_annotation_score.png |
last is conditional on a numeric score |
| Report | report.md + result.json |
always |
Flow
- Load AnnData; preflight method-specific requirements (e.g.,
manualneeds a map;popv/knnpredictneed a reference). - Resolve
--cluster-key(auto-pick fromleiden/louvain/cell_typeif unset). - Dispatch to the method-specific annotator (
_METHOD_DISPATCH[method]). - Record
requested_method,actual_method,used_fallback, optionalfallback_reasonintoobs+result.json. - Build counts / cluster-matrix tables and standard figures.
- Save
processed.h5ad,tables/,figures/,report.md,result.json.
Gotchas
celltypistsilently falls back to marker-based annotation.sc_annotate.py:508-518swaps toannotate_markerswhen input validation fails (e.g., wrong gene-name space, missing genes);sc_annotate.py:552-562does the same on any CellTypist runtime exception. Always checkresult.json["actual_method"]— if it differs from your--method,result.json["fallback_reason"]records why.popvactual backend is decided at runtime, not from--method.sc_annotate.py:577readsmetadata["backend"]fromapply_popv_annotation(rapids / scvi / scanvi / classical, depending on what's installed).result.json["backend"]records the actually-used backend.- R-backed
singler/scmaphard-fail when the R subprocess returns nothing.sc_annotate.py:637raisesRuntimeError("R annotation method '<m>' returned no predictions"). ConfirmR,SingleR/scmap, andSingleCellExperimentare installed before picking these methods. manualrequires a map file or inline string.sc_annotate.py:477raisesValueError("Manual annotation requires --manual-map or --manual-map-file."). Inline form:'0=T cell;1,2=Myeloid'. File form supports JSON / CSV / TSV / TXT.- Custom marker file errors are explicit.
sc_annotate.py:220raisesFileNotFoundError(f"Marker file not found: {p}");sc_annotate.py:238raisesValueError(f"No valid marker entries found in {p}")for empty / malformed JSON / CSV. --inputis mandatory unless--demo.sc_annotate.py:1541raisesValueError("--input required when not using --demo").
Key CLI
# Demo (built-in PBMC3K, marker-based)
python omicsclaw.py run sc-cell-annotation --demo --output /tmp/sc_annot_demo
# Marker-based (default) on existing leiden clusters
python omicsclaw.py run sc-cell-annotation \
--input clustered.h5ad --output results/ --cluster-key leiden
# CellTypist immune model with majority voting
python omicsclaw.py run sc-cell-annotation \
--input clustered.h5ad --output results/ \
--method celltypist --model Immune_All_Low --celltypist-majority-voting
# PopV reference mapping (provide labelled reference)
python omicsclaw.py run sc-cell-annotation \
--input clustered.h5ad --output results/ \
--method popv --reference labelled_atlas.h5ad --cluster-key leiden
# Manual relabeling
python omicsclaw.py run sc-cell-annotation \
--input clustered.h5ad --output results/ \
--method manual --cl
Установить sc-cell-annotation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sc-cell-annotation?
Load when assigning cell-type labels to a clustered scRNA AnnData via marker dictionaries, CellTypist, PopV, KNNPredict, SingleR, scmap, SCSA, or a manual cluster-to-label map. Skip when ranking marker genes per cluster (use sc-markers) or for condition-vs-control DE (use sc-de).
Как установить скилл sc-cell-annotation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-cell-annotation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set 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…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic