Genemap How it works Production systems Try Genemap For researchers Sign in
Engine architecture

The layered engine, from catalogue to rank.

Genemap is twelve discrete layers that compose into one rank page. Each layer ships in its own source file, has one job, and is independently inspectable. This page documents the architecture in the order data flows — from the moment a producer uploads a breed-society catalogue to the moment a per-trait dollar weight resolves on the live rank page.

Producer catalogue (CSV / Excel from breed society) Eval translator Canonical traits Country registry Bioeconomic engine Discounted gene flow Closed-loop calibration Production-system modifier Methane economics Vernacular resolver Rank page (per-trait dollar weight × producer's animals)

Ingest layers.

How the engine reads any breed-society's evaluation in any country and turns it into a canonical trait vocabulary the rest of the engine consumes.

i.

Eval translator · Tier 1 / Tier 2 dispatcher

Reads any breed-society evaluation

Decides between a hand-written native parser (Tier 1, fast, deterministic) and the AI-translator fallback (Tier 2, planned — Claude-backed via Edge Function). The registry holds 21 Tier 1 native ingestors across 11 countries; everything else is currently routed back to the producer with a "use the generic CSV mapper" message. The Tier 2 eval-translate Edge Function is on the API roadmap (see /api.html).

MGT_EVAL_AI.translate() · isNative() · tier() · listNativeSystems()
Source files core/js/eval-system-translator.js supabase/functions/eval-translate/index.ts (live)
ii.

Catalogue parsers · 21 native ingestors

Format detection + trait alias mapping

Per-system parser functions that handle the specific CSV/Excel export format each breed society publishes. Each has a detect() function that recognises distinctive header signatures, plus trait_aliases and meta_aliases maps that normalise per-system column names into Genemap canonical trait codes. 14 cattle parsers (TACE, Hereford BREEDPLAN, IGS Red Angus, Zoetis Inherit, ANCP Nelore, KAPE Hanwoo, AAA Angus, AHA Hereford, ICBF, NAV Nordic, Logix Beef, Wagyu AGE, Signet BeefBreeder, World Angus). 7 sheep parsers (LAMBPLAN, MERINOSELECT, SIL, Signet Sheepbreeder, Sheep Ireland, NSIP, Fjárvís).

Detection supports multilingual signatures: Hangul (KAPE 근내지방도/도체중), Portuguese (ANCP Nome/Sexo/Pai/Mãe/DEP_), Swedish (NAV Far/Mor/Klass+Vikt), Icelandic (Fjárvís nafn/kyn/faðir), Spanish (Argentine cabaña terms — planned).

parseTACE() · parseAncpNelore() · parseKapeHanwoo() · parseAAAAngus() · parseAHAHereford() · parseICBF() · parseNAV() · parseLogixBeef() · parseWagyuAGE() · parseSignetBeef() · parseWorldAngus() · parseSIL() · parseLambplan() · parseMerinoselect() · parseSignetSheep() · parseSheepIreland() · parseNSIP() · parseFjarvis()
Source files core/js/catalogue-parsers.js core/js/catalogue-parsers-sheep.js
iii.

Country registry · 18 countries with full metadata

Currency · units · grading · climate · market source · vernacular

One central registry of every country the platform covers, with each country's currency code, units system (metric vs imperial), preferred grading scheme, native breed-evaluation system, default production system, and a country-specific vernacular profile. Used by every downstream layer to resolve "what currency does this producer trade in", "what's the canonical grading axis on their kill grid", and "what vocabulary should the UI use".

MGT_COUNTRY_REGISTRY.getCountry() · getCurrency() · getGrading() · getProductionSystemsForCountry()
Source file core/js/country-registry.js

Economic derivation.

The closed-form bioeconomic engine that turns canonical EBVs/EPDs/DEPs into per-trait dollar weights for the producer's specific operation.

iv.

Bioeconomic engine · marginal $/EBV derivation

Closed-form weight calculation per trait

The load-bearing layer. For each trait i, computes the marginal effect of one EBV unit on the producer's gross margin per head — the Hazel (1943) selection-index formulation, derived from the producer's farm profile (breeding system, calving time, joining length, retention, target grid, gross margin). The output is a per-trait dollar weight that the rank page consumes.

MGT_CATTLE.computeWeights() · MGT_SHEEP.computeWeights() · deriveWeight(trait, profile, country, system)
Source files core/js/engine.js (cattle) core/js/engine-sheep.js (sheep)
v.

Discounted gene flow · lifetime trait expression

NPV-discounted daughter and granddaughter pathways

Each breeding value expresses across a lifetime — directly in the animal, in its progeny, in subsequent generations. The platform values the full pathway with NPV discounting (default 5% p.a. over 10 years). Maternal traits get the weight they actually deserve in self-replacing systems; terminal-only traits get nothing of the daughter-pathway return.

discountedGeneFlow(trait, system, { horizon: 10, rate: 0.05 })
Anchored on Brascamp 1978 · McClintock & Cunningham 1974 · Hill 1974
vi.

Closed-loop calibration · ridge-regression / Bayesian update

Learns from the producer's own kill data

Two implementations: an offline Gibbs sampler with reaction-norm γ (for full re-fits across seasons) and an online recursive Normal-Inverse-Gamma conjugate-prior update (for daily nudges as new cohorts close out). Both regress the producer's realised slaughter $/head against the animal's EBV vector to produce a producer-specific multiplier β̂ that adjusts each industry-default weight. λ chosen by leave-one-out CV; bootstrap CI on each multiplier surfaces on the rank-page tooltip.

fitProducerCalibration(producerId, traits) · updatePosterior(state, newCohorts) · summarise(state)
Source files core/js/calibration-online.js (CB.2 — daily online update) core/js/calibration-bayesian.js (offline Gibbs)

Production-system overlays.

22 system-specific multiplier tables that re-weight the bioeconomic objective for the producer's actual operation — and the frontier signals that extend the system.

vii.

Production-system modifier · 22 archetypes

System-specific re-weighting over the closed-form engine output

12 beef + 10 sheep production-system codes, each with a multiplier table that amplifies, dampens or zeroes individual trait weights for the producer's specific operation. Hanwoo intensive multiplies MARB ×3.5; AU Merino multiplies CFW ×2.7 and FD ×−2.2; pelt-primary Gotland multiplies Pälskvalitet ×4.0 and dampens carcass; US feedyard multiplies MARB ×3.4 and RFI ×1.8; Argentine pampas multiplies YW ×1.4 and dampens MW ×0.55. The full catalogue with multiplier tables is at /systems.html.

MGT_PRODUCTION_SYSTEM.apply(baseResult, species, { productionSystem: code }) · getLabel() · listForSpecies()
Source file core/js/production-system-modifier.js
viii.

Methane economics · CH4 as a first-class axis

Per-animal CH4 cost + methane EBV ingestion

Computes per-animal residual methane intensity from GreenFeed / SF6 / respiration-chamber / microbiome-proxy measurements, converts to CO2-equivalent via IPCC AR6 GWP=27, multiplies by the country's current carbon-market spot (ETS / ACCU / J-Credit / K-ETS), and discounts the gross-margin anchor by the resulting per-head cost. The full extension is in active Q3 2026 build per the roadmap.

applyMethaneEconomics(grossMargin, animal, country) · inventoryCH4(animal, system)
Source file core/js/methane-sustainability.js (CH4.1)
ix.

Frontier-signal extensions

Epigenetics · microbiome · drought · nutrition · live weights

Optional evaluation axes the engine consumes where data is available: DNA methylation at stress-response loci (HSP70, NR3C1, IGF2), rumen 16S microbiome composition (heritable component as a feed-conversion + methane proxy), drought severity from BoM SILO / NOAA / SMHI / NIWA, nutrition supplementation tracking, and live weights for growth-curve fitting. Each is a sibling module that hooks into the bioeconomic engine when its source data is present.

Source files core/js/epigenetics-calibration.js core/js/drought-cattle-bridge.js core/js/nutrition-bridge.js core/js/live-weights-bridge.js

Presentation layer.

Once the per-trait dollar weights are derived, calibrated, system-modified and methane-adjusted, the rank page renders them in the producer's currency, units, and vernacular.

x.

Currency / FX engine

16-currency multi-currency support · daily ECB FX refresh (planned)

Every dollar weight resolves to the producer's local currency (AUD, USD, GBP, EUR, BRL, ARS, NZD, KRW, JPY, SEK, DKK, NOK, ZAR, CHF, ISK, INR). The currency-engine module is shipped; the daily ECB FX-rates refresh Edge Function is on the API roadmap. Today FX is loaded from a static fallback table; the daily nightly refresh ships when the fx-rates-refresh function is deployed (tracked on /api.html).

MGT_CURRENCY.toUSD() · fromUSD() · format()
Source files core/js/currency-engine.js supabase/functions/fx-rates-refresh/index.ts (planned)
xi.

Vernacular resolver · country-aware terminology

15 canonical terms × per-country overrides

The UI vocabulary tracks the producer's country. "Stud" in AU/NZ becomes "seedstock operation" in US/CA, "pedigree breeder" in GB/IE, "cabaña" in AR/UY. "Paddock" in AU/NZ becomes "pasture" in US, "field" in GB. "EBV" in AU becomes "EPD" in US, "DEP" in BR/AR. The resolver scans the DOM for data-vt spans and rewrites them on page load based on the user's resolved country.

MGT_VERNACULAR.term('stud', 'US') · localise() · listKeys()
Source file core/js/vernacular-resolver.js (VR.1)
xii.

Daily global learning loop

Anonymised regional anchors recomputed nightly Roadmap

The platform's intended nervous system. The plan: every 24 hours, every country's climate source pulls overnight, every market feed refreshes (USDA-AMS, MLA NLRS, AHDB, Bord Bia, EU MMO, Jordbruksverket, CEPEA, AgriHQ, CanFax, KAPE), FX rates refresh from the ECB, anonymised regional anchors recompute across the producer network (minimum 5-producer bucket), and the global recalibration cron pushes the new model state to every account before sunrise.

Today the deployed Edge Functions include sheep-ai-ask, cattle-ai-ask, create-checkout-session, error-ingest, stripe-webhook, the derive-* pipeline (animal insights, breed system, bull purchase, heifer selection, mating plan, nutrition plan, sire performance, lifetime profitability), ssgblup-solve, data-export, eval-translate and invite-member. buyer-notification-email is built and awaiting Gmail SMTP secrets before deploy. The climate-pull, market-pull and global-recalibrate functions are designed but not deployed — tracked on /api.html.

daily-global-recalibrate Edge Function · pg_cron schedule (planned)
Source files core/js/forage-climate.js (priority-chain client; falls back to NASA POWER browser fetch) core/js/market-pricing*.js (hardcoded reference values today)

The whole stack is open by design.

Every layer ships in source. Every coefficient is overridable on the rank page. Every dollar value can be traced back through the layered stack — from the kill grid that drove the producer-fit β̂ multiplier, through the system overlay, through the closed-form bioeconomic derivation, back to the EBV/EPD/DEP the breed society published.

For deeper documentation: methodology (closed-form maths + 8 equations), systems catalogue (22 production-system multiplier tables), for-researchers (academic-collaboration inbound), research bibliography (34 citations).

Loading live engine status…