sim_family | R Documentation |
Simulate a family from a pedigree
sim_family(
genome,
pedigree,
founder.pop,
map.function = c("haldane", "kosambi", "c-f", "morgan"),
ignore.gen.model = FALSE,
...
)
genome |
An object of class |
pedigree |
A |
founder.pop |
An object of class |
map.function |
The mapping function used to convert genetic distance to recombination fractions. Can be one of "haldane", "kosambi", "c-f", or "morgan". |
ignore.gen.model |
Logical - should the gene model be ignored? |
Other arguments can be passed to internal functions in sim_family
:
dh
A logical indicating if double-haploid lines should be created at the end of selfing. Doubled-haploids are generated at the last generation of selfing (e.g. if F_3 individuals are specified in the pedigree, DH lines are induced after the F_2). Currently ignored.
marker.gen
Numeric indicating the selfing generation at which to genotype
individuals in the family. For instance, if marker.gen = 2
, individuals
are genotyped at the F_3 stage. Currently ignored.
m
The crossover interference parameter. See
sim_from_pedigree
for more information.
p
The proportion of crosses from non-interference process.
See sim_from_pedigree
for more information.
family.num
A integer designator of the family.
cycle.num
A integer designator of the breeding cycle.
An object of class pop
.
# Simulate a genome
n.mar <- c(505, 505, 505)
len <- c(120, 130, 140)
genome <- sim_genome(len, n.mar)
# Simulate a quantitative trait influenced by 50 QTL
qtl.model <- matrix(NA, 50, 4)
genome <- sim_gen_model(genome = genome, qtl.model = qtl.model,
add.dist = "geometric", max.qtl = 50)
## 2-way population
# Simulate the founder genotypes
founder.pop <- sim_founders(genome, pat.freq = c(0, 1))
# Create a pedigree with 100 individuals selfed to the F_3 generation
ped <- sim_pedigree(n.par = 2, n.ind = 100, n.selfgen = 2)
fam <- sim_family(genome = genome, pedigree = ped, founder.pop = founder.pop)
# Create an F_6 family, genotyped at the F_3
ped <- sim_pedigree(n.par = 2, n.ind = 100, n.selfgen = 5)
fam <- sim_family(genome = genome, pedigree = ped, founder.pop = founder.pop,
marker.gen = 2)
# Create a pedigree with 100 RIL individuals
ped <- sim_pedigree(n.par = 2, n.ind = 100, n.selfgen = Inf)
fam <- sim_family(genome = genome, pedigree = ped, founder.pop = founder.pop)
# Create a pedigree with 100 doubled-haploid individuals induced after the F_2
# generation.
ped <- sim_pedigree(n.par = 2, n.ind = 100, n.selfgen = 2)
fam <- sim_family(genome = genome, pedigree = ped, founder.pop = founder.pop, dh = TRUE)
## 4-way population
# Simulate founders
founder.pop <- sim_founders(genome, n.str = 4, pat.freq = c(0, 0, 1))
#' # Create a pedigree with 100 individuals selfed to the F_3 generation
ped <- sim_pedigree(n.par = 4, n.ind = 100, n.selfgen = 2)
fam <- sim_family(genome = genome, pedigree = ped, founder.pop = founder.pop)
# Create a pedigree with 100 RIL individuals
ped <- sim_pedigree(n.par = 4, n.ind = 100, n.selfgen = Inf)
fam <- sim_family(genome = genome, pedigree = ped, founder.pop = founder.pop)
# Create a pedigree with 100 doubled-haploid individuals induced after the F_2
# generation.
ped <- sim_pedigree(n.par = 4, n.ind = 100, n.selfgen = 2)
fam <- sim_family(genome = genome, pedigree = ped, founder.pop = founder.pop, dh = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.