sc-multi-count
FreeNo executable scriptsNot checkedMerge multiple single-sample scRNA-seq count matrices (from sc-count) into one downstream-ready AnnData with sample labels.
by mdbabumiamssm★ 36 GitHub starsAbout this skill
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 |
Install sc-multi-count in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the sc-multi-count skill do?
Merge multiple single-sample scRNA-seq count matrices (from sc-count) into one downstream-ready AnnData with sample labels.
How do I install the sc-multi-count skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the sc-multi-count skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
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…
by 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…
by 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…
by 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…
by Anthropic