3.8 Simulating Pedigrees

PyPedal is capable of simulating pedigrees using am algorithm based on the Pedigree::sample method in Matvec 1.1a (http://statistics.unl.edu/faculty/steve/software/matvec/), although the implementation in NewPedigree is all original code. A pedigree is simulated when the simulate_pedigree flag is set, and is the only case in which a pedfile does not need to be provided to PyPedal. All simulated pedigrees have the code `asdxg' and are not renumbered. The options used to control pedigree simulation are presented in Table 3.1.

The basic structure of a simulated pedigree is determined by the total number of simulated animals (simulate_n), founder sires (simulate_ns) and dams (simulate_nd), and the number of distinct generations in the pedigree (simulate_g). Populations can be closed or open based on the value of simulate_ir; when the immigration rate is $ >$ 0 that proportion of new animals will be immigrants with unknown parents. The sex ratio can be altered by changing simulate_sr; values $ <$ 0.5 will result in more females than males, and values $ >$ 0.5 will result in more males than females. By default, NewPedigree.simulate produces a three-generation pedigree with 15 animals descended from 4 founder sires and 4 founder dams (Figure 3.1).

Figure 3.1: Simulated pedigree using default options
simulate_mp is a flag indicating whether or not simulated animals may have missing parents. When missing parents are allowed, animals may have no, one, or both parents unknown. The related parameter, simulate_pmd, specifies the number of times parents should be sampled at random when trying to satisfy all of the simulation constraints. If parents are sampled simulate_pmd times without satisfying the rules in place, both parents are set to missing, even if missing parents are not permitted. Other constraints include allowing/forbidding parent-offspring (simulate_po) and/or full sib (simulate_fs) matings.
See About this document... for information on suggesting changes.