Biogod's picture
Correction 2026-11-11: image removed from 9 misaligned HESRT samples
76ad713 verified
|
Raw History Blame Contribute Delete
20.8 kB
metadata
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: metadata_v2
    data_files: metadata/v2/samples_metadata_v2.parquet
    default: true
  - config_name: samples
    data_files: catalog/samples.parquet

SpatialDataAgent-DB Public Catalog

H&E, spatial GFAP, DAPI and CosMx atlas previews

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,157 public spatial transcriptomics samples before you request any data. They come from 1,264 published GEO series and hold 635,244,564 spatial observations (spots, bins, cells or beads). 8,196 samples have a released tissue image: 5,247 H&E, 871 H&E-like (a pixel-based call that no reviewer confirmed), 1,424 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 workflow (7,789 samples, each checked by an independent scorer) and by the earlier HESRT H&E collection (4,368 samples, each reviewed by eye). On 2026-11-11, 12 samples were replaced and 6 were withdrawn after a check against the GEO deposits, and the image of 9 misaligned samples was removed; see Corrections 2026-11-11. The atlas is described in the bioRxiv preprint.

This repository needs no account. It holds the catalog of all 12,157 samples and the complete files of 86 starter samples (below). The files of every sample are in the full dataset, 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

86 samples of the release are in this repository and need no login. Each has the full three files: spatial.h5ad, sample.json and, for 58 of them, image.tif. The pack covers:

  • 12 platforms, 20 organ groups and 8 species;
  • 43 H&E images (8 at cell resolution, ≤ 1 µm per pixel) and 15 DAPI or CosMx images;
  • 41 samples with a reported disease and 77 from published studies;
  • 5.1 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, or:

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
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,157 samples. Every file of the release has passed content verification. To download any sample:

  1. Request access on the full dataset page 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

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:

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):

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

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

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 Python package and CLI (no login):

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:

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: <sample_dir>/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:

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

Sample counts by platform, image availability, source collection and retained split (n = 12,163, the paper release; source snapshot: sda-unified-20261010-v3).

Images and resolution

Image stains and H&E resolution

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

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 for reuse terms and citation, and cite the original studies with the data you use (sda-db cite writes BibTeX for a selection).

Corrections 2026-11-11

On 2026-11-11 the samples that come from HESRT, the earlier H&E collection that is part of this dataset (source_pipeline = hesrt), were compared value by value with the files deposited in GEO. The check found problems in 18 samples. We replaced 12 of them and withdrew 6. No other expression or coordinate file changed. On the same day an image-registration screen led to the removal of the image of nine more samples (see the end of this section). The numbers at the top of this card describe the current data. The figures and composition tables further down still show the paper release (v1.0.0-20261025, 12,163 samples); they count the six withdrawn samples and describe the 12 replaced samples by their old files.

Replaced (12 samples). Each sample was converted again from the deposited files. The new files were compared with the deposit value by value, and the author reviewed each sample by eye.

Study Samples What was wrong What changed
GSE205707 GSM6896311 to GSM6896316 The counts and gene names were generated by the conversion script. They were not read from the deposit. New expression matrix from the deposited counts (32,285 genes for the two mouse samples and 32,704 for the four dog samples; more spots than before). Image unchanged.
GSE275125 GSM8465980 to GSM8465983 The counts and gene names were generated by the conversion script. They were not read from the deposit. New expression matrix from the deposited counts. Image unchanged.
GSE294965 GSM8933093 The cell positions were drawn at random. The image was a low-resolution copy that was labelled H&E. Cell positions from the deposit, and the full-resolution DAPI image (0.5 µm per pixel).
GSE186290 GSM5643203 The expression rows were in a different order from the spots, so each spot carried the counts of another spot. The spot positions were right. Each spot now has its own expression row. Image unchanged.

