Methods And Provenance

Transparent derivation is part of the database, not an afterthought.

UMDB ingests public sequencing metadata, preserves run-level provenance, enriches records with project and location context, and republishes the result as versioned web artifacts. This page describes the current workflow in reviewer-facing terms.

Published Database Structure

Database overview

The site loads a compact index rather than every run: runs aggregated by BioProject, release year, place, assay and eligibility tier. Opening a BioProject fetches that project's BioSamples and runs on demand.

Index: docs/db/summary.json, docs/db/cube.json and docs/db/projects.json (well under 1 MB compressed in total).
Projects: docs/db/p/<BioProject>.json hold each project's samples and runs. Full tables are published as Parquet releases.

What is in each record?

Core fields are sourced from SRA RunInfo and joined with optional enrichments:

runinfo_row SRR, BioProject, BioSample, dates, platform, and center metadata from the public run record.
bioproject Project accession and title when those enrichments are available.
geo Country and city fields derived from BioSample and location parsing.
assay Assay class labels such as WGS, RNA-seq, or 16S/ITS for filtering and summary analytics.

Geo-resolved browsing

The explorer includes Require Country/City and Exclude (unknown) options so users can restrict browsing to records with more complete geographic resolution when location-aware discovery is the priority.

Workflow Summary

1. Discovery

Harvest candidate records from NCBI-linked resources

The pipeline queries public NCBI resources and tracks associated SRA identifiers, BioProjects, and BioSamples that match the project’s urban environmental collection strategy.

2. Normalization

Preserve SRR-level metadata with stable keys

RunInfo-derived fields such as accession, dates, sequencing center, library strategy, platform, and download path are stored alongside the original SRR accession so the record remains auditable.

3. Enrichment

Attach BioProject and geographic context

Linked project metadata and parsed location fields are added when available, allowing the interface to summarize records by study, geography, and assay class.

Technical Documentation

Acquisition Layer

How records enter the database

Search strategy UMDB queries public NCBI-linked resources with one or more urban-environment query profiles rather than relying on a single keyword expression. This increases recall for studies described with different vocabulary.
How "urban" is decided (inclusion criteria) A run enters UMDB if its SRA experiment matches at least one of seven urban-environment query profiles, built on NCBI environment organism labels (such as wastewater metagenome) and urban phrases. A sample-level eligibility screen then checks, for every run, that the material is an environmental sample (not host, clinical or laboratory material) and that there is evidence of urban origin. It labels each run confirmed_urban, probable_urban, uncertain, non_urban or non_environmental, and records the evidence. Confirmed requires sample-level urban evidence (explicit urban setting or named urban infrastructure); a city name alone gives at most probable. Nothing is deleted: use the explorer's Urban eligibility filter or the eligibility.status field. The rules are not yet benchmarked against expert labels. Full inclusion criteria, exact queries, and filtering recipes.
Primary execution commands The harvester is driven through python3 -m scripts.umdb_harvester with the main commands crawl, daily, backfill-year, and curate-ai.
Run-level accumulation Newly discovered records are appended into year-scoped JSONL catalogs under data/, which function as the internal accumulation layer before the web release is rebuilt.
Deduplication The pipeline tracks seen SRA UIDs and SRR accessions so repeated crawl runs do not re-emit the same accession into the release catalogs.
Enrichment Layer

How metadata are normalized and joined

RunInfo backbone Each record starts from SRA RunInfo-style fields such as SRR accession, BioProject, BioSample, sequencing center, library strategy, release date, and run download path.
BioProject joins When enabled, linked BioProject records are cached and joined to add project accession, title, description, and related project-level context.
BioSample joins BioSample metadata are inspected for structured attributes, free-text descriptions, and location-related fields. If latitude and longitude are present, they are propagated into the record and used by the map views.
Derived annotations Geographic harmonization and assay-class labeling are computed from the original public metadata and added as derived fields rather than replacing the source record.
Location validation (gazetteer) Each BioSample gets exactly one accepted location per release. The submitted geo_loc_name is matched to an ISO 3166 country, a GeoNames first-order region and a GeoNames populated place (places with 500 or more inhabitants), and checked against reported coordinates. Statuses: verified (the text names exactly one place, and precise coordinates, if any, agree), probable (chosen among same-named places by population, inferred from coordinates alone, or a region named after its main city), ambiguous, conflicting (precise coordinates far from the named place, or in another country) and unresolved. Only verified and probable places appear in city filters and maps; a sample whose city cannot be validated still counts toward its country. A missing city is preferred to a wrong one, and the submitted text is always shown next to the accepted location.
AI Review Layer

How AI-assisted curation is applied

