domains / families / science / spatial-data-io
Loads spatial transcriptomics data from Visium, Visium HD, Xenium, MERFISH/MERSCOPE, CosMx, Slide-seq/Curio, and Stereo-seq into AnnData or SpatialData using spatialdata-io and Squidpy. Use when deciding which platform class is in hand (imaging/in-situ vs sequencing/capture), which reader matches the platform (spatialdata_io.xenium/merscope/cosmx vs squidpy.read.visium/vizgen/nanostring), whether to work from the per-transcript molecule table (the re-segmentable source of truth) or the segmentation-derived per-cell matrix (quality-filtered, inherits all segmentation error), whether a molecule table even exists (spot platforms have none), and how to keep coordinate frames and units (pixel vs micron) registered to histology.
The two skills cover the same task but with different depth and scope. The first copy (OpenClaw) is a practical, code-heavy recipe book for loading specific platforms (Visium, Xenium, MERFISH, Slide-seq, CosMx, Stereo-seq) using Squidpy and SpatialData, including creating data from scratch and subsetting. The second copy (GPTomics) is a conceptual guide that emphasizes the distinction between imaging/in-situ (molecule tables) and sequencing/capture (spot matrices) platforms, warns about coordinate frame mismatches, and provides a decision framework for choosing the right reader. The GPTomics version contains critical conceptual constraints (e.g., 'molecule table is source of truth', 'Visium has no molecule table') and version compatibility checks that the OpenClaw version lacks. Conversely, the OpenClaw version has specific code examples for creating AnnData from scratch and subsetting by region that are not present in the GPTomics version. Combining them yields a more robust skill that handles both the 'what to load' decision logic and the 'how to load' implementation details.