sc-doublet-detection
БесплатноБез исполняемых скриптовНе проверенLoad when annotating putative doublets in single-cell RNA-seq using Scrublet, DoubletDetection, DoubletFinder, scDblFinder, or scds. Skip when ambient RNA is…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
sc-doublet-detection
When to use
The user has filtered (or at least QC'd) single-cell counts and wants
to flag putative doublet barcodes before clustering / annotation.
Five backends share one CLI: scrublet (default, Python), doubletdetection
(Python), doubletfinder (R), scdblfinder (R), scds (R). Per-cell
scores + binary calls land in obs; this skill annotates, it does not
remove cells (filter downstream with obs["is_doublet"]).
Inputs & Outputs
| Input | Format | Required |
|---|---|---|
| Single-cell AnnData | .h5ad (post-sc-filter) |
yes (unless --demo) |
| Output | Path | Notes |
|---|---|---|
| Annotated AnnData | processed.h5ad |
adds obs["doublet_score"], obs["is_doublet"] |
| Per-cell calls | tables/doublet_calls.csv |
per-barcode scores + flags |
| Run summary | tables/summary.csv |
counts of doublets by group / threshold |
| Per-group breakdown | tables/group_summary.csv |
only when --batch-key is set |
| Score distribution | figures/doublet_score_distribution.png |
always rendered |
| Report | report.md + result.json |
always written |
Flow
- Load AnnData; resolve
--methodagainst theMETHOD_REGISTRY. - Run the chosen backend (R-backed methods need a working R + rpy2 stack).
- If the requested R backend fails, fall back deterministically to a Python sibling.
- Apply the chosen
--threshold(or method default) to score → call. - Write
obs["is_doublet"]+obs["doublet_score"]; emit tables and the score-distribution figure. - Save
processed.h5ad+report.md+result.json.
Gotchas
- R backends silently fall back.
sc_doublet.py:304logs"DoubletFinder runtime failed (...). Falling back to scDblFinder."and continues;sc_doublet.py:359does the same forscds → cxds. After every R-method run, confirmresult.json["summary"]["method_used"]matches what you asked for — the--method doubletfinderflag does not guarantee DoubletFinder ran. - Explicit
--scds-mode(e.g.bcdsorhybrid) silently falls back to thecxdsdefault on failure.sc_doublet.py:359swaps modes when the requested one raises; the requested mode is not surfaced as an error, only logged. Inspect the warning log when the report claimsscdsran with the default. - No cells are removed. This skill annotates barcodes; downstream filtering on
obs["is_doublet"]is the user's responsibility. Ifsc-filterwas already run, doublets re-introduce themselves to the cluster graph if not filtered after this step. - Group summary is conditional.
tables/group_summary.csvis only written when--batch-keyis set; absence does not mean failure. - Embedding pre-flight is non-fatal.
sc_doublet.py:429logs"Preview embedding computation failed"and continues; the score-distribution figure still renders without the embedding overlay. When the figure looks sparse vs documented examples, check the warning log before assuming a bug. - Unsupported method → hard fail.
sc_doublet.py:801raisesValueError("Unsupported method: ...")for typos like--method scrubblet.
Key CLI
# Demo (Scrublet)
python omicsclaw.py run sc-doublet-detection --demo --output /tmp/sc_doublet_demo
# Default Scrublet, with batch-aware grouping
python omicsclaw.py run sc-doublet-detection \
--input filtered.h5ad --output results/ --batch-key sample_id
# scDblFinder with custom expected rate + threshold
python omicsclaw.py run sc-doublet-detection \
--input filtered.h5ad --output results/ \
--method scdblfinder --expected-doublet-rate 0.1 --threshold 0.4
See also
references/parameters.md— every CLI flag and per-method tuning hintreferences/methodology.md— when each backend wins, R vs Python tradeoffsreferences/output_contract.md—obskeys added + table schemas- Adjacent skills:
sc-ambient-removal(parallel — fixes ambient RNA, complementary to doublet removal),sc-filter(upstream — typically run before this),sc-clustering(downstream — filter doublets out before clustering)
Установить sc-doublet-detection в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sc-doublet-detection?
Load when annotating putative doublets in single-cell RNA-seq using Scrublet, DoubletDetection, DoubletFinder, scDblFinder, or scds. Skip when ambient RNA is the contamination problem (use sc-ambient-removal) or before counts exist (use sc-fastq-qc / sc-count).
Как установить скилл sc-doublet-detection?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-doublet-detection запускает скрипты?
Нет, скилл состоит только из инструкций (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