Purpose AI review is used as a metadata curation layer, not as the source of record. It evaluates whether the available evidence is sufficient, whether a sample appears to come from an urban context, and whether country, city, or assay annotations likely need correction.
Evidence inspected The curation step considers the harvested record, linked BioSample metadata, linked BioProject metadata, titles, descriptions, and other available repository text together before writing an ai_curation object.
Non-destructive output Original metadata are preserved. AI-reviewed values are stored alongside them as proposals such as final_country, final_city, and final_assay_class, plus review flags such as metadata_sufficient and urban_origin. Proposals are shown with the record but never change counts, filters or the accepted location.
Caching AI reviews are cached so repeated runs do not need to re-curate unchanged records unless an overwrite pass is explicitly requested.
Publication Layer

How the website is generated

Export rebuild The exporter reconstructs the public release from internal catalogs and caches, then writes browser-consumable JSON into docs/db/.
Chunked delivery Large SRR collections are split into a manifest file plus one or more part files so the browser can stream the release in manageable pieces instead of loading one monolithic document.
Client-side aggregation The website loads SRR-level data in JavaScript and aggregates it into BioProject-level views, analytics panels, charts, maps, and export bundles directly in the browser.
Release traceability Each rebuild records a generation timestamp in the public manifest so readers can tell when the current release snapshot was produced.

Operational Flow

1. Discovery crawl A crawl, daily refresh, or year backfill queries the target search profiles and resolves matching SRA-linked records.
2. Record ingestion Matching UIDs are normalized into SRR-level records, deduplicated, and appended into the internal year-scoped catalogs under data/.
3. Linked enrichment Optional BioProject and BioSample fetches populate caches that support project descriptions, location harmonization, and sample-coordinate recovery.
4. AI curation If enabled, the curation layer reviews existing or newly harvested records and writes AI review objects into the curation cache.
5. Public export rebuild Export generation merges source metadata, derived annotations, and AI review fields into the public JSON release in docs/db/.
6. Browser delivery The explorer, analytics, charts, downloads, and global map all consume those published JSON artifacts directly in JavaScript.

Automation And Reproducibility

Local execution

The same Python CLI used in development can be run locally for deep searches, targeted backfills, and full AI curation passes. This keeps the acquisition and publication logic aligned across local and hosted runs.

GitHub Actions execution

Repository workflows can run scheduled refreshes as well as manual full-dataset AI curation. The full-dataset workflow invokes curate-ai, rebuilds exported artifacts, and commits updated release files back into version control.

Versioned public release

Because the published database lives in tracked repository artifacts, each site update is inspectable as a versioned release snapshot rather than an opaque database mutation.

From Catalog To Hypothesis Tests

Catalog-level tests

A companion Nextflow pipeline (STRIGA) freezes a snapshot of the database and tests pre-specified hypotheses about where urban sequencing happens. It covers coverage relative to population, links to economic development, the effect of COVID-19, habitat bias, metadata completeness, concentration in few centres and the spread of sequencing technologies. It also writes a blinded sheet for expert benchmarking of the eligibility screen.

Uniform reprocessing

The pipeline selects a shotgun cohort balanced across habitats, cities and independent studies, streams depth-capped reads from SRA, and profiles species, KEGG orthologs, antimicrobial resistance genes and viral contigs with one fixed workflow and pinned tool versions.

Ecological principles

On those profiles it tests whether habitat outweighs geography, whether function converges across cities, how diversity scales with city size, and whether communities can be predicted in held-out cities. It also tests links through air travel and between habitats, undiscovered diversity, hemisphere-aligned seasonality and resistome ecology. Each test states its decision rule in advance and reports its caveats.

Included Fields
runinfo_row Core SRA RunInfo metadata including SRR accession, BioProject, BioSample, release date, platform, center, and run download path.
bioproject Project-level metadata such as title, description, accession, data type, and project URLs when available from NCBI.
geo Parsed location fields including country, city, raw source string, and optional latitude or longitude values when present.
assay Heuristic assay classifications derived from run metadata for high-level filtering and summary analytics.
ai_curation Optional AI-reviewed sufficiency, urban-origin, and corrected final annotations stored alongside the original metadata fields.
Important Caveats
Metadata inherit repository ambiguity If the original public submission is incomplete or inconsistent, UMDB can expose that inconsistency but cannot fully repair it automatically.
Geographic validation has limits Locations are validated against ISO 3166 and GeoNames, but the input is still free text written by submitters. Places smaller than 500 inhabitants, districts within cities and sites described only by a facility name are not resolved to a place, and the submitter's country is taken at face value unless precise coordinates contradict it.
Assay classes are summary labels The displayed assay grouping is useful for browsing and counts, but exact downstream analytical suitability should still be confirmed against the original records.

Quality Notes

Static publication model

The public site is distributed as static artifacts under docs/, which reduces infrastructure fragility and makes each published snapshot inspectable in version control.

Chunked database delivery

Large SRR collections are published as a manifest plus part files, enabling browser-based access without requiring a dedicated server-side database.

Expandable provenance

The main explorer aggregates by BioProject for readability but preserves underlying SRR-level rows so users can move from summary view to source-derived detail.