Datasets:
|
Download metadata/v2/README.md from Biogod/SpatialDataAgent-DB-Catalog: direct link, hf CLI and curl.
- Browser
- Download file 11.2 kB
-
https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB-Catalog/resolve/main/metadata/v2/README.md
- Command line
-
hf download hf://datasets/Biogod/SpatialDataAgent-DB-Catalog/metadata/v2/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Biogod/SpatialDataAgent-DB-Catalog/resolve/main/metadata/v2/README.md
11.2 kB
| # SpatialDataAgent-DB sample metadata v2 | |
| Schema `sda-sample-metadata-2`, version 2.2.4 (2026-11-11), built from release v3 (`sda-unified-20261010-v3`, 12,163 samples) and reduced to the | |
| 12,157 samples that remain after the corrections of 2026-11-11. | |
| No expression, coordinate or image file changes; v2 is a new metadata table that sits next to the release. | |
| ## Files | |
| | File | Content | | |
| |---|---| | |
| | `samples_metadata_v2.parquet` | one row per sample, list columns kept as lists (recommended) | | |
| | `samples_metadata_v2.csv` | the same table; lists joined with `;`, confidence as JSON | | |
| | `studies_v2.csv` | one row per study (1,264): title, species, platforms, assays, organs, diseases, PubMed IDs, split | | |
| | `schema_v2.json` | definition of every column | | |
| | `changes_v2.csv` | every value that differs from a v3 column, with its basis (204 platform changes, 32 manual corrections in 14 samples) | | |
| | `dropped_disease_terms.csv` | disease terms removed by the short-synonym filter (331) | | |
| | `qa_v2.json` | counts and consistency-flag totals | | |
| ## What is new for users | |
| - **Organ and tissue.** Each sample has an organ from a fixed list of 43 (a metastasis is placed at its site), | |
| and 11,605 samples (95%) have a UBERON tissue term (279 distinct terms). The GEO text stays in `tissue_raw`. | |
| - **Disease.** Each sample has a `disease_status`: disease 7,023, normal 3,948, perturbation 1,125, not stated 67. | |
| "Perturbation" covers interventions that are not a named disease, such as a knockout without a disease name, a | |
| drug, mechanical loading or regeneration. 6,479 samples have MONDO terms (404 distinct); a sample can have more | |
| than one, for example IPMN with co-occurring PDAC. The control arm of a disease or tumour model counts as | |
| disease, not normal. | |
| - **Sample kind.** primary tissue 8,574, tumour tissue 2,754, metastasis 352, organoid 212, xenograft 185, whole | |
| embryo/organism 57, cell culture 17, engineered tissue 10, unknown 2. | |
| - **Donor.** | |
| - `life_stage`: embryonic, fetal, neonatal or infant, juvenile, adult, aged, or not stated. 5,103 samples have a | |
| stated stage. Where the age notation is unambiguous, the stage comes from a fixed age rule (3,752 samples); | |
| otherwise from the model. Rule for mouse and rat: neonatal up to P21, juvenile under 6 weeks, adult under | |
| 18 months, aged from 18 months. For human, ages in years or post-conception weeks. | |
| - `sex`: male 2,689, female 2,012, mixed 21, unknown 7,441 (77 taken from the words male / female in the sample's own title or characteristics). Coded values without a key, such as 1/2, stay | |
| unknown. | |
| - `donor_key` = `<study>:<donor>`, for donor-level splits (3,391 samples). | |
| - **Species.** | |
| - NCBI Taxonomy ID and common name for all 42 host species. | |
| - Mixed entries are split. 78 samples list several species and 36 are xenografts; pathogens such as | |
| *Plasmodium berghei* go in `co_detected_organisms`. | |
| - Two series that GEO lists only as the genus *Mus* are set to house mouse. The evidence for each is recorded: | |
| a C57BL/6J strain in one, ENSMUSG gene IDs in the other. One series that GEO lists only as Hepatitis B virus | |
| is set to human, from its gene IDs. | |
| - `feature_species` gives the species implied by the Ensembl gene IDs (8,032 samples). It differs from | |
| `organism` for 47 samples (flag `feature_species_differs`). Most are macaque or rat tissue mapped to a human | |
| or mouse reference, or mouse hosts carrying human grafts. In one study (GSE313530) the macaque and baboon | |
| samples carry each other's gene IDs; check it before any cross-species use. | |
| - **Assay.** `assay_name` gives the specific method (Visium CytAssist, Slide-seqV2, Open-ST, Pixel-seq, Decoder-seq, | |
| ...), and `assay_type` says whether it is imaging-based or sequencing-based. | |
| - Of the 299 v3 samples labelled "Other", 197 now belong to a named platform family: DBiT-seq 100, BMK S1000 51, | |
| Molecular Cartography 23, Visium 18, Slide-seq 5. | |
| - Nova-ST (7 samples) was labelled Stereo-seq in v3 and is now Other. | |
| - All are listed in `changes_v2.csv`. The assay of each "Other" study was checked by hand against the GEO text. | |
| - **Preservation.** FFPE 2,839, fresh frozen (including OCT-embedded) 2,327, fixed frozen 40. | |
| - **Publications.** PubMed IDs for 8,479 samples, from GEO series and sample records. | |
| - **Review fields** are in English. | |
| ## How the annotations were made | |
| 1. **Input.** For each sample: the release tissue, organism and platform, plus the GEO sample title, source and | |
| characteristics and the series title. | |
| 2. **Model.** Official GPT-6 Luna Decisions (`api.openai.com/v1/decisions`). This API answers only multiple-choice | |
| and yes/no questions, so the model chooses from fixed lists and never writes free text or ontology IDs. | |
| - Step 1: organ, sample kind, disease status and life stage. | |
| - Step 2: one UBERON term from candidates. Each candidate MONDO term is a separate yes/no question. | |
| 3. **Candidates.** A script finds candidate terms in the text by exact name or synonym match. It handles organ | |
| adjectives (peritoneal → peritoneum), plurals, British spelling, possessives, common disease abbreviations and | |
| standard disease-model names (5xFAD, R6/2, SOD1-G93A, mdx …). The direct parents of each matched term are added. | |
| All IDs come from the ontology files (UBERON basic and MONDO, downloaded 2026-11-04). | |
| 4. **Fixed rules after the model.** | |
| - The most specific true MONDO terms are kept. | |
| - A true disease term sets the status to disease. | |
| - Disease terms that matched only through a short upper-case synonym (e.g. "CHS", "SARS" inside "SARS-CoV-2") | |
| are dropped. | |
| - The organ follows the UBERON term's part-of chain when that chain names a different listed organ. | |
| - Life stage comes from the age rule where the notation is unambiguous. | |
| 5. **Versions.** Each row records its `annotation_version`. | |
| - 2.3 is the main run. | |
| - 2.4 re-asked the 842 non-human, non-mouse samples (species-aware life stage) and the samples that mention | |
| SARS-CoV-2. | |
| - 2.5 re-asked 303 samples whose text contains a disease adjective such as "diabetic". | |
| 6. **Confidence.** Luna's confidence is stored per field. Fields below 0.6 are listed in | |
| `annotation_low_confidence` (3,119 samples, mostly disease status). | |
| ## Accuracy | |
| The checks ran on 300 random samples never used to develop the method. Gemini 3.8 Flash judged each field against | |
| the same source text, and every "wrong" verdict was then read by hand (Claude). | |
| | Field | Judge "wrong" rate (300 random samples, final build) | | |
| |---|---| | |
| | organ | 0.3% | | |
| | tissue term | 0.7% | | |
| | sample kind | 0.7% | | |
| | life stage | 1.7% | | |
| | disease | 3.0% | | |
| - **Disease.** Most "wrongs" are a study-level disease given to a control (see limitations), or a missing term | |
| where the status is right. | |
| - **Life stage.** The remaining "wrongs" are ages the rule leaves to the model, such as "0d" or an unlabelled | |
| number in an embryo study. | |
| - **"Acceptable"** (true but less specific) was 1–13% per field. | |
| ## Known limitations | |
| - The study-level disease sometimes reaches a control whose own record does not say it is a control (about 1.5% | |
| of samples in QA). For example, a "WT" sample in a pulmonary hypertension study got pulmonary hypertension. | |
| Check `disease_status_source` and the raw fields when the control/disease split matters. | |
| - Vagina and pleura are not in the organ list, so those samples are "other" or "lung". | |
| - Disease abbreviations outside the curated list (e.g. "MN" for membranous nephropathy) give a disease status | |
| without a MONDO term. | |
| - `life_stage` is "not stated" for 7,060 samples: most GEO records give no age. | |
| - 20 samples are flagged `normal_but_disease_text`: the raw disease field names a disease but the sample was | |
| judged normal. Most are tissue adjacent to a tumour, which is correct; the rest are unclear. | |
| ## Reproduce | |
| Scripts are in `research/metadata-v2-20261104` and `research/tissue-ontology-pilot-20261104` of the project | |
| repository: | |
| - `map_decisions.py --all`: annotation (resumable); | |
| - `assay_decisions.py`: assay of the "Other" studies; | |
| - `build_metadata_v2.py`: this table; | |
| - `qa_full.py`: QA sample and judge. | |
| ## Versions | |
| - **2.2.4** (tag `v1.3.0-20261111` of the main dataset): the image of nine misaligned HESRT samples was removed (GSE229175, four | |
| samples; GSE302160, two samples; `GSM8925216`; `GSM8770960`; `GSM9317397`). For these samples `has_image` is False, | |
| `image_stain` and `image_um_per_px` are empty, `image_registration` is `WITHHELD`, and `flags` holds | |
| `image_review_fail`. No curated annotation changed. | |
| - **2.2.3** (tag `v1.2.0-20261111` of the main dataset): six withdrawn samples removed (GSE244723, four samples; GSE298115, | |
| `GSM9008651` and `GSM9008653`); for 12 samples whose files were replaced, the file-derived columns were | |
| updated. No curated annotation changed. Counts elsewhere in this file describe version 2.2.2 (12,163 samples). | |
| - **2.2.2** (tag `metadata-v2.2.2-20261108`): column order only. The columns users look for first lead the table | |
| (gsm, organ, disease_status, disease_ontology_names, tissue_ontology_name, sample_kind, organism, | |
| organism_common_name, life_stage, sex, platform, assay_name, has_image, image_stain, n_obs, study_title, | |
| published_gse, gse); the others follow in their former order. No value changed. | |
| - **2.2.1** (tag `metadata-v2.2.1-20261106`): a field corrected by hand no longer carries the model's confidence or | |
| low-confidence flag, so `annotation_low_confidence` filters keep human-checked samples. The schema text now lists | |
| every `life_stage_source` value. No label changed. | |
| - **2.2** (tag `metadata-v2.2-20261106`): corrections from a human reader's review of the 200-sample pack. | |
| - Rules applied to every sample: | |
| - MONDO "..., non-human animal" terms are removed from human samples (16 samples). | |
| - Organoids, cultures and engineered tissue get life stage "not stated", because culture time is not the donor's | |
| age. | |
| - Sex is read from the words male / female in the sample's own text when the extracted field is empty | |
| (77 samples). | |
| - Mouse and rat ages in days within an age series (e.g. "0d") are read as postnatal days. | |
| - Manual corrections in 10 samples, each with its basis in `overrides_v2.csv`: | |
| - actinic keratosis for the 5 GSE294844 samples (the series design says so; the sample records do not); | |
| - "HD" read as healthy donor; | |
| - a diverticular fistula read as diverticulitis, not IBD; | |
| - Cre-only and wild-type controls set to normal; | |
| - a graft with no stated site set to organ "other". | |
| - New column `sex_source`. | |
| - **2.1** (tag `metadata-v2.1-20261105`): each assay now has one name (for example "Resolve Molecular Cartography" | |
| became "Molecular Cartography", and "Visium (FFPE)" became "Visium", since preservation is its own field). | |
| `um_per_unit` and `image_um_per_px` are copied exactly from the release parquet. Organ, tissue, disease, life stage and the other annotations did not change. One derived field did: `assay_type` of the 6 ISS (Cartana) samples of GSE227046 is now imaging-based (it was sequencing-based). | |
| - **2.0** (tag `metadata-v2-20261105`): first release. | |