pedfile
The second required input for RABBIT is pedinfo, providing the pedigree information of a mapping population in the form of pedfile or designcode. The pedfile is more general than designcode, since the latter can only be used for a non-divided population. The pedfile must be a CSV file with extension ".csv" and with commas as delimiter.
The founders and offspring in pedfile must be genotyped in genofile. The samples in genofile but not among founders and offspring in pedfile are ignored. See MagicBase.vcf_pad_samples for padding samples in genofile with all missing genotypes.
The pedfile consists of two tables: designinfo and offspringinfo. They are separated by the key "RABBIT" and linked via the member column that denotes subpopulation id.
designinfo
The designinfo can be in form of either pedigree or designcode.
designinfo in designcode
For example, consider a connected multiparental population consisting of four subpopulations: (1) double haploids (DHs), (2) two-way recombination inbred lines (RILs), (3) a three-parent population with unknown pedigree, and (4) multi-way RILs.
using MagicBase
cd(@__DIR__)
magicped = generate_magicped(;
designcodes=["P1/P2=>DH", "2ril-self3", "ibd=1.0||mapexpansion=5.0","P4/3/P4//P2/P3=>3"],
founders = ["NA","P1||P3","P3||P4||P5","NA"],
subpopsizes=20*ones(4)
)
savemagicped("example_ped_junc.csv", magicped)"example_ped_junc.csv"The following shows the designinfo in example_ped_junc.csv.
member,designcode,founders
pop1,P1/P2=>DH,NA
pop2,2ril-self3,P1||P3
pop3,ibd=1.0||mapexpansion=5.0,P3||P4||P5
pop4,P4/3/P4//P2/P3=>3,NAdesigncodecan becommoncross,breedcross, orjuncdist. However, forcommoncross, star-like crosses "nstar-selfm" are not allowed.- The founders of each subpopulation are joined by
||and it is not necessary to specify them if the designcode is in the form ofbreedcross. - If all designcodes are in the form of
breedcross, the columnfounderscan be dropped. - A DH population is represented internally by nself=1 in the
designcodeinbreedcross, together withishomozygous=trueinoffspringinfo.
designinfo in pedigree
See pedfile_designcode2ped for converting pedfile with designinfo from designcode into pedigree.
pedfile_designcode2ped("example_ped_junc.csv"; outfile = "example_ped.csv")"example_ped.csv"The following shows the designinfo in the converted pedfile example_ped.csv, where the 3rd subpopulation with unknown pedigrees is dropped.
member,mother,father
P1,0,0
P2,0,0
P3,0,0
P4,0,0
P1/P2,P1,P2
P1/P3,P1,P3
P2/P3,P2,P3
pop1,P1/P2,P1/P2
4_2,P1/P3,P1/P3
P4//P2/P3_3,P4,P2/P3
5_2,4_2,4_2
P4/3/P4//P2/P3_self0_3,P4,P4//P2/P3_3
pop2,5_2,5_2
P4/3/P4//P2/P3_self1_3,P4/3/P4//P2/P3_self0_3,P4/3/P4//P2/P3_self0_3
P4/3/P4//P2/P3_self2_3,P4/3/P4//P2/P3_self1_3,P4/3/P4//P2/P3_self1_3
pop4,P4/3/P4//P2/P3_self2_3,P4/3/P4//P2/P3_self2_3- The mother and father of founders must be 0
- Pedigree member ids must be unique. Member ids at intermediate generations do not matter.
- If the pedigree of each subpopulation is known,
designinfoin pedigree is more general thandesigninfoin designcode, since not every subpopulation can be represented by adesigncode
See MagicBase.readmagicped for reading magicped. See MagicBase.plotmagicped for plotting magicped.
magicped = readmagicped("example_ped.csv")
plotmagicped(magicped)offspringinfo
The following shows the pedfile example_ped_junc.csv including both designinfo and offspringinfo.
RABBIT,designinfo
member,designcode,founders
pop1,P1/P2=>DH,NA
pop2,2ril-self3,P1||P3
pop3,ibd=1.0||mapexpansion=5.0,P3||P4||P5
pop4,P4/3/P4//P2/P3=>3,NA
RABBIT,offspringinfo
individual,member,ishomozygous,isfglexch
pop1_1,pop1,true,false
...
pop1_20,pop1,true,false
pop2_1,pop2,false,false
...
pop2_20,pop2,false,false
pop3_1,pop3,true,true
...
pop3_20,pop3,true,true
pop4_1,pop4,false,false
...
pop4_20,pop4,false,false- Columns
ishomozygousandisfglexchare optional with defaultfalseand the following rules:- Internally set
ishomozygous=trueif nself = "DH" or "FIXED" in thedesigncodein form ofbreedcross, or ibd=1.0 in thedesigncodein form ofjuncdist. - Internally set
isfglexch=trueifdesigncodeis in form ofjuncdist.
- Internally set
- Manually set
isfglexch=trueto account for the unknown funnel code of a subpopulation.
breedcross pedfile
A breedcross pedfile needs to be first converted into the RABBIT pedfile by using MagicBase.parsebreedped.
For a breedcross pedfile, the first three columns must be sample, pedcode, and nself, and the rest columns if exist will be ignored. Each row denotes the pedigree of an offspring in the format of breedcross. See section on prepare_pedinfo_designcode.
- col1: sampled offspring IDs
- col2: pedcode denotes the breeder-format pedigree of an individual before selfing.
- col3: number of selfing generations starting from the last indvidual given by the pedcode. It must be non-negative integers or one of the two special codes "DH" and "FIXED"
Although the pedinfo in format of breedcross can only represent a non-divided population, the breecross pedfile can be used to a divided pouplation with different breedcross.