diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-11 21:26:07 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-11 21:26:07 +0000 |
| commit | 60420b6e076ea16109d54789cfcd89262a01ae57 (patch) | |
| tree | 54dda18b40f6307ccbf5bc43f80a808791c202eb /docs | |
| parent | 8033b9fb0f4f26252ba20e0b864a6399c31db281 (diff) | |
| download | genenetwork4-60420b6e076ea16109d54789cfcd89262a01ae57.tar.gz | |
docs: which reference genome the coordinates are on, and what the index covers
Two things a reader needs before quoting a position from this API, both measured against db_webqtl rather than inferred from the schema: - No table stores an assembly id. The only labels are prose in Species.MenuName: human hg19, mouse mm10, rat "mRatBN7.2/rn7", fly dm6, nematode ce10, arabidopsis araTha1, medaka Oryl23, bat gsor23, killifish MPIA_NFZ_2, tomato GCF_001406875.1, soybean JGI-PGF v2 2021, barley and poplar unlabelled. - Every position column exists in three generations (Mb, Mb_2016, legacy mouse Mb_mm8; likewise Length/Length_2016/Length_mm8 on Chr_Length) and the labels do not all match the numbers. Human is hg19 in both generations (chr1 249,250,621; SOX2 chr3 181.43, not hg38's 181.71). Mouse Length_2016 chr1 = 197,195,432 is mm9 exactly, while current Length = 197,426,691 matches no standard build -- but mouse probes are mm10-era (Sox2 chr3 34.5). Rat current Length chr1 = 282,763,074 is rn6 exactly, though MenuName advertises rn7. Geno.Mb_2016 exists only for human, mouse, soybean, barley; the mouse-named Mb_mm8 is populated for barley too. docs/search-engines.md gains the coverage side: the index is a projection of MariaDB with no species filter (only confidentiality < 1 AND public > 0), so 14 species -- every Species row with public data -- with 44,842,506 gene and 22,601 phenotype documents, dominated by mouse (27.7M), human (15.2M) and rat (1.4M). The crawl reads the *current* columns, so the index inherits hg19 / mm10-era / rn6-era coordinates, never a modern assembly; and rat positions deserve suspicion (Sox2's 44 probes span chr2 1.2-117.6 Mb).
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/genenetwork_datatypes.md | 52 | ||||
| -rw-r--r-- | docs/search-engines.md | 34 |
2 files changed, 86 insertions, 0 deletions
diff --git a/docs/genenetwork_datatypes.md b/docs/genenetwork_datatypes.md index fbf8882..edf21a9 100644 --- a/docs/genenetwork_datatypes.md +++ b/docs/genenetwork_datatypes.md @@ -62,6 +62,58 @@ against the live schema: `gn-guile`'s `gn/data/species.scm` builds this metadata from SPARQL, separately from the MariaDB `Species` table. +### Reference genomes and coordinate generations + +Nothing in the schema stores an assembly *identifier*; the only explicit +labels are prose in `Species.MenuName` (verified against `db_webqtl` on +2026-11-11): + +| species | labelled assembly | +|---|---| +| human | hg19 | +| mouse | mm10 | +| rat | mRatBN7.2/rn7 | +| fly | dm6 | +| nematode | ce10 | +| arabidopsis | araTha1 | +| medaka | Oryl23 | +| bat | gsor23 | +| turquoise killifish | MPIA_NFZ_2 | +| tomato | GCF_001406875.1 | +| soybean | US DOE JGI-PGF v2 2021 | +| barley, poplar | unlabelled | + +Every position column exists in **three generations**: `Mb` (current), +`Mb_2016`, and a legacy mouse `Mb_mm8` -- the same triplication on +`Chr_Length` (`Length`, `Length_2016`, `Length_mm8`), `ProbeSet` +(`Chr`/`Mb`, `Chr_2016`/`Mb_2016`) and `BXDSnpPosition`. The labels above do +not all agree with the numbers: + +- **human** is hg19 throughout, in both generations: `Chr_Length` chr1 is + 249 250 621 in `Length` and `Length_2016`, and SOX2 sits at chr3 + 181.429-181.431 Mb (hg19 181 429 788; hg38 would be ~181.71). +- **mouse** `Length_2016` chr1 = 197 195 432 (**mm9** exactly), while the + current `Length` is 197 426 691, which matches no standard build (mm9 + 197 195 432, mm10 195 471 971, mm39 195 154 058). The *probes* are + mm10-era -- Sox2 at chr3 34.47-35.09 Mb (mm10 ~34.65) -- so the label + mm10 is right for `ProbeSet` while `Chr_Length` is not. +- **rat** current `Length` chr1 = 282 763 074 (**rn6** exactly), i.e. the + column is the older build although `MenuName` claims rn7 + (mRatBN7.2, chr1 ~260.5 Mb). Rat probe positions are also internally + inconsistent: Sox2's 44 probes span chr2 1.203-117.592 Mb where rn6 Sox2 is + ~119 Mb, which reads as unmapped or badly mapped probes rather than one + build. +- **`Geno`** has a non-null `Mb` for every locus, but `Mb_2016` only for + human (all 367 403 rows), mouse (23 609), soybean (4 938) and barley (791); + `Mb_mm8`, a mouse-named column, is also populated for barley (791) -- legacy + columns reused across species. + +Practical consequence: a position taken from this database is "GN's current +coordinate for that species" and should be quoted with that build, not with a +modern assembly. The search index uses the *current* columns +(`ProbeSet.Mb`, `Geno.Mb`), so it inherits exactly these builds -- see +[search-engines.md](search-engines.md#what-the-index-covers-and-whose-coordinates-it-carries). + ### Known quirks - GeneNetwork's genotype tables were originally built mouse-only and diff --git a/docs/search-engines.md b/docs/search-engines.md index 0a43cf2..69c784f 100644 --- a/docs/search-engines.md +++ b/docs/search-engines.md @@ -47,6 +47,40 @@ a database failure leaves `locus` null rather than failing the search. An instance with no usable `SQL_URI` serves complete search results with null loci. +## What the index covers, and whose coordinates it carries + +The index is a **projection of MariaDB**, rebuilt by `src/indexer/`'s two +crawls (`rows.rs`): genes (ProbeSet expression rows) and phenotypes +(published traits). The only filter is `confidentiality < 1 AND public > 0` +-- there is no species filter, no dataset whitelist and no marker cutoff -- +so coverage is "every public dataset in the database" and changes only when +the database does. + +Measured on the deployed index (`gn4-index`, 97 GB): + +| | documents | +|---|---| +| gene (`XTgene`) | 44 842 506 | +| phenotype (`XTphenotype`) | 22 601 | + +Fourteen species carry data, i.e. exactly the `Species` rows that have public +datasets: arabidopsis, barley, bat, drosophila, human, killifish, medaka, +monkey, mouse, nematode, rat, soybean, tomato, turquoise killifish. (The +`Species` table has a `poplar` row with no public data, which is why it has no +`XS` term.) Mouse, human and rat account for almost all of it -- 27.7 M, +15.2 M and 1.4 M gene documents. + +**Positions are GN's current build per species, not a modern assembly.** The +gene crawl takes `ProbeSet.Chr`/`Mb` (probe position) and `Geno.Chr`/`Mb` +(mapped locus), which are the *current* columns -- not the `_2016` and +`_mm8` ones the schema also carries. What that amounts to per species is in +[genenetwork_datatypes.md](genenetwork_datatypes.md#reference-genomes-and-coordinate-generations): +hg19 for human, mm10-era for mouse, rn6-era for rat. A position from a search +hit is therefore "GN's current coordinates for that species" and should be +quoted as such; a locus whose `Locus` has no `Geno` row for its species has no +locus position at all (the join is a `LEFT JOIN` keyed on the species), and +gene documents carry the probe's position separately from the locus's. + ## What the Xapian query language actually does here The native engine is Xapian, and `q` is parsed by Xapian's own |
