sc-markers
БесплатноБез исполняемых скриптовНе проверенLoad when ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity. Skip when…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
sc-markers
When to use
The user already has clustering / cell-type labels in obs (typically
leiden, louvain, or cell_type) and wants ranked marker genes per
group as evidence for downstream annotation or interpretation. Four
methods: wilcoxon (default rank-sum), t-test (Welch), logreg
(multinomial logistic regression — discriminative ranking), cosg
(fast cosine-specificity scoring without p-values). This is for
cluster markers, not condition contrasts — for treatment-vs-control
DE with replicates use sc-de.
Inputs & Outputs
| Input | Format | Required |
|---|---|---|
| Clustered AnnData | .h5ad with normalised expression in .X and a grouping column in obs |
yes (unless --demo) |
| Output | Path | Notes |
|---|---|---|
| AnnData (cleaned) | processed.h5ad |
drops uns["rank_genes_groups"] / uns["rank_genes_groups_filtered"] to keep file small; preserves obs/obsm |
| All markers | tables/markers_all.csv |
one row per (group, gene) — fold-change, scores, fractions, optional p-values |
| Top per group | tables/markers_top.csv |
top---n-top per group used by figures |
| Per-cluster summary | tables/cluster_summary.csv |
marker counts + top genes per group |
| Marker figures | figures/markers_heatmap.png, figures/markers_dotplot.png, figures/marker_effect_summary.png, figures/marker_cluster_summary.png, figures/marker_fraction_scatter.png |
always (last is fraction-only) |
| Report | report.md + result.json |
always |
Flow
- Load AnnData; resolve
--groupby(auto-detect fromleiden/louvain/cell_typeif unset). - Validate parameters (
n_top ≥ 1, fractions in[0, 1],muin[0, 1]). - Run the selected ranker against
adata.X(treated as normalised expression). - Apply post-filters (
--min-in-group-fraction,--min-fold-change,--max-out-group-fraction). - Build top-N table, per-cluster summary, and figure-data CSVs.
- Save
processed.h5ad(withrank_genes_groups*purged fromuns),tables/,figures/,report.md,result.json.
Gotchas
--groupbyauto-detection requires a recognised column.sc_markers.py:135raisesValueError("Grouping column '...' not found in adata.obs")for an explicit-but-missing key;:137raisesValueError('No cluster/cell-type grouping column available for marker discovery.')when nothing amongleiden/louvain/cell_typeexists. Runsc-clusteringfirst or pass--groupby <real-obs-column>.cosgreturns no p-values.sc_markers.py:91-94registerscosgas a cosine-similarity specificity scorer —tables/markers_all.csvwill lackpvals/pvals_adjcolumns. Downstream filters that branch on adjusted p-value must handle the method ==cosgcase.--muiscosg-only.sc_markers.py:373setsresult.json["mu"] = args.mu if method == 'cosg' else None. Passing--muwith another method silently recordsNone.adata.Xis treated as normalised expression with no guard.sc_markers.pysetsexpression_source = 'adata.X'without verifying.Xis log-normalised. If.Xstill holds raw counts (e.g., the user skippedsc-preprocessing), the Wilcoxon / t-test runs on counts and the rankings are unreliable.--inputis mandatory unless--demo.sc_markers.py:316raisesValueError('--input required when not using --demo').
Key CLI
# Demo (built-in PBMC3K with leiden labels)
python omicsclaw.py run sc-markers --demo --output /tmp/sc_markers_demo
# Default Wilcoxon on leiden clusters
python omicsclaw.py run sc-markers \
--input clustered.h5ad --output results/ --groupby leiden
# COSG fast specificity ranking on a labelled AnnData
python omicsclaw.py run sc-markers \
--input annotated.h5ad --output results/ \
--groupby cell_type --method cosg --mu 1.0
# Strict marker filtering (high fold-change, low out-group fraction)
python omicsclaw.py run sc-markers \
--input clustered.h5ad --output results/ \
--min-fold-change 1.0 --max-out-group-fraction 0.2
See also
references/parameters.md— every CLI flag and per-method tuning hintreferences/methodology.md— Wilcoxon vs t-test vs logreg vs COSG; when each winsreferences/output_contract.md—markers_all.csvcolumn schema; figures' figure_data CSVs- Adjacent skills:
sc-clustering(upstream — produces theleiden/louvaincolumn),sc-cell-annotation(downstream — uses these markers as evidence for label assignment),sc-de(parallel — replicate-aware condition contrasts, NOT cluster markers)
Установить sc-markers в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sc-markers?
Load when ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity. Skip when comparing condition-vs-control with replicates (use sc-de) or for assigning cell-type labels (use sc-cell-annotation).
Как установить скилл sc-markers?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-markers запускает скрипты?
Нет, скилл состоит только из инструкций (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