Calculation Methods & Algorithms
WeBreeders implements pure, deterministic Mendelian calculation algorithms designed for complete transparency, exact mathematical rigor, and client-side execution.
Diploid Autosomal Mendelian Model
The pilot release implements the autosomal-diploid-v1 model. For any diploid
autosomal locus, both the sire and the dam contribute exactly one allele to each offspring
through independent segregation during meiosis.
Four-Cell Enumeration Matrix
Given sire genotype $(s_1, s_2)$ and dam genotype $(d_1, d_2)$, four equally probable gametic fusions are evaluated:
- Draw 1: (sire allele 1, dam allele 1) with probability mass 0.25 (1/4)
- Draw 2: (sire allele 1, dam allele 2) with probability mass 0.25 (1/4)
- Draw 3: (sire allele 2, dam allele 1) with probability mass 0.25 (1/4)
- Draw 4: (sire allele 2, dam allele 2) with probability mass 0.25 (1/4)
Canonical Normalization & Probability Conservation
Because parental origin does not alter autosomal expression, heterozygous combinations $(a, b)$ and $(b, a)$ are canonicalized according to the published catalogue allele order. Counts are aggregated into exact integer numerators out of a fixed denominator of 4 ($1/4 = 25\%$, $2/4 = 50\%$, $4/4 = 100\%$).
The calculation engine guarantees exact probability mass conservation: the sum of outcome probabilities is always exactly 100%. Zero-probability outcomes are strictly suppressed.
Privacy & Execution Boundary
Unlike traditional calculators that process input files through server-side POST requests,
WeBreeders executes the parser and inheritance engine entirely in client-side TypeScript via
standard web APIs (FileReader / ArrayBuffer). No breeding
combinations, parent records, or outcome tables are transmitted across the network, stored
in cookies, or written to server databases.