--- pretty_name: SpatialDataAgent-DB Public Catalog license: other license_name: source-specific-data-terms license_link: https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB#data-use-and-source-terms tags: - biology - spatial-transcriptomics - metadata configs: - config_name: samples data_files: catalog/samples.parquet --- # SpatialDataAgent-DB Public Catalog ![H&E, spatial GFAP, DAPI and CosMx atlas previews](assets/dataset-card/v2/01-overview.png) *Left to right: H&E and GFAP from the same Visium section (GSM9721856), Xenium DAPI (GSM9301054), and a CosMx composite (GSM9372712). The GFAP panel displays all 3,416 recorded spots using the existing log1p preview values.* Search 12,163 public spatial transcriptomics samples before you request any data. They come from 1,265 published GEO series and hold 635,240,170 spatial observations (spots, bins, cells or beads). 8,211 samples have a released tissue image: 5,263 H&E, 871 H&E-like (a pixel-based call that no reviewer confirmed), 1,423 DAPI, 427 other fluorescence and 227 other or undetermined stains. Platforms include Visium, Xenium, legacy ST, CosMx, MERFISH/MERSCOPE, Slide-seq, Stereo-seq and Visium HD. The samples were found and standardized from GEO by the [SpatialDataAgent](https://github.com/YSTLab/spatial-data-agent) workflow (7,777 samples, each checked by an independent scorer) and by the earlier HESRT H&E collection (4,386 samples, each reviewed by eye). The atlas is described in the [bioRxiv preprint](https://doi.org/10.64898/2026.05.27.727615). This repository needs **no account**. It holds the catalog of all 12,163 samples and the complete files of 88 starter samples (below). The files of every sample are in the [full dataset](https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB), about 1.8 TB, where access is approved manually. ## Try it now, without an account: the starter pack ![24 of the starter pack's samples with a tissue image](assets/dataset-card/v3/08-starter-gallery.png) 88 samples of the release are in this repository and need **no login**. Each has the full three files: `spatial.h5ad`, `sample.json` and, for 60 of them, `image.tif`. The pack covers: - 12 platforms, 20 organ groups and 8 species; - 46 H&E images (8 at cell resolution, ≤ 1 µm per pixel) and 14 DAPI or CosMx images; - 41 samples with a reported disease and 79 from published studies; - 4.5 GB in total. The files are byte-identical to the full dataset, and each is checked against its SHA256 when downloaded. `starter/starter.json` lists the samples. [Open the five-minute notebook in Colab](https://colab.research.google.com/github/Biogod2020/spatial-data-agent-db/blob/main/examples/starter_pack.ipynb), or: ```bash pip install "spatial-data-agent-db[analysis] @ git+https://github.com/Biogod2020/spatial-data-agent-db" sda-db starter --has-image # list the pack sda-db download GSM6963121 --release starter --include-image # human liver, Visium H&E at 0.88 µm per pixel ``` ```python import sda_db adata = sda_db.load("GSM6963121", release="starter", include_image=True) ``` From R, or any tool, download a starter sample's files directly, for example `https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB-Catalog/resolve/main/samples/GSE223559/GSM6963121/spatial.h5ad` (also `sample.json` and `image.tif`), and read the H5AD with `zellkonverter::readH5AD`. **All 12,163 samples.** Every file of the release has passed content verification. To download any sample: 1. Request access on the [full dataset page](https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB) with your Hugging Face account and an institutional e-mail; requests are reviewed manually. 2. After approval, run `hf auth login` (or set `HF_TOKEN`). The same commands then work without `--release starter`. ## Is my tissue here? ![GEO samples per organ and platform](assets/dataset-card/v4/05-organ-platform.png) *Samples whose GEO tissue text matches each organ, by platform. The separate right column counts the human samples within each row, across all platforms. Counts are approximate because tissue labels are free text; use the search for exact cohorts.*
The same numbers as a table | Organ | Samples | Human | Studies | With H&E | |---|---:|---:|---:|---:| | Brain | 2,562 | 999 | 241 | 1,260 | | Intestine / colon | 1,416 | 735 | 81 | 241 | | Lung | 901 | 649 | 124 | 346 | | Liver | 760 | 184 | 101 | 271 | | Spinal cord | 637 | 182 | 22 | 251 | | Kidney | 563 | 289 | 71 | 203 | | Skin | 375 | 238 | 72 | 179 | | Heart | 309 | 89 | 54 | 142 | | Pancreas | 304 | 200 | 38 | 181 | | Lymph node / spleen | 254 | 127 | 58 | 99 | | Breast | 215 | 153 | 28 | 150 | | Prostate | 107 | 72 | 15 | 89 |
**No code needed.** Filter the `tissue`, `platform` or `organism` column in the Dataset Viewer on this page, or open `catalog/samples.csv` in Excel or R: ```r samples <- read.csv("https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB-Catalog/resolve/main/catalog/samples.csv") kidney <- subset(samples, grepl("kidney|renal", tissue, ignore.case = TRUE) & organism == "Homo sapiens") nrow(kidney) # 289 ``` The `sda-db` commands work from any terminal, also alongside an R workflow. For example, which kidney diseases are covered (no login): ```bash sda-db values disease --tissue kidney --tissue renal --organism human ``` This lists 30 reported values in about 290 human kidney samples. Among them are ANCA-associated glomerulonephritis (20 samples), diabetic kidney disease (11), renal cell cancer (8) and acute kidney injury (6); 178 samples report no disease. ## What one sample contains Every sample folder in the full dataset has three files: - `spatial.h5ad`: expression for every spot, cell, bin or bead, with its coordinates; - `image.tif`: a registered pyramidal tissue image, when one was released; - `sample.json`: metadata, including the transform that places each observation on the image. ![One Visium H&E sample: image, gene per spot and a patch](assets/dataset-card/v3/03-one-sample-visium.png) *a, the H&E image of GSM8714178 (human pancreatic cancer, Visium, 0.83 µm per pixel). b, KRT19 counts per spot, placed on the image by the transform in `sample.json`. c, a patch around the circled spot; patches like this, paired with the spot's expression, are the input of image-to-expression models.* ![One Xenium sample: DAPI image and gene per cell](assets/dataset-card/v3/04-one-sample-xenium.png) *a, the DAPI image of GSM9448988 (human glioblastoma, Xenium, 0.50 µm per pixel). b, GFAP counts per cell from the 541-gene panel, on the same image.* ## Search in one minute With the [spatial-data-agent-db](https://github.com/Biogod2020/spatial-data-agent-db) Python package and CLI (no login): ```bash pip install "spatial-data-agent-db @ git+https://github.com/Biogod2020/spatial-data-agent-db" sda-db search alzheimer hippocampus --organism human --has-image # ranked over study text and sample fields sda-db search --platform Visium --stain "H&E" --split train --output cohort.json sda-db search --gene GFAP --gene AQP4 --platform Xenium # samples whose panel measures both genes ``` Or read the table directly: ```python import pandas as pd from huggingface_hub import hf_hub_download path = hf_hub_download("Biogod/SpatialDataAgent-DB-Catalog", "catalog/samples.parquet", repo_type="dataset") samples = pd.read_parquet(path) he = samples[(samples.platform == "Visium") & (samples.image_stain == "H&E")] print(len(he), he[["gsm", "tissue", "n_obs", "image_um_per_px", "split"]].head()) # sample_dir is the folder in the full dataset: /spatial.h5ad, sample.json, image.tif ``` After access is approved, the same package plans download sizes (`sda-db download --from cohort.json --dry-run`), checks every file against its SHA256, and reads samples as AnnData. Streaming-ready training shards remain a planned follow-up. AI agents can use the same tools through its MCP server (`sda-db mcp`). Load a starter sample (no login) and cut an image patch paired with one spot: ```python import json import sda_db from sda_db.io import image_coordinates from sda_db.image import read_patch adata = sda_db.load("GSM4284327", release="starter", include_image=True) # verified download, then AnnData meta = json.loads(adata.uns["sda_db"]["sample_json"]) pixels = image_coordinates(adata, meta) # image pixel position of every spot patch, _ = read_patch(adata.uns["sda_db"]["directory"], pixels[0], 224) # H&E patch paired with adata.X[0] ``` The H5AD files also open in R, for example with Bioconductor's `zellkonverter::readH5AD`. ## Files | File | Content | |---|---| | `catalog/samples.parquet`, `catalog/samples.csv` | One row per sample: platform, organism, tissue, counts, units, image, QC, split, `sample_dir` path in the full dataset, file SHA256 | | `catalog/atlas-study-metadata.jsonl` | Study title, summary, design and PubMed IDs | | `catalog/atlas-sample-metadata.jsonl` | Reported disease, condition, age, sex, donor and publication; counts evidence and audit | | `catalog/feature-index.sqlite.gz` | Genes and features measured in each sample (41.9 MB; provenance in `catalog/feature-index-provenance.json`) | | `catalog/schema.json`, `catalog/summary.json`, `catalog/studies.csv` | Column dictionary, totals, per-study counts | Source index SHA256: `909c4ec50e71c636eadc7bf01a9479fef1b4fd480ac348dfea6b785e566c7bed` (snapshot `sda-unified-20261010-v3`, release tag `v1.0.0-20261025` of the full dataset). ## Collection composition ![Sample counts by platform, image availability, source collection and split](assets/dataset-card/v2/02-composition.png) *Sample counts by platform, image availability, source collection and retained split (n = 12,163; source snapshot: sda-unified-20261010-v3).* ## Images and resolution ![Image stains and H&E resolution](assets/dataset-card/v3/06-images.png) *a, the 8,211 samples with an image, by stain. b, the micrometres per pixel of the 5,113 labelled H&E images whose scale is recorded.* Most H&E images are the processed images deposited in GEO, at about 4 µm per pixel, enough to see tissue architecture. 561 H&E images have 1 µm per pixel or finer, enough to see cells (as in the patch above). `image_um_per_px` in `samples.parquet` lets you choose by resolution. ## Sample size ![Observations per sample by platform](assets/dataset-card/v4/07-sample-size.png) *Observations per sample (log scale). A sample is one GEO sample (GSM), usually one tissue section. Spots, bins, beads and cells differ in size, so compare platforms by their own unit.* ## Splits for machine learning The `split` column assigns whole GEO series to train (9,249 samples), val (1,316) or test (1,598), so samples of one study never cross splits. Of the H&E samples, 3,847 are in train, 358 in val and 1,058 in test. The split does not prove donor independence across studies; check `content_group` and `aliases` (in `samples.parquet`) and `donor_id` (in `atlas-sample-metadata.jsonl`) for your benchmark. ## Read the annotations correctly - **Vocabularies.** Organism, tissue, disease and age are kept as reported in GEO, not harmonized. - **Missing values.** Missing values stay empty; an empty `review_decision` is not a PASS. - **Separate checks.** Each check has its own column. Counts capability is `counts_ready` in `atlas-sample-metadata.jsonl`. The others are columns of `samples.parquet`: - source verification: `verification`; - image registration: `image_registration`; - human review: `review_decision`. - **Image scale.** `image_um_per_px` gives micrometres per image pixel where known; 5,113 of the 5,263 H&E images have it. `coordinate_units` and `um_per_unit` describe the spatial coordinates. - **Observations.** Observations are spots, cells, bins or beads, not independent donors. ## Terms The catalog and the data follow the terms of the original studies. There is no blanket license, and the catalog has no per-sample license column. See the [full Dataset Card](https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB#data-use-and-source-terms) for reuse terms and citation, and cite the original studies with the data you use (`sda-db cite` writes BibTeX for a selection). ## Curated sample metadata v2 (version 2.2.1, 2026-11-06) `metadata/v2/` adds a curated table on top of the same 12,163 samples. No data file changed: the paper release is still tag `v1.0.0-20261025`; the current metadata is tag `metadata-v2.2.1-20261106`. - `samples_metadata_v2.parquet` / `.csv` has one row per sample: - organ (43 sites); - UBERON tissue term (11,605 samples); - MONDO disease terms (6,479); - sample kind, disease status (normal / disease / perturbation / not stated), life stage and sex; - NCBI taxonomy, and the species implied by the gene IDs; - corrected platform family and assay name. The raw GEO text is kept next to every field. - `schema_v2.json` defines each column. `changes_v2.csv` lists every value that differs from the release, with its basis. `provenance.json` gives the model, the ontology versions and the file hashes. - **How it was made.** A language model could only pick from fixed answers or from ontology terms found in each sample's GEO record, so it could not invent identifiers. Fixed rules handle unambiguous ages. - **Quality, estimated on 300 random samples.** An independent model judged each label and every "wrong" verdict was read by hand. Estimated wrong rates: organ 0.3%, tissue term 0.7%, sample kind 0.7%, life stage 1.7%, disease 3.0%. Labels judged correct were not re-read, so these are estimates. A human reader then reviewed 200 samples, and the errors found were corrected in version 2.2. - **Known limit.** A study's disease sometimes lands on a control whose own record does not say it is a control (about 1.5% of samples). Use `annotation_low_confidence`, `metadata_flags` and the raw fields when this matters. - Full description: `metadata/v2/README.md`.