OpenClaw-Medical-Skills spatial-proteomics

<!--

install
source · Clone the upstream repo
git clone https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/spatial-transcriptomics-analysis/bioSkills/spatial-proteomics" ~/.claude/skills/freedomintelligence-openclaw-medical-skills-spatial-proteomics && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/spatial-transcriptomics-analysis/bioSkills/spatial-proteomics" ~/.openclaw/skills/freedomintelligence-openclaw-medical-skills-spatial-proteomics && rm -rf "$T"
manifest: skills/spatial-transcriptomics-analysis/bioSkills/spatial-proteomics/SKILL.md
source content
<!-- # COPYRIGHT NOTICE # This file is part of the "Universal Biomedical Skills" project. # Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu> # All Rights Reserved. # # This code is proprietary and confidential. # Unauthorized copying of this file, via any medium is strictly prohibited. # # Provenance: Authenticated by MD BABU MIA -->

name: bio-spatial-transcriptomics-spatial-proteomics description: 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. tool_type: python primary_tool: scimap measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:

  • read_file
  • run_shell_command

Spatial Proteomics Analysis

Data Loading

import 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

Preprocessing

# 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')

Phenotyping Cells

# 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)

Spatial Analysis

# 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')

Visualization

# 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'])

Integration with Transcriptomics

import 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-Specific Notes

PlatformMarkersResolutionNotes
CODEX40-60SubcellularCyclic staining
IMC40+1 umMetal-tagged antibodies
MIBI40+260 nmMass spectrometry

Related Skills

  • spatial-transcriptomics/spatial-neighbors - Spatial graph construction
  • spatial-transcriptomics/spatial-domains - Domain identification
  • imaging-mass-cytometry/phenotyping - IMC-specific analysis
<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->