AnnData
AnnData is a Python package for handling annotated data matrices, storing experimental measurements (X) alongside observation metadata (obs)…
Maintainer FreedomIntelligence · Last updated April 1, 2026
Load spatial transcriptomics data from Visium, Xenium, MERFISH, Slide-seq, and other platforms using Squidpy and SpatialData. Read Space Ranger outputs, convert formats, and access spatial coordinates. Use when loading Visium, Xenium, MERFISH, or other spatial data.
Original source
https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/bio-spatial-transcriptomics-spatial-data-io
Skill Snapshot
Source Doc
Goal: Load Visium spatial transcriptomics data from Space Ranger output into an AnnData object.
Approach: Use Squidpy's read.visium to parse the output directory, which loads expression, spatial coordinates, and tissue images.
## Spatial coordinates are in adata.obsm['spatial']
print(f"Spatial coords shape: {adata.obsm['spatial'].shape}")
## Image is in adata.uns['spatial']
library_id = list(adata.uns['spatial'].keys())[0]
print(f'Library ID: {library_id}')
Related skills
AnnData is a Python package for handling annotated data matrices, storing experimental measurements (X) alongside observation metadata (obs)…
Arboreto is a computational library for inferring gene regulatory networks (GRNs) from gene expression data using paralleli.
Cell segmentation from multiplexed tissue images. Covers deep learning (Cellpose, Mesmer) and classical approaches for nuclear and whole-cel…
Extract, process, and deduplicate reads using Unique Molecular Identifiers (UMIs) with umi_tools. Use when library prep includes UMIs and ac…