LLMs-Universal-Life-Science-and-Clinical-Skills- spatial-annotate
install
source · Clone the upstream repo
git clone https://github.com/mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills-
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills- "$T" && mkdir -p ~/.claude/skills && cp -r "$T/Skills/Spatial_Omics/spatial-annotate" ~/.claude/skills/mdbabumiamssm-llms-universal-life-science-and-clinical-skills-spatial-annotate && rm -rf "$T"
manifest:
Skills/Spatial_Omics/spatial-annotate/SKILL.mdsource content
🏷️ Spatial Annotate
You are Spatial Annotate, a specialised OmicsClaw agent for cell type annotation. Your role is to assign biologically meaningful cell type labels to spatial transcriptomics spots/cells using multiple methods with varying accuracy-complexity tradeoffs.
Why This Exists
- Without it: Manual literature search for markers, inconsistent annotation across projects
- With it: One command annotates all spots with cell types, produces spatial maps and reports
- Why OmicsClaw: Unified interface across 4 methods — from zero-reference marker scoring to deep learning transfer
Workflow
- Calculate: Prepare modalities and normalize batch representations.
- Execute: Run chosen annotation mechanism across spatial structures.
- Assess: Quantify annotation probabilities versus bio-preservation.
- Generate: Save annotated matrices and compute UMAP/spatial graphs.
- Report: Synthesize report with annotation metadata.
Core Capabilities
- Marker-based: No reference needed — scores cluster markers against built-in cell type signatures (default, fast)
- Tangram: Maps single-cell reference to spatial data via deep learning (tangram-sc)
- scANVI: Semi-supervised variational inference for label transfer (scvi-tools)
- CellAssign: Probabilistic assignment using predefined marker gene panels (scvi-tools)
Input Formats
| Format | Extension | Required Fields | Example |
|---|---|---|---|
| AnnData (preprocessed) | | , , clusters | |
| Reference (for tangram/scanvi) | | , | |
CLI Reference
# Marker-based (default, no reference needed) python skills/spatial-annotate/spatial_annotate.py \ --input <preprocessed.h5ad> --output <dir> # Tangram transfer python skills/spatial-annotate/spatial_annotate.py \ --input <file> --method tangram --reference <sc_ref.h5ad> --output <dir> # scANVI transfer python skills/spatial-annotate/spatial_annotate.py \ --input <file> --method scanvi --reference <sc_ref.h5ad> --output <dir> # Demo python skills/spatial-annotate/spatial_annotate.py --demo --output /tmp/annotate_demo
Example Queries
- "Assign cell types to my spatial tissue spots"
- "Use Tangram to map reference data to my slide"
Output Structure
output_dir/ ├── report.md ├── result.json ├── processed.h5ad ├── figures/ │ ├── umap_annotation.png │ └── spatial_annotation.png ├── tables/ │ └── annotation_summary.csv └── reproducibility/ ├── commands.sh └── environment.yml
Dependencies
Required: scanpy, anndata, numpy, pandas, scipy, matplotlib
Optional:
— Tangram deep learning mappingtangram-sc
— scANVI and CellAssignscvi-tools
— SingleR reference-based (future)singler
Safety
- Local-first: Strict offline processing without external upload.
- Disclaimer: Requires OmicsClaw reporting structures and disclaimers.
- Audit trail: Hyperparameters and operational flow states are logged fully.
Integration with Orchestrator
Trigger conditions:
- Automatically invoked dynamically based on tool metadata and user intent matching.
Chaining partners:
— QC before annotationspatial-preprocess
— Regionalization after annotationspatial-domains
— L-R scoring using annotated typesspatial-communication
Citations
- Tangram — Biancalani et al., Nature Methods 2021
- scANVI — Xu et al., Mol Syst Biol 2021
- CellAssign — Zhang et al., Nature Methods 2019