Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

spatial-preprocess

БесплатноБез исполняемых скриптовНе проверен

Load matrix-level spatial transcriptomics data (including raw_counts.h5ad from spatial-raw-processing), run the current OmicsClaw scanpy-standard…

mdbabumiamssmот 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-processing first.
  • 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

  1. Current workflow: scanpy_standard: QC, normalization, seurat_v3 HVG selection, PCA, neighbors, UMAP, and Leiden clustering.
  2. Multi-platform loading: Visium directories / h5 / h5ad, Xenium zarr / h5ad, and converted .h5ad inputs for MERFISH / Slide-seq / seqFISH.
  3. QC filtering: spot or cell filtering using min_genes, min_cells, max_mt_pct, and optional max_genes.
  4. Tissue-aware presets: optional wrapper-level presets for common tissues such as brain, heart, tumor, and lung.
  5. Raw-count preservation: raw counts are stored in both adata.layers["counts"] and adata.raw before normalization.
  6. Graph embedding: PCA, neighbor graph, and UMAP.
  7. Clustering: primary Leiden clustering plus optional multi-resolution sweeps.
  8. Standard Python gallery: emits a recipe-driven preprocessing gallery with clustering overview, QC diagnostics, PCA guidance, and threshold-context panels.
  9. Figure-ready exports: writes figure_data/ CSVs plus a manifest so downstream tools can restyle the same preprocessing result without recomputing QC or clustering.
  10. 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
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить spatial-preprocess с