Datasets:
|
Download README.md from Biogod/SpatialDataAgent-DB: direct link, hf CLI and curl.
- Browser
- Download file 22.7 kB
-
https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB/resolve/main/README.md
- Command line
-
hf download hf://datasets/Biogod/SpatialDataAgent-DB/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB/resolve/main/README.md
22.7 kB
| pretty_name: SpatialDataAgent-DB | |
| language: | |
| - en | |
| 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 | |
| - spatial-omics | |
| - multimodal | |
| - anndata | |
| - histology | |
| - gated | |
| extra_gated_prompt: 'Access requests are reviewed manually. Use an email address issued by your institution that has been added and verified in your Hugging Face account. It may be your primary email or an additional email; you do not need to change your primary email. | |
| Hugging Face automatically shares your primary email with the maintainers. If that is already your institutional address, you may use it for this request. If your institutional address is an additional email, enter it in the additional institutional email field below; this is required in that case. | |
| A personal primary email, such as Gmail, does not by itself disqualify your request. The institutional contact address used for review must be issued by your institution. Personal providers such as Gmail, Hotmail/Outlook.com, Yahoo, iCloud, QQ, 163/126 and Proton Mail cannot serve as that institutional contact address. Institution-controlled domains hosted through Google Workspace or Microsoft 365 are acceptable. | |
| Provide your full name, official institution and department, and intended research use. Each user must apply through their own account and wait for manual approval. Original source-specific data-use terms and attribution requirements remain applicable.' | |
| extra_gated_fields: | |
| Applicant full name: text | |
| Institution and department (full official names): text | |
| Organization category: | |
| type: select | |
| options: | |
| - University or research institute | |
| - Hospital or healthcare organization | |
| - Company | |
| - Other institution | |
| Additional institutional email (required if your institutional email is not your primary Hugging Face email): | |
| type: text | |
| optional: true | |
| Primary purpose: | |
| type: select | |
| options: | |
| - Spatial-omics research | |
| - Method development or benchmarking | |
| - Machine-learning training or evaluation | |
| - Research education | |
| - Other research use | |
| Intended use / Research purpose: text | |
| Commercial involvement: | |
| type: select | |
| options: | |
| - No commercial involvement | |
| - Commercial or industry-related work | |
| - Unsure (explain in the research purpose) | |
| I confirm that this institutional email is added and verified in my HF account (primary or additional): checkbox | |
| I confirm that my identity, institutional affiliation and intended use are accurate: checkbox | |
| I acknowledge the original source-specific data-use terms and attribution requirements: checkbox | |
| extra_gated_heading: Request access to SpatialDataAgent-DB | |
| extra_gated_description: Manual review. Use a verified institutional email added to your Hugging Face account, as a primary or additional email. No primary-email change is required. | |
| extra_gated_button_content: Submit access request | |
| configs: | |
| - config_name: metadata_v2 | |
| data_files: metadata/v2/samples_metadata_v2.parquet | |
| default: true | |
| - config_name: catalog | |
| data_files: catalog/samples.parquet | |
| # SpatialDataAgent-DB | |
|  | |
| *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.* | |
| SpatialDataAgent-DB brings standardized spatial expression measurements, coordinates, matched tissue images, quality annotations and source evidence together in a versioned collection. | |
| **Complete, verified sample release.** All files in the selected export inventory passed content verification. Use the `v1.0.0-20261025` release tag to reproduce the paper. Tag `v1.3.0-20261111` holds the data after the [corrections of 2026-11-11](#corrections-2026-11-11): 12 samples replaced, 6 withdrawn, and the image of 9 samples removed. The table shows the corrected data. | |
| | Selected source snapshot | Size | | |
| |---|---:| | |
| | Samples | 12,157 | | |
| | Spatial observations | 635,244,564 | | |
| | Samples with images | 8,196 | | |
| | Published study folders | 1,264 | | |
| | SDA-All / HESRT samples | 7,789 / 4,368 | | |
| The source is `sda-unified-20261010-v3`, including its applied deduplication. Spatial observations include spots, bins, cells and beads; they are not independent patients. This collection integrates SDA-All and HESRT records and should not be concatenated with the full HESRT release without checking overlap. | |
| ## Explore the collection | |
|  | |
| *Sample counts by platform, image availability, source collection and retained split (n = 12,163, the paper release; source snapshot: sda-unified-20261010-v3).* | |
| The [SDA-All Spatial Atlas](https://sda-all-spatial-atlas.biogod2020.chatgpt.site/) is the companion exploration interface. The downloadable catalog provides one row per sample, with study, platform, organism, tissue, expression state, coordinate units, available images, registration, review, QC, content group and split. Study counts, sample counts and observation counts answer different questions. | |
| The companion portal organizes metadata into **Biology, Assay, Evidence and Provenance**. This export also supplies source-bound `atlas-sample-metadata.jsonl` and `atlas-study-metadata.jsonl`: disease/condition, reported age and sex, available donor identifiers, publication links, study titles/designs and existing audit evidence. Missing values remain explicit; vocabulary, age units and organism labels have not been harmonized into ontologies or a resolved species count. | |
| The portal's Metadata view supports linked distributions, cross-tabs, completeness and numeric ranges with sample or observation weighting. Those are exploration tools; this Dataset Card reports the full inventory without selecting a favorable subset. | |
| | Platform | Samples | | |
| |---|---:| | |
| | Visium | 6512 | | |
| | Xenium | 1785 | | |
| | ST (legacy) | 1098 | | |
| | CosMx | 1092 | | |
| | MERFISH/MERSCOPE | 463 | | |
| | Slide-seq | 380 | | |
| | Other | 299 | | |
| | Visium HD | 223 | | |
| | Stereo-seq | 208 | | |
| | Molecular Cartography | 47 | | |
| | DBiT-seq | 32 | | |
| | BMK S1000 | 24 | | |
| ## Access requirements | |
| The [public metadata catalog](https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB-Catalog) can be browsed without data access approval. Companion portal access is managed separately from Hugging Face access. | |
| SpatialDataAgent-DB files require **manual access approval and a verified institutional email registered in your Hugging Face account**. The institutional email may be your **primary or an additional email**. **You do not need to change your primary email.** | |
| 1. Add and verify the email address issued by your university, research institute, hospital or company in your existing Hugging Face account. It may remain an additional email. | |
| 2. Hugging Face automatically shares your primary email with the maintainers. If your primary email is already your institutional address, you may use it and leave the additional-email field blank. Otherwise, **enter your verified institutional address in the additional institutional email field**. A personal primary email such as Gmail may remain unchanged. | |
| 3. Complete the form with your full name, official institution and department, research purpose and commercial involvement. Confirm that the institutional email used for the request has been added and verified in the same Hugging Face account. | |
| 4. Wait for manual review before downloading files. Each person must apply using their own account. | |
| **The institutional contact address must be issued by your institution.** Gmail/Googlemail, Hotmail/Outlook.com, Yahoo, iCloud, QQ, 163/126 and Proton Mail addresses cannot serve as the institutional contact, but a personal address may remain your Hugging Face primary email. Official institutional domains hosted through Google Workspace or Microsoft 365 are eligible; an unfamiliar or personal custom domain is not automatically institutional. Institutional domains are not limited to `.edu`. | |
| Requests without a verified institutional address registered in the same Hugging Face account, or with unverifiable affiliations, will not be approved. This access policy does not replace the original source-specific data-use terms. | |
| Once access is approved, sign in locally with `hf auth login`. The examples below use your saved Hugging Face credentials. | |
| ## Sample format | |
| ```text | |
| catalog/ | |
| samples.parquet | |
| samples.csv | |
| studies.csv | |
| schema.json | |
| summary.json | |
| atlas-sample-metadata.jsonl | |
| atlas-study-metadata.jsonl | |
| samples/<study>/<sample>/ | |
| spatial.h5ad | |
| sample.json | |
| image.tif # when available | |
| provenance/ | |
| file-manifest.jsonl # added after the upload manifest is frozen | |
| ``` | |
| `spatial.h5ad` stores expression and observation coordinates. Keep original feature IDs, expression state and coordinate units when combining samples. `image.tif` is the selected tiled pyramidal image; `sample.json` carries its spatial-to-pixel transform, modality, registration and provenance. Original H5AD/TIFF contents are preserved. Historical machine paths in exported JSON are converted to `source-reference://` identifiers; these identify provenance and are not download URLs. | |
| Some ancillary segmentation and molecule records identify original source assets rather than supplying the assets themselves. Their presence in metadata does not imply the files are included in this upload. | |
| ## Toolkit for people and AI agents | |
| The [spatial-data-agent-db](https://github.com/Biogod2020/spatial-data-agent-db) toolkit is a Python package, CLI | |
| and MCP server for this dataset. It can: | |
| - search the release by keywords, filters and measured genes; searching needs no login; | |
| - report download sizes before any transfer; | |
| - download samples and check each file against its SHA256; | |
| - read samples as AnnData and cut image patches; | |
| - write citations for the database and the original studies. | |
| ```bash | |
| pip install "spatial-data-agent-db[analysis] @ git+https://github.com/Biogod2020/spatial-data-agent-db" | |
| sda-db search alzheimer hippocampus --organism human --has-image | |
| sda-db search --gene GFAP --gene AQP4 --platform Xenium | |
| sda-db download GSM8185219 --dry-run | |
| claude mcp add sda-db -- sda-db mcp # AI agents, via the Model Context Protocol | |
| ``` | |
| ## Download the catalog and a sample | |
| After access is approved: | |
| ```python | |
| from huggingface_hub import hf_hub_download | |
| path = hf_hub_download( | |
| repo_id="Biogod/SpatialDataAgent-DB", | |
| repo_type="dataset", | |
| filename="catalog/samples.parquet", | |
| token=True, | |
| ) | |
| ``` | |
| The catalog's `sample_dir` column is the repository-relative sample directory. Use `sample_dir + "/spatial.h5ad"` for expression, `sample_dir + "/sample.json"` for metadata, and `sample_dir + "/image.tif"` only when `has_image` is true. These are downloadable repository paths; historical `source-reference://` provenance identifiers are not. | |
| After the full upload completes, for example: | |
| ```python | |
| import pandas as pd | |
| from huggingface_hub import hf_hub_download | |
| catalog = pd.read_parquet(path) | |
| row = catalog.loc[catalog["gsm"] == "GSM9721856"].iloc[0] | |
| expression_path = hf_hub_download( | |
| repo_id="Biogod/SpatialDataAgent-DB", | |
| repo_type="dataset", | |
| filename=f"{row['sample_dir']}/spatial.h5ad", | |
| token=True, | |
| ) | |
| ``` | |
| AnnData/Scanpy can read `expression_path` after download. Pin a completed release tag via the `revision` parameter for reproducibility. | |
| ## Machine learning and streaming | |
| This release publishes full samples and their catalog. The [toolkit](https://github.com/Biogod2020/spatial-data-agent-db) streams verified samples one at a time within a disk budget. Streaming-ready expression/image training shards remain a planned follow-up output and are not claimed to be available in this release. Streaming the catalog alone does not stream the expression matrices. | |
| Keep H&E, DAPI, other fluorescence and no-image profiles distinct. Unmeasured genes differ from measured zero expression; preserve feature panel masks and species-specific identifiers. Use only expression explicitly verified as counts when raw counts are required. | |
| ## Splits and quality | |
| Existing source-bound counts-capability checks cover 7,777 SDA-All samples: **7,336 VERIFIED, 24 UNRESOLVED and 417 ABSENT**. These checks are not recorded for the 4,386 HESRT records, whose legacy integer/non-integer expression annotations remain distinct. These are capability annotations, not model accuracy or an all-sample human-review rate. | |
| The retained source split has 9,249 training, 1,316 validation and 1,598 test samples. It uses the recorded series grouping. It does not prove donor independence across studies; content groups, aliases and known donor information require additional leakage checks for a particular benchmark. | |
| QC annotations, expression verification, image registration and human review describe different checks. Not every sample has human review or a confirmed H&E image. Heuristic stain labels and unresolved units remain explicit in the catalog. | |
| ## Version and provenance | |
| Source snapshot: `sda-unified-20261010-v3`. Source catalog SHA256: `909c4ec50e71c636eadc7bf01a9479fef1b4fd480ac348dfea6b785e566c7bed`. | |
| Every uploaded measurement is checked against the source content hash and verified against the remote object metadata before integration. A release tag is created only after the entire selected file inventory passes final verification. Later collection cycles require a new source snapshot and are not silently mixed into this one. | |
| ## Data use and source terms | |
| Records retain their original study accessions, attribution and source-specific terms. This aggregation does not replace the original sources' permissions with a single permissive license. Consult the relevant source study before redistribution or reuse requiring additional permission. Contact the repository maintainers through Hugging Face for collection issues. | |
| ## 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 `catalog` shows the file index | |
| (`catalog/samples.parquet`). The catalog on `main` also lists 69 samples added on 2026-10-30 through the reviewed | |
| daily delivery; they are not yet in metadata v2. | |
| - `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`. | |