sc-drug-response
БесплатноБез исполняемых скриптовНе проверенLoad when scoring drug sensitivity per cluster on an annotated scRNA AnnData via simple-correlation against drug-target signatures or via CaDRReS-Sc…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
sc-drug-response
When to use
The user has a clustered / labelled scRNA AnnData with HGNC-symbol gene names and wants per-cluster drug sensitivity rankings. Two methods:
simple_correlation(default) — built-in lightweight scorer: correlates per-cluster mean expression with drug-target signatures from_BUILTIN_DRUG_TARGETS. No external models, no CaDRReS install.cadrres— runs CaDRReS-Sc against pretrained GDSC or PRISM models. Requires the CaDRReS-Sc script directory plus model files locally (cache at~/.cache/omicsclaw/cadrres/<drug-db>/).
For genetic perturbation predictions (KO / KD / overexpression on
unperturbed data) use sc-in-silico-perturbation. For real Perturb-seq
classification use sc-perturb.
Inputs & Outputs
| Input | Format | Required |
|---|---|---|
Clustered AnnData (HGNC symbols in var_names) |
.h5ad with cluster column in obs |
yes (unless --demo) |
| CaDRReS model dir | path (--model-dir) |
required for cadrres (real runs only) |
| Output | Path | Notes |
|---|---|---|
| AnnData (preserved) | processed.h5ad |
unchanged unless cluster_key was auto-resolved |
| Drug rankings | tables/drug_rankings.csv |
per-cluster × drug score table; column Score |
| Figures | figures/top_drugs_bar.png, figures/drug_cluster_heatmap.png, figures/drug_sensitivity_umap.png |
best-effort: UMAP overlay skipped when obsm["X_umap"] is missing (sc_drug_response.py:447-449); bar / heatmap calls are wrapped in try / except (:814-826) and only log on failure |
| Report | report.md + result.json |
always |
Flow
- Load AnnData; resolve
--cluster-key(auto-pick fromleiden/louvain/cell_type/ first categorical if unset). - Preflight:
cluster_keyexists + has ≥ 2 groups (warn-only on < 2); gene-name overlap with drug targets. - For
cadrres: validate--model-dirhas the GDSC / PRISM files + locate the CaDRReS-Sc script directory; run viaDrug_Responsewrapper. - For
simple_correlation: compute per-cluster expression means, correlate against_BUILTIN_DRUG_TARGETS, rank drugs per cluster. - Detect degenerate output (empty rankings / all-NaN scores) → print multi-action fix message; do NOT raise.
- Render bar / heatmap / UMAP figures, write
tables/drug_rankings.csv, savereport.md,result.json.
Gotchas
- Gene-name nomenclature is enforced.
sc_drug_response.py:193raisesValueErrorwhen 0% of_BUILTIN_DRUG_TARGETSoverlap withvar_names. The error inspects sample gene names — if they look likeENSG*/ENSMUSG*, the message points tobulkrna-geneid-mapping; otherwise tosc-standardize-input. Below 20 % overlap is a warning (not a fail) — results may still be unreliable. cadrresneeds both model files AND a CaDRReS-Sc script dir.sc_drug_response.py:146raisesFileNotFoundErrorlisting missing model files in--model-dir;sc_drug_response.py:385raises a separateFileNotFoundError("CaDRReS-Sc script directory not found.")when the script dir isn't at<model-dir>/../CaDRReS-Scor~/CaDRReS-Sc. Both error messages embed the fullCADRRES_DOWNLOAD_INSTRUCTIONS.cadrresdemo bypasses real model.sc_drug_response.py:761-764auto-generates synthetic CaDRReS scores when--method cadrres --demo— reported drugs are random; only use for plumbing checks.- Auto-cluster-key resolution falls through to "first categorical".
sc_drug_response.py:729searches("leiden", "louvain", "cluster", "cell_type", "celltype")in order;:733-737falls through to the first categorical-dtype obs column (with a warning);:739-742raisesValueError("No cluster labels found in adata.obs. Run sc-preprocessing first, or specify --cluster-key.")only when nothing is categorical. Using a stray categorical column (e.g.,sample_idcast as Category) silently produces meaningless rankings — always pass--cluster-keyexplicitly on real data. - Degenerate output is a soft fail. When
simple_correlationfinds no overlapping drug targets orcadrresreturns empty, lines 770+ print a multi-option fix message but the script returns 0. Always checkresult.json["n_drugs_scored"](line 846) —0means the run was uninformative. --inputmandatory unless--demo.sc_drug_response.py:722raisesValueError("--input required when not using --demo").- Unknown
--methodrejected post-argparse.sc_drug_response.py:767raisesValueError(f"Unknown method: {method}"). argparsechoicesshould catch this first via METHOD_REGISTRY (:697); the manual raise is a safety net.
Key CLI
# Demo (synthetic scores, simple_correlation)
python omicsclaw.py run sc-drug-response --demo --output /tmp/sc_drug_demo
# Default simple correlation against built-in drug targets
python omicsclaw.py run sc-drug-response \
--input clustered.h5ad --output results/ --cluster-key leiden
# CaDRReS with GDSC model
python omicsclaw.py run sc-drug-response \
--input cluster
Установить sc-drug-response в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sc-drug-response?
Load when scoring drug sensitivity per cluster on an annotated scRNA AnnData via simple-correlation against drug-target signatures or via CaDRReS-Sc pretrained models (GDSC / PRISM). Skip when the AnnData has no cluster labels yet (run sc-clustering first) or for predicting genetic-perturbation effects (use sc-in-silico-perturbation).
Как установить скилл sc-drug-response?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-drug-response запускает скрипты?
Нет, скилл состоит только из инструкций (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