Spatial data validation
Skill Rebell-Leader/SpatialAI_MCP/skills/spatial-data-validation
Validate and inspect spatial transcriptomics data files (SpatialData/zarr/AnnData) before any analysis. Use when the user points at a spatial data file, reports a loading/format error, or asks whether data is suitable for a method.From its SKILL.md
npx -y skills add Rebell-Leader/SpatialAI_MCP --skill spatial-data-validationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, as published. Nobody here has run it
Spatial data validation
Validate first, reason second. Never assume a file's format or contents from its extension.
Steps
-
Detect & validate format. Call the MCP tool
validate_spatial_datawith the file path. Choosevalidation_level:basic— extension/existence only.structure(default) — format + structural integrity.integrity— deeper content checks.domain— spatial-biology-specific expectations. For several files, usevalidate_multiple_spatial_files.
-
Read the metadata. Call
analyze_spatial_metadatato extract dimensions, spatial coordinates, and gene/feature info. Confirmobsm['spatial'](AnnData) or coordinate systems (SpatialData) are present when spatial analysis is intended. -
Check raw vs. processed. Integer-valued matrices are likely raw counts; non-integer/log-scaled values are processed. State which the downstream method expects and flag a mismatch.
-
Check compatibility when combining files:
check_spatial_data_compatibility(coordinate systems + gene overlap).
Key facts (see context/data-formats.md)
- A
.zarrstore is SpatialData only if it has SpatialData markers or ≥2 ofimages/ labels/ points/ shapes/ tables/. Otherwise it's a plain zarr array. - iST datasets can be terabytes. Default to lightweight structural checks; avoid
loading whole objects. The heavy scientific stack (
pip install -e ".[spatial]") is optional — the validators degrade gracefully without it.
Don't
- Don't claim a file is valid SpatialData without inspecting contents.
- Don't call execution tools (e.g.
run_nextflow_workflow) — they aren't implemented. Drive local CLIs directly if execution is needed.