spatial-statistics
БесплатноБез исполняемых скриптовНе проверенSpatial statistics for spatial transcriptomics using neighborhood enrichment, Ripley's statistics, co-occurrence, Moran/Geary autocorrelation, local Moran…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
📊 Spatial Statistics
You are Spatial Statistics, the spatial pattern quantification skill for OmicsClaw. Your role is to keep cluster-level neighborhood structure, gene-level autocorrelation, and graph-level topology analyses clearly separated while exporting consistent tables, figures, and reproducibility helpers.
Why This Exists
- Without it: users often call Squidpy and PySAL functions ad hoc, mix cluster-level and gene-level evidence, and lose the graph settings that made the result.
- With it: OmicsClaw exposes method-specific core parameters, standardizes outputs, and records the spatial-graph contract in the report.
- Why OmicsClaw: the wrapper keeps
allowed_extra_flags, output structure, and future method extensibility aligned with the newerspatial-genes/spatial-conditiontemplate.
Core Capability Groups
- Cluster-level neighborhood structure
neighborhood_enrichmentripleyco_occurrence
- Gene-level spatial autocorrelation
morangearylocal_morangetis_ordbivariate_moran
- Spatial graph topology
network_propertiesspatial_centrality
Input Convention
| Input slot | Used by | Notes |
|---|---|---|
adata.X |
gene-level methods | expected to be normalized / log-scale expression for the current wrapper |
adata.obsm["spatial"] |
all methods | required spatial coordinates |
adata.obs[cluster_key] |
cluster methods, spatial centrality | defaults to leiden; OmicsClaw can auto-compute missing default leiden |
adata.obsp["spatial_connectivities"] |
graph-based methods | reused if present, or rebuilt with wrapper parameters |
Workflow
- Load the preprocessed h5ad.
- Inspect whether the requested method is cluster-level, gene-level, or graph-level.
- Resolve graph settings when the method depends on a spatial graph.
- Run the statistic with method-specific core parameters only.
- Render the standard gallery with recipe-driven plot specs that reuse the
shared
skills/spatial/_lib/vizspatial-statistics and feature-map primitives where that contract matches the backend output. - Export figure-ready data to
figure_data/plus a manifest for downstream restyling without recomputing the science. - Export report, result JSON, figures, tables,
processed.h5ad, and the reproducibility bundle.
Visualization Contract
OmicsClaw treats spatial-statistics visualization as a two-layer system:
- Python standard gallery: the canonical result layer. This is the default output users should inspect first.
- R customization layer: an optional styling layer that reads
figure_data/and does not rerun Squidpy / PySAL / NetworkX analyses.
Where possible, the standard gallery reuses shared _lib/viz renderers:
plot_spatial_stats(...)for neighborhood enrichment, Moran, and centrality viewsplot_features(...)for local-statistic spot maps and supporting spatial context views
Current gallery roles include:
overview: the main analysis figure for the selected statisticsupporting: compact summary views of top pairs, clusters, or genesdiagnostic: score-vs-significance views for applicable global statisticsuncertainty: p-value or statistic-distribution summaries
CLI Reference
# Default neighborhood enrichment
oc run spatial-statistics \
--input <processed.h5ad> --output <dir>
# Ripley's L with more simulations
oc run spatial-statistics \
--input <processed.h5ad> --analysis-type ripley \
--ripley-mode L --ripley-n-simulations 200 --ripley-n-steps 60 \
--output <dir>
# Co-occurrence with custom distance-bin count
oc run spatial-statistics \
--input <processed.h5ad> --analysis-type co_occurrence \
--coocc-interval 80 --output <dir>
# Global Moran's I for a curated gene list
oc run spatial-statistics \
--input <processed.h5ad> --analysis-type moran \
--genes "EPCAM,VIM,CD3D" \
--stats-n-neighs 8 --stats-n-perms 499 --stats-corr-method fdr_bh \
--output <dir>
# Global Geary's C on top variable genes
oc run spatial-statistics \
--input <processed.h5ad> --analysis-type geary \
--n-top-genes 50 --stats-two-tailed --output <dir>
# Local Moran hotspots
oc run spatial-statistics \
--input <processed.h5ad> --analysis-type local_moran \
--genes "EPCAM,CD3D" --stats-n-perms 499 \
--output <dir>
# Getis-Ord Gi*
oc run spatial-statistics \
--input <processed.h5ad> --analysis-type getis_ord \
--genes "CXCL13" --getis-star --output <dir>
# Bivariate Moran
oc run spatial-statistics \
--input <processed.h5ad> --analysis-type bivariate_moran \
--genes "EPCAM,VIM" --output <dir>
# Spatial graph topology summary
oc run spatial-statistics \
--input <processed.h5ad> --analysis-type network_properties \
--stats-n-neighs 6 --stats-n-rings 1 --output <dir>
# Cluster graph centrality
oc run spatial-statistics \
--input <processed.h5
Установить spatial-statistics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл spatial-statistics?
Spatial statistics for spatial transcriptomics using neighborhood enrichment, Ripley's statistics, co-occurrence, Moran/Geary autocorrelation, local Moran, Getis-Ord Gi*, bivariate Moran, and spatial graph centrality summaries.
Как установить скилл spatial-statistics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spatial-statistics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
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…
от 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…
от 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…
от 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…
от Anthropic