For these 12 samples the catalog (catalog/samples.parquet) now gives coordinates in micrometres (coordinate_units = um) and names the new conversion in source_pipeline and source_release. Two new values appear in image_registration: DEPOSITED_ALIGNMENT_FIT (the spot-to-image transform was fitted from the deposited alignment file) and DEPOSITED_PIXEL_FRAME (the deposited positions are already in image pixels).

Withdrawn (6 samples). Their folders are removed from main. A note for each is in review-revocations/ of the main dataset.

Study Samples Reason
GSE298115 GSM9008651, GSM9008653 The expression rows were in the wrong order. A corrected conversion has the right values, but the spots do not sit on the tissue in the image, because the deposit has no scale-factor file. It did not pass review. The other four samples of this study stay.
GSE244723 GSM7825036 to GSM7825039 The deposited count tables have no gene names. The values were equal to the deposit, but the samples cannot be used for any analysis by gene. The whole study is withdrawn.

Counts. The paper release had 12,163 samples in 1,265 study folders. The current data has 12,157 samples in 1,264 study folders. The no-login starter pack has 86 samples (was 88): GSM7825036 and GSM7825037 are removed, and GSM8933093 is replaced.

If you used these samples. Do not use results computed from the old files of the 12 replaced samples or of the two GSE298115 samples. For the 12 replaced samples, redo them with the new files. For the two GSE298115 samples, drop them. The four GSE244723 samples had correct values but placeholder gene names, so any result by gene from them has no meaning.

Samples whose spots do not sit on the tissue (9 samples, image removed). On the same day the image registration of the same HESRT samples was screened, and the author looked at every flagged sample. In nine samples the spots do not match the image: GSM7156292 to GSM7156295 (GSE229175), GSM9097318 and GSM9097320 (GSE302160), GSM8925216 (GSE294844), GSM8770960 (GSE288607) and GSM9317397 (GSE311123). Their image was removed from the data on 2026-11-11. Their expression values and coordinates are equal to the deposit and stay in the data. This differs from the HESRT dataset, where release 2026-09-17-v1.6 withdraws these nine samples completely. In the catalog these nine samples now have has_image = False, image_registration = WITHHELD and the flag image_review_fail. If you paired image patches with expression for these samples, drop those results. In 16 further HESRT samples the spots match the tissue, but the image covers only part of the spots (5% to 50% of the spots fall outside it). They carry the flag image_partial_coverage; filter spots by the image bounds before you extract patches. The samples that do not come from HESRT have not been screened in this way yet.

Versions. The current data is tag v1.3.0-20261111 of the main dataset. Tag v1.2.0-20261111 holds the data after the 12 replacements and 6 withdrawals, but it still has the nine removed images. The paper tag v1.0.0-20261025 is unchanged and still holds the old files, so earlier work can be traced. The gene search index was updated for the changed samples. The sample metadata is version 2.2.4: it drops the six withdrawn samples and marks the nine samples that lost their image; the curated annotations of all other samples did not change. The sda-db toolkit reads the paper tag by default, so it still returns the old files of these 27 samples (12 replaced, 6 withdrawn, 9 with the image removed) until its next release; to get the current files now, download them with huggingface_hub and revision="v1.3.0-20261111".

Curated sample metadata v2 (version 2.2.4, 2026-11-11)

metadata/v2/ adds a curated table on top of the current 12,157 samples. The paper release is still tag v1.0.0-20261025; the corrected data and the current metadata are tag v1.3.0-20261111 of the main dataset. Version 2.2.4 marks the nine samples whose image was removed on 2026-11-11 (has_image, image_stain, image_registration, flags and the review columns). Version 2.2.3 drops the six samples withdrawn on 2026-11-11 and updates the file-derived columns (for example n_obs, coordinate_units, image_registration) of the 12 replaced samples; no curated annotation changed. Version 2.2.2 (tag metadata-v2.2.2-20261108) only moved the most-used columns to the front.

In the Dataset Viewer, metadata_v2 (the default) shows this table and samples shows the catalog (catalog/samples.parquet).

  • 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.