View source: R/sim_from_pedigree.R
sim_from_pedigree | R Documentation |
Simulate genotypes along one chromosome for a pedigree
sim_from_pedigree(
pedigree,
L = 100,
xchr = FALSE,
m = 10,
p = 0,
obligate_chiasma = FALSE
)
pedigree |
Matrix or data frame describing a pedigree, with first four
columns being individual ID, mom ID, dad ID, and sex (female as
|
L |
Length of chromosome in cM (or a vector of chromosome lengths) |
xchr |
If TRUE, simulate X chromosome. (If |
m |
Crossover interference parameter, for chi-square model (m=0 corresponds to no interference). |
p |
proportion of crossovers coming from no-interference process |
obligate_chiasma |
If TRUE, require an obligate chiasma on the 4-strand bundle at meiosis. |
A list with each component being the data for one
individual, as produced by the cross()
function. Those
results are a list with two components, corresponding to the
maternal and paternal chromosomes. The chromosomes are represented
as lists with two components: an integer vector of alleles in
chromosome intervals, and a numeric vector of locations of the
right-endpoints of those intervals; these two vectors should have
the same length.
If the input L
is a vector, in order to simulate multiple
chromosomes at once, then the output will be a list with length
length(L)
, each component being a chromosome and having the
form described above.
check_pedigree()
,
sim_ril_pedigree()
, sim_ail_pedigree()
,
sim_from_pedigree_allchr()
# simulate AIL pedigree
tab <- sim_ail_pedigree(12, 30)
# simulate data from that pedigree
dat <- sim_from_pedigree(tab)
# simulate multiple chromosomes
dat <- sim_from_pedigree(tab, c("1"=100, "2"=75, "X"=100), xchr="X")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.