bio-spatial-transcriptomics-spatial-multiomics
Analyze high-resolution spatial platforms like Slide-seq, Stereo-seq, and Visium HD. Use when working with subcellular resolution or high-density spatial data.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install openclaw-medical-spatial-transcriptomics-analysis-bioskills-spatial-multiomics-bio-spatial-transcripManual setup by platform
Claude Code
~/.claude/skills/openclaw-medical-spatial-transcriptomics-analysis-bioskills-spatial-multiomics-bio-spatial-transcrip/SKILL.md
Instructions
Spatial Multi-omics Analysis
Platform Comparison
| Platform | Resolution | Spots/Beads | Coverage |
|---|---|---|---|
| Visium | 55 µm | ~5,000 | Tissue-wide |
| Visium HD | 2 µm | ~11M | Subcellular |
| Slide-seq | 10 µm | ~100,000 | High-density |
| Stereo-seq | 0.5 µm | >200M | Subcellular |
| MERFISH | Single-molecule | N/A | Targeted genes |
Squidpy for High-Resolution Data
import squidpy as sq
import scanpy as sc
# Load spatial data
adata = sc.read_h5ad('spatial_multiomics.h5ad')
# Spatial neighbors (for high-resolution, adjust n_neighs based on density)
sq.gr.spatial_neighbors(adata, coord_type='generic', n_neighs=10, spatial_key='spatial')
# Spatial autocorrelation (Moran's I)
sq.gr.spatial_autocorr(adata, mode='moran', genes=adata.var_names[:100])
# Neighborhood enrichment analysis
sq.gr.nhood_enrichment(adata, cluster_key='cell_type')
sq.pl.nhood_enrichment(adata, cluster_key='cell_type')
# Ligand-receptor analysis
sq.gr.ligrec(adata, n_perms=100, cluster_key='cell_type')
SpatialData Framework
import spatialdata as sd
from spatialdata_io import read_visium, read_xenium
# Read Visium data
sdata = read_visium('visium_output/')
# Read Xenium data (10x Genomics subcellular)
sdata = read_xenium('xenium_output/')
# Read from Zarr
sdata = sd.read_zarr('experiment.zarr')
# Access different elements
images = sdata.images['morphology']
points = sdata.points['transcripts']
shapes = sdata.shapes['cell_boundaries']
table = sdata.tables['adata']
# Query by region
from spatialdata import bounding_box_query
roi = bounding_box_query(sdata, min_coordinate=[0, 0], max_coordinate=[1000, 1000], axes=['x', 'y'])
Slide-seq/Stereo-seq Processing
# For high-density data, bin spots into hexagonal grids
import numpy as np
# Create hexagonal bins
def hexbin_data(adata, gridsize=50):
coords = adata.obsm['spatial']
from matplotlib.pyplot import hexbin
hb = hexbin(coords[:, 0], coords[:, 1], C=None, gridsize=gridsize, reduce_C_function=np.sum)
return hb
# Squidpy visualization with hex binning
sq.pl.spatial_scatter(adata, shape='hex', size=50, color='cluster')
# Grid-based spatial neighbors for regular patterns
sq.gr.spatial_neighbors(adata, coord_type='grid', n_rings=1)
Subcellular Analysis (MERFISH/Xenium)
# Transcript-level analysis
# Assign transcripts to compartments
sq.gr.co_occurrence(adata, cluster_key='compartment', spatial_key='spatial')
# Cell segmentation integration
from cellpose import models
model = models.Cellpose(model_type='cyto2')
masks, flows, styles, diams = model.eval(image, diameter=30, channels=[0, 0])
# Map transcripts to cells
def assign_transcripts_to_cells(transcripts_df, masks):
x, y = transcripts_df['x'].values.astype(int), transcripts_df['y'].values.astype(int)
transcripts_df['cell_id'] = masks[y, x]
return transcripts_df[transcripts_df['cell_id'] > 0]
Multi-Modal Integration
# Combine spatial transcriptomics with histology
sq.im.process(adata, layer='image', method='smooth', sigma=2)
sq.im.segment(adata, layer='image', method='watershed', thresh=0.1)
# Extract image features
sq.im.calculate_image_features(
adata, layer='image', features=['texture', 'summary'],
key_added='img_features', n_jobs=4
)
# Correlate image features with gene expression
from scipy.stats import pearsonr
for gene in ['marker1', 'marker2']:
r, p = pearsonr(adata.obs['img_feature'], adata[:, gene].X.flatten())
print(f'{gene}: r={r:.3f}, p={p:.3e}')
Visium HD Specific
# Visium HD produces bin files at multiple resolutions
# Load 8µm binned data (recommended starting point)
adata = sc.read_h5ad('visium_hd_8um.h5ad')
# Downsample to 16µm if needed for initial analysis
# Original 2µm data available for detailed analysis
Quality Metrics
| Metric | Visium | High-Resolution |
|---|---|---|
| Genes/spot | >2000 | >500 |
| UMI/spot | >5000 | >1000 |
| Spatial coverage | >80% | >50% |
Related Skills
- spatial-transcriptomics/spatial-preprocessing - Standard spatial analysis
- single-cell/preprocessing - scRNA-seq concepts
- spatial-transcriptomics/image-analysis - Morphology processing
- single-cell/cell-annotation - Cell type assignment
Security
Reviews (0)
Related skills
Browse all →More from OpenClaw Medical
View source →More Build skills
Browse category →Frequently asked questions about bio-spatial-transcriptomics-spatial-multiomics
What does the bio-spatial-transcriptomics-spatial-multiomics skill do?
Analyze high-resolution spatial platforms like Slide-seq, Stereo-seq, and Visium HD. Use when working with subcellular resolution or high-density spatial data. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the bio-spatial-transcriptomics-spatial-multiomics skill?
Run `npx @skills-hub-ai/cli install openclaw-medical-spatial-transcriptomics-analysis-bioskills-spatial-multiomics-bio-spatial-transcrip` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/openclaw-medical-spatial-transcriptomics-analysis-bioskills-spatial-multiomics-bio-spatial-transcrip/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does bio-spatial-transcriptomics-spatial-multiomics work with?
bio-spatial-transcriptomics-spatial-multiomics runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the bio-spatial-transcriptomics-spatial-multiomics skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use bio-spatial-transcriptomics-spatial-multiomics after installing it?
In Claude Code, type `/openclaw-medical-spatial-transcriptomics-analysis-bioskills-spatial-multiomics-bio-spatial-transcrip` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the bio-spatial-transcriptomics-spatial-multiomics skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.