sc-multi-count
Merge multiple single-sample scRNA-seq count matrices (from sc-count) into one downstream-ready AnnData with sample labels.
от mdbabumiamssm★ 36 звёзд на GitHub
Установить sc-multi-count в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Multi-Sample Count Merge
You are SC Multi-Count, a specialized OmicsClaw agent for merging multiple single-sample scRNA-seq count matrices into one downstream-ready AnnData.
Why This Exists
- Without it: users manually concatenate AnnData objects, handle barcode collisions, and lose provenance metadata.
- With it: one command merges count outputs from
sc-count, labels each cell with its sample of origin, and writes a standardizedprocessed.h5ad. - Why OmicsClaw: preserves the same contract (
layers['counts'], input contract, matrix contract) that downstream skills expect.
Core Capabilities
- Multi-sample merge: outer-join concatenation with barcode prefixing.
- Sample labeling: writes
obs['sample_id']for downstream batch correction or per-sample comparison. - Stable downstream contract: writes
processed.h5adwithlayers['counts']and OmicsClaw input-contract metadata. - Standard output layer: barcode-rank, count-distribution, and sample-composition figures plus machine-readable tables.
- Reproducibility layer: writes
README.md,report.md,result.json, and rerun commands.
Input Formats
| Format | Extension | Required Fields / Structure | Example |
|---|---|---|---|
| Multiple H5AD | .h5ad |
each from sc-count output |
--input s1/processed.h5ad --input s2/processed.h5ad |
| Demo | n/a | --demo flag |
built-in split of PBMC demo |
Data / State Requirements
| Requirement | Where it should exist | Why it matters |
|---|---|---|
| Per-sample count H5AD | --input (repeated) |
each must be a count-level AnnData |
| Sample labels | --sample-id or inferred |
needed for obs['sample_id'] |
Workflow
- Load: read each input H5AD and tag with sample ID.
- Validate: check at least two inputs; warn on barcode collisions.
- Merge: outer-join concatenation with barcode prefixing to avoid collisions.
- Standardize: create
layers['counts'], record OmicsClaw contracts. - Visualize: barcode-rank, count distributions, complexity scatter, sample composition.
- Report: write
report.md,result.json, and reproducibility bundle. - Export: write
processed.h5ad.
CLI Reference
# Merge two sc-count outputs
oc run sc-multi-count \
--input sample1/processed.h5ad \
--input sample2/processed.h5ad \
--output merged/
# With explicit sample IDs
oc run sc-multi-count \
--input s1/processed.h5ad --sample-id Patient_A \
--input s2/processed.h5ad --sample-id Patient_B \
--output merged/
# Demo mode
python omicsclaw.py run sc-multi-count --demo --output /tmp/sc_multi_count_demo
Example Queries
- "把这两个样本的 count 矩阵合并到一起"
- "merge these two sc-count outputs"
- "多样本计数矩阵合并"
Algorithm / Methodology
Merge Path
- Load samples: read each
processed.h5ad, prefix barcodes with sample ID. - Outer-join concatenation: union of gene sets, zero-fill for missing genes.
- Standardize: write
layers['counts'],adata.raw, and OmicsClaw contracts. - Quality checks: detect empty samples, extreme imbalance, zero cells.
Key parameters:
| Parameter | Default | Description |
|---|---|---|
--input |
required | path to a processed.h5ad (repeat for each sample) |
--sample-id |
inferred | explicit sample label (repeat, matching order of --input) |
Visualization Contract
- Python standard gallery: barcode-rank, count distributions, complexity scatter, sample composition.
- Figure-ready exports: barcode metrics and per-sample summary under
figure_data/. - Gallery manifest:
figures/manifest.json.
Output Structure
output_directory/
├── README.md
├── report.md
├── result.json
├── processed.h5ad
├── standardized_input.h5ad -> processed.h5ad
├── figures/
│ ├── barcode_rank.png
│ ├── count_distributions.png
│ ├── count_complexity_scatter.png
│ ├── sample_composition.png
│ └── manifest.json
├── tables/
│ ├── barcode_metrics.csv
│ └── per_sample_summary.csv
├── figure_data/
│ ├── manifest.json
│ ├── barcode_metrics.csv
│ └── per_sample_summary.csv
└── reproducibility/
├── analysis_notebook.ipynb
├── commands.sh
└── requirements.txt
Workflow Position
- Upstream step:
sc-count(run once per sample to produce individualprocessed.h5adfiles) - Usual next step:
sc-qcfor quality assessment on the merged object
Recommended Next Steps
sc-qcorsc-preprocessingon the mergedprocessed.h5ad.sc-batch-integrationif samples have batch effects.
Dependencies
Required:
- Python 3
scanpy,anndata,pandas,numpy,matplotlib
CLI Parameters
| Flag | Type | Default | Description |
|---|---|---|---|
--input |
path (repeatable) | — | Path to a processed.h5ad from sc-count; repeat once per s |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sc-multi-count?
Merge multiple single-sample scRNA-seq count matrices (from sc-count) into one downstream-ready AnnData with sample labels.
Как установить скилл sc-multi-count?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-multi-count запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet 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…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…