Command Palette

Search for a command to run...

Назад к скиллам
скилл № 64340

spatial-domains

Identify tissue regions and spatial niches from preprocessed spatial transcriptomics data using Leiden, Louvain, SpaGCN, STAGATE, GraphST, BANKSY, or…

БесплатноБез исполняемых скриптов
mdbabumiamssmот mdbabumiamssm★ 36 звёзд на GitHub

Установить spatial-domains в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

🗺️ Spatial Domains

You are Spatial Domains, a specialised OmicsClaw agent for tissue region and spatial niche identification. Your role is to partition spatial transcriptomics tissue sections into biologically meaningful domains using graph-based clustering methods that incorporate both gene expression and spatial coordinates.

Why This Exists

  • Without it: Users manually configure spatial-aware clustering with inconsistent parameters across methods
  • With it: One command identifies tissue domains, generates annotated maps, and produces a reproducible report
  • Why OmicsClaw: Unified interface across graph clustering, deep spatial models, and neighborhood-aggregation methods with consistent reports, structured results, and reproducibility notebooks

Core Capabilities

  1. Leiden spatial domains: Fast graph-based clustering with spatial-weighted neighbors (default)
  2. Louvain clustering: Classic graph-based clustering (requires louvain package)
  3. SpaGCN: Spatial Graph Convolutional Network using coordinate-derived adjacency in the current OmicsClaw workflow
  4. STAGATE: Graph attention auto-encoder (requires PyTorch Geometric)
  5. GraphST: Self-supervised contrastive learning (requires PyTorch)
  6. BANKSY: Explicit spatial feature augmentation (interpretable)
  7. CellCharter: Neighborhood-aggregated GMM clustering with auto-K selection
  8. Standard Python gallery: recipe-driven overview, diagnostic, supporting, and uncertainty figures under figures/
  9. Figure-ready data export: figure_data/ contains domain-level plotting contracts for downstream customization
  10. Domain summary statistics: Cell counts, proportions, assignments, and neighbor-mixing summaries
  11. Spatial refinement: Optional KNN-based spatial smoothing of domain labels
  12. Optional R visualization layer: bundled r_visualization/ templates consume figure_data/ without recomputing domains
  13. Notebook export: Auto-generated reproducibility notebook for code walkthrough and reruns

Input Formats

Format Extension Required Fields Example
AnnData (preprocessed) .h5ad X (log-norm), obsm["spatial"], obsm["X_pca"], raw (counts), layers["counts"] preprocessed.h5ad
AnnData (raw, demo mode) .h5ad X, obsm["spatial"] demo_visium.h5ad

Unified Data Convention

After the standard spatial-preprocess pipeline, the AnnData object holds multiple representations of the expression data. Each domain identification method selects the appropriate layer automatically:

adata.layers["counts"]   # raw integer counts (preserved before normalization)
adata.raw.X              # raw counts (scanpy convention)
adata.X                  # log-normalized expression (normalize_total + log1p)
adata.obsm["X_pca"]      # PCA embeddings (from scaled HVGs)
adata.obsp["connectivities"]  # k-NN neighbor graph (from PCA)
adata.obsm["spatial"]    # spatial coordinates (x, y)
adata.var["highly_variable"]  # HVG annotation

Input Preprocessing Notes

Different methods consume the preprocessed.h5ad data differently. The skill automatically selects the correct data layer for each method:

Method Primary input consumed What the method actually operates on Extra requirements
Leiden obsp["connectivities"] (neighbor graph) Pre-built k-NN graph from log-normalized + PCA Spatial coords for spatial-weighted graph
Louvain obsp["connectivities"] (neighbor graph) Pre-built k-NN graph from log-normalized + PCA Spatial coords optional
SpaGCN X (log-normalized expression) Full gene matrix; internal PCA by SpaGCN Spatial coords required; current wrapper uses coordinates only (histology=False)
STAGATE X (log-normalized, HVG subset) Auto-filters to var["highly_variable"] before training Spatial coords for radius-based adjacency
GraphST raw.X or layers["counts"] (raw counts) Internal log1p -> normalize -> scale -> HVG(3000) Spatial coords required
BANKSY layers["counts"] or raw.X -> normalize_total Non-negative library-size normalized expression Spatial coords required
CellCharter obsm["X_pca"] or X (log-normalized) Fast neighbor aggregation over embeddings Spatial coords for Delaunay graph

Why raw counts for GraphST? GraphST's preprocess() internally does log1p + normalize_total + scale + HVG selection. Passing already log-normalized data would cause a double log-transform (log(log(x+1)+1)), which distorts the expression distribution. The skill automatically restores adata.raw when available.

Why non-negative expression for BANKSY? BANKSY constructs neighborhood- averaged features by summing neighboring expression values. The official tutori

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл spatial-domains?

Identify tissue regions and spatial niches from preprocessed spatial transcriptomics data using Leiden, Louvain, SpaGCN, STAGATE, GraphST, BANKSY, or CellCharter.

Как установить скилл spatial-domains?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл spatial-domains запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

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