spatial-preprocess
БесплатноБез исполняемых скриптовНе проверенLoad matrix-level spatial transcriptomics data (including raw_counts.h5ad from spatial-raw-processing), run the current OmicsClaw scanpy-standard…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
🔬 Spatial Preprocess
You are Spatial Preprocess, the OmicsClaw skill for loading raw spatial
transcriptomics data and converting it into a downstream-ready AnnData under
the current scanpy_standard workflow. The wrapper now exposes a unified
Python gallery, figure-ready exports, and optional R-side customization
without changing the underlying preprocessing assumptions.
Why This Exists
- Without it: users manually combine loading, QC, normalization, HVG selection, PCA, neighbors, and clustering with inconsistent defaults.
- With it: one command produces a standardized
processed.h5ad, QC-aware figures, clustering summaries, figure-ready CSV exports, and reproducibility helpers. - Upstream boundary: if the user still has FASTQ pairs plus barcode-coordinate metadata, they should run
spatial-raw-processingfirst. - Why OmicsClaw: the wrapper preserves raw counts, records the actual effective QC thresholds, keeps platform-specific loading separate from the scientific preprocessing steps, and uses one stable output contract for downstream tools.
Core Capabilities
- Current workflow:
scanpy_standard: QC, normalization,seurat_v3HVG selection, PCA, neighbors, UMAP, and Leiden clustering. - Multi-platform loading: Visium directories / h5 / h5ad, Xenium zarr / h5ad, and converted
.h5adinputs for MERFISH / Slide-seq / seqFISH. - QC filtering: spot or cell filtering using
min_genes,min_cells,max_mt_pct, and optionalmax_genes. - Tissue-aware presets: optional wrapper-level presets for common tissues such as brain, heart, tumor, and lung.
- Raw-count preservation: raw counts are stored in both
adata.layers["counts"]andadata.rawbefore normalization. - Graph embedding: PCA, neighbor graph, and UMAP.
- Clustering: primary Leiden clustering plus optional multi-resolution sweeps.
- Standard Python gallery: emits a recipe-driven preprocessing gallery with clustering overview, QC diagnostics, PCA guidance, and threshold-context panels.
- Figure-ready exports: writes
figure_data/CSVs plus a manifest so downstream tools can restyle the same preprocessing result without recomputing QC or clustering. - Structured exports: writes
report.md,result.json, summary tables, reproducibility helpers, and an optional R visualization entrypoint.
Input Formats
| Format | Extension | Required Fields | Example |
|---|---|---|---|
| OmicsClaw raw spatial counts | .h5ad |
raw_counts.h5ad emitted by spatial-raw-processing |
raw_counts.h5ad |
| AnnData raw | .h5ad |
count matrix in X; spatial coordinates recommended |
raw_visium.h5ad |
| 10x Visium directory | directory | Space Ranger-style output | visium_output/ |
| 10x feature matrix | .h5 / .hdf5 |
filtered feature matrix | filtered_feature_bc_matrix.h5 |
| Xenium zarr | .zarr or directory |
Xenium export readable by anndata.read_zarr |
xenium_sample.zarr |
| Converted MERFISH / Slide-seq / seqFISH | .h5ad |
expression matrix, ideally with coordinates | merfish_converted.h5ad |
| Demo | n/a | --demo flag |
built-in Visium-like demo |
Upstream Boundary
If the user still has sequencing-level inputs such as FASTQ pairs plus an IDs
barcode-coordinate file and STAR reference files, this is not the correct
entry point. Run spatial-raw-processing first, then pass the resulting
raw_counts.h5ad into spatial-preprocess.
Current Loader Behavior
| Data type | Current wrapper behavior |
|---|---|
visium |
tries sc.read_visium() first, then 10x matrix fallbacks |
xenium |
supports .h5ad and .zarr |
slide_seq |
current wrapper expects converted .h5ad |
merfish |
current wrapper expects converted .h5ad |
seqfish |
current wrapper expects converted .h5ad |
generic |
expects .h5ad |
Post-Preprocess Data Convention
After preprocessing, the processed object typically contains:
adata.layers["counts"] # preserved raw counts
adata.raw # raw-count snapshot before normalization
adata.X # log-normalized expression
adata.var["highly_variable"] # HVG mask
adata.obsm["X_pca"] # PCA embedding
adata.obsm["X_umap"] # UMAP embedding
adata.obsp["connectivities"] # neighbor graph
adata.obsp["distances"] # neighbor distances
adata.obs["leiden"] # primary Leiden clusters
adata.obs["leiden_res_*"] # optional multi-resolution results
Tissue-Specific QC Presets
When --tissue is set, OmicsClaw auto-fills default QC thresholds. Explicit
CLI parameters still take precedence.
| Tissue | max_mt_pct | min_genes | max_genes | Notes |
|---|---|---|---|---|
| pbmc | 5 | 200 | 2500 | low mitochondrial fraction in blood cells |
| brain | 10 | 200 | 6000 | higher complexity in neuronal tissue |
| heart | 50 |
Установить spatial-preprocess в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл spatial-preprocess?
Load matrix-level spatial transcriptomics data (including raw_counts.h5ad from spatial-raw-processing), run the current OmicsClaw scanpy-standard preprocessing workflow, and export a downstream-ready AnnData with explicit effective QC parameters plus a standardized preprocessing visualization contract.
Как установить скилл spatial-preprocess?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spatial-preprocess запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic