designcode
The second required input for RABBIT is pedinfo
, providing the pedigree information of a mapping population in form of pedfile
or designcode
.
For a non-subdivided population, pedinfo
can often be provided by a string designcode
. There are three kinds of designcode
: commcross
, breedcross
, and juncdist
. If pedinfo
is provided by a designcode
in form of commoncross
or juncdist
, samples in the genofile
must be ordered such that founders always precede offspring. All samples in genofile
are offspring, except the founders that are implied by designcode
.
See MagicBase.parsedesign
for parsing designcode
into a struct. See MagicBase.vcf_extract_pedfile
for extracting pedfile from a vcf genofile and a given designcode
of the non-subdivided population.
commoncross
- "nril-selfm" where "nril" denotes n-way recombination inbred lines (RILs), and "selfm" denotes m generations of inbreeding by selfing, e.g. 8ril-self4. Founders are assumed to be exchangeable when parsing the designcode.
- "nril-sibm" where "nril" denotes n-way RIL, and "sibm" denotes m generations of inbreeding by sibling, e.g. 8ril-sib20. Founders are assumed to be exchangeable when parsing the designcode.
- "bcg-selfm" where "bcg" denotes g generations of back cross with the first parent, and "selfm" denotes m generations of inbreeding by selfing, e.g. bc2-self6. "bcg" is the same as "bcg-self0", e.g. "bc2".
- "nstar-selfm" where "nstar" denotes star-like crosses between the first parent and each of the other parents, and "selfm" denotes m generations of inbreeding by selfing, e.g. 11star-self6. Note that "nstar-selfm" can be used in data simulation
magicsimulate
, but not in data analysis such asmagicimpute
.
using MagicBase, Pedigrees
designinfo = parsedesign("4ril-self3";popid="4RIL")
plotped(designinfo.pedigree)
designinfo = parsedesign("bc2-self3"; popid="BC")
plotped(designinfo.pedigree)
designinfo = parsedesign("5star-self4"; popid="star")
plotped(designinfo.pedigree)
breedcross
designcode
forbreedcross
is specified in form ofpedcode=>nself
, wherepedcode
specifies the multi-way cross andnself
specifies the number of selfing generations following the multi-way cross.- Each cross is specified by "mother/g/father", where
g
is the generation of the offspring that is given by 1 + maximum of their parents' generations and the generation of a founder is set to 0.pedcode
can be obtained by recursively specifying thepedcode
of its parents. The notation "/g/" can be simplified to "/" forg
=1 and to "//" forg
=2. nself
must be a nonnegative integer,DH
denoting double haploid, orFIXED
denoting many generations of selfings. The DH is defined by internally setting nself=1 and ishomozygous = true for all offspring.
designinfo = parsedesign("P1/P2=>DH"; popid="DH")
plotped(designinfo.pedigree)
designinfo = parsedesign("P1/4/P1/P2//P3/P4/3/P1/P2//P3/P4=>2"; popid="breedcross")
plotped(designinfo.pedigree)
juncdist
juncdist
can be used to specify a mapping population without a known pedigree, for example, because of random mating in intermediate generations, if the average junction density such as map expansion can be estimated analytically or by simulation for given mate schemes.juncdist
assumes that the founders in each subpopulation are exchangeable. Internallyisfglexch=true
is set inoffspringinfo
for the offspring in the subpopulation.
The following shows an example designcode
in form of juncdist
.
designinfo = parsedesign("nfounder=3||ibd=1.0||mapexpansion=5.0")
designinfo.juncdist
JuncDist(3, 1.0, 5.0, nothing, nothing, nothing, nothing, nothing)
See MagicPrior.magicorigin
for calculating junction densities from a pedigree.