Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Analyzes spatial proteomics data from CODEX, IMC, and MIBI platforms including cell segmentation and protein colocalization. Use when working with multiplexed imaging data, analyzing protein spatial patterns, or integrating spatial proteomics with transcriptomics.
.claude/skills/bio-spatial-transcriptomics-spatial-proteomics/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-21 | ✗→✓ | ▲ Improved | — | — |
| case-10 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
Reference examples tested with: anndata 0.10+, scanpy 1.10+, squidpy 1.3+
Before using code patterns, verify installed versions match. If versions differ:
pip show <package> then help(module.function) to check signaturesIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
"Analyze my CODEX/IMC spatial proteomics data" → Process multiplexed imaging data including cell segmentation, protein phenotyping, spatial neighborhood analysis, and protein colocalization scoring.
scimap.tl.phenotype_cells(), squidpy.gr.nhood_enrichment()Goal: Process multiplexed spatial proteomics data (CODEX/IMC/MIBI) through cell phenotyping, spatial neighborhood analysis, and protein colocalization scoring.
Approach: Load the cell-by-marker intensity matrix with spatial coordinates into AnnData, normalize and rescale marker intensities, phenotype cells by marker expression gating, then analyze spatial neighborhoods and cell-cell interactions using scimap and squidpy.
pythonimport scimap as sm import anndata as ad # Load CODEX/IMC data (cell x marker matrix with spatial coordinates) adata = ad.read_h5ad('spatial_proteomics.h5ad') # Required: spatial coordinates in adata.obsm['spatial'] # Required: protein intensities in adata.X
python# Log transform intensities sm.pp.log1p(adata) # Rescale markers (0-1 per marker) sm.pp.rescale(adata) # Combat batch correction if multiple FOVs sm.pp.combat(adata, batch_key='fov')
python# Manual gating approach phenotype_markers = { 'T_cell': ['CD3', 'CD45'], 'B_cell': ['CD20', 'CD45'], 'Macrophage': ['CD68', 'CD163'], 'Tumor': ['panCK', 'Ki67'] } sm.tl.phenotype_cells(adata, phenotype=phenotype_markers, gate=0.5, label='phenotype') # Clustering-based phenotyping sm.tl.cluster(adata, method='leiden', resolution=1.0)
python# Build spatial neighbors graph sm.tl.spatial_distance(adata, x_coordinate='X', y_coordinate='Y') # Neighborhood enrichment sm.tl.spatial_interaction(adata, phenotype='phenotype', method='knn', knn=10) # Spatial clustering (communities of cells) sm.tl.spatial_cluster(adata, phenotype='phenotype')
python# Spatial scatter plot sm.pl.spatial_scatterPlot(adata, colorBy='phenotype', x='X', y='Y', s=5) # Heatmap of spatial interactions sm.pl.spatial_interaction(adata) # Marker expression overlay sm.pl.image_viewer(adata, markers=['CD3', 'CD20', 'panCK'])
pythonimport squidpy as sq # If matched spatial transcriptomics available # Transfer labels or integrate modalities sq.gr.spatial_neighbors(adata_protein) sq.gr.spatial_neighbors(adata_rna) # Compare spatial patterns across modalities
| Platform | Markers | Resolution | Notes | |----------|---------|------------|-------| | CODEX | 40-60 | Subcellular | Cyclic staining | | IMC | 40+ | 1 um | Metal-tagged antibodies | | MIBI | 40+ | 260 nm | Mass spectrometry |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.