Per Trait Equations
convert_genotype_to_phenotype: gen # genotype stdev # standard deviation h2 # heritability inbc # inbreeding coefficient inbdp # inbreeding depression percentage
|
ph_v = (stdev**2) / h2 res_v = ph_v * (1 - h2) res_stdev = sqrt(res_v) ph = gen * 2 + nrandom(res_std) phenotype = ph + inbc * 100 * inbdp
|
convert_genotype_to_pta: gen # genotype nd # number of daughters ng # number of genomic tests stdev # standard deviation h2 # heritability
|
n = nd + ng * 2 * (1 / h2) k = (4 - h2) / h2 urel = h2 + (n / (n + k)) rel = limit(urel, 0.99) w1 = sqrt(rel) w2 = sqrt(1 - rel) noise = nrandom(stdev) PTA = ((w1 * gen + w2 * noise) * (rel^0.25)) / 2
|
get_genotype_from_breeding: s_gen # sire genotype d_gen # dam genotype mds # mendelian sample
|
sc = sqrt(2) / 2 pa = (s_gen + d_gen) / 2 scs = sc * mds genotype = pa + scs
|
get_net_merit_dollars_addend: gen # genotype nmd # net merit dollars
|
net_merit_dollars = gen * nmd
|
limit: x # any real number max # maximum
|
# Yields the bounded value of x less than or equal to max.
|
nrandom: stdev # standard deviation
|
# Yields a random value on a normal distribution.
|
sqrt: x # any real number
|
# Yields the square root of x.
|