A toolkit for progeny testing simulation
Author masuday
0 Stars
Updated Last
2 Years Ago
Started In
January 2021


Build Status

Quick start

This package helps to perform a simulation for progeny testing, which is (used to be) the standard in livestock breeding. It simulates pedigree-based breeding plans, i.e., BLUP selection. This package can also handle genomic markers if you supply the genotypes (generated by QMSim) in the base population.


using ProgenyTestingTools

# genetic parameters
par = PTParameters(50, 100, 0.36, 0, 0, 1.0)

# historical population
hp = generate_population(par,nm=20,nf=20)

# current population
pop = generate_population(par)

# initial bulls and cows
bulls = migrate_from_hp!(hp,pop,random_sampling(hp,2,male=true))
cows = migrate_from_hp!(hp,pop,random_sampling(hp,3,female=true))

# define groups for bulls and cows
mgroup = generate_group(pop, sires=bulls)
fgroup = generate_group(pop, dams=cows)

# mating between groups
mating!(mgroup, fgroup, "fgroup", method="dairy_standard_ai")

# generate phenotypes; only females, no repeated records
assign_phenotype!(fgroup, female=true, repeated=false)

# calving

# BLUP evaluation
genetic_evaluation!(pop, method="blup", repeated=false)

# cull 1 male with the lowest EBV
cull!(pop, selectid([:male]=>x->x==true, pop, sortby=:ebv, rev=false, limit=1))

Used By Packages

No packages found.