spatial-microenvironment-subset
БесплатноБез исполняемых скриптовНе проверенExtract a local spatial microenvironment by selecting cells or spots within a physical radius of a center population, preserving coordinates and labels in a…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
Spatial Microenvironment Subset
Use this skill when the user wants to keep only the local neighborhood around a center population before running downstream spatial analyses.
Core Capabilities
- Select center cells/spots by
adata.obslabel. - Keep all observations within a user-defined radius of those centers.
- Optionally restrict neighbors to a second label filter.
- Export a subset h5ad that preserves original coordinates and annotations.
- Annotate selected observations with center/neighbor role and nearest-center distance.
Expected Inputs
- AnnData with spatial coordinates in
obsm["spatial"]orobsm["X_spatial"] - At least one annotation column in
adata.obsdescribing cell or spot identity - Radius provided in either:
- microns via
--radius-microns - native coordinate units via
--radius-native
- microns via
Practical Guidance
- Prefer
--radius-micronswhen coordinate scaling is known or can be inferred. - For Xenium-like inputs, coordinates are often already in microns.
- For custom or partially processed h5ad files, pass
--microns-per-coordinate-unitif radius in microns cannot be inferred safely. - Keep centers included by default when the subset will feed directly into
spatial-cell-communication.
Outputs
spatial_microenvironment_subset.h5adtables/selected_observations.csvtables/center_observations.csvtables/label_composition.csvtables/selection_summary.csvfigures/microenvironment_selection.png
Example
python skills/spatial/spatial-microenvironment-subset/spatial_microenvironment_subset.py \
--input data/sample.h5ad \
--output output/microenv \
--center-key cell_type \
--center-values tumor \
--radius-microns 50
Установить spatial-microenvironment-subset в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл spatial-microenvironment-subset?
Extract a local spatial microenvironment by selecting cells or spots within a physical radius of a center population, preserving coordinates and labels in a downstream-ready h5ad subset for tumor microenvironment, neighborhood, spatial communication, and related downstream analyses.
Как установить скилл spatial-microenvironment-subset?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spatial-microenvironment-subset запускает скрипты?
Нет, скилл состоит только из инструкций (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