just_dna_format.gwas¶
just_dna_format.gwas ¶
The source-independent GWAS-effect table (0.6, RM90).
gwas_effects.csv is the seventh derived-fact sidecar. It records, per published association, the
effect size a GWAS reported for an allele — the magnitude, the unit it is in, which allele it is
relative to, the p-value, and the study it came from. Filled by just-dna-enricher's GWAS Catalog
pass, consumed and hashed by the compiler, never fetched by it.
Why it exists. A consumer reported that authored weight values "construct nonsense" across a
corpus: the column has no unit, every module means something different by it, and published GWAS
effects are often better grounded than a hand-set curator score (S36). The obvious repair — have the
enricher fill weight where the authored cell is null — is barred, and not narrowly:
MODULE_LIFECYCLE § Stage 3 names weight/direction/effect_size in the cells no tool fills, and
every check in the tier reports rather than repairs. A null weight means the author has not
modelled this, which is the house algebra, not a hole to backfill.
So the effect goes in its own table, and weights.parquet.weight stays 100% authored. A module
carrying both holds an authored opinion and a machine-transcribed reference fact — exactly what it
already does with frequencies and gene_metrics, and nobody calls a module with a gnomAD frequency
table two modules.
effect_unit is the point of the table, not a detail. The GWAS Catalog's own payload, probed for
rs4149056 on 2026-08-17, returns betaUnit "umol/l" on one association and "unit" on two others
for the same variant. A beta of 0.05 umol/l and a beta of 0.30 "unit" are not on one scale, and any
table that stored the magnitude without the unit would reproduce, one layer down, the exact defect
S36 is about.
One row is one published association, keyed by the archive's own association_id. Not one row
per variant: rs4149056 alone carries dozens, across different traits, populations and papers, and
collapsing them would pick a trait on the author's behalf.
GwasEffectRow ¶
Bases: BaseModel
One published GWAS association: the magnitude, its unit, and the allele it is relative to.
Standalone (not an AuthoredModel) for the same reason every fact row is — machine-produced
reference fact, not an authored annotation — with extra="forbid" so a typo'd column is caught
rather than silently dropped.
This row carries no coordinates, and that is deliberate. The Catalog's association payload has
none: they live on the SNP object behind a link, and a coordinate copied from the module's own
resolution.csv would be the module's fact rather than the source's. variant_key joins it to the
weights rows; rsid is what the archive itself names.