View source: R/makeHaplotypes.R
SampleHaplotypes | R Documentation |
Simulate a list of haplotypes, either sampling using population parameters or from a previous list of haplotypes through a series of meioses.
SampleHaplotypes(orig = NULL,nHaplotypes = 10,nMeioses = 2,gg = NULL,...)
orig |
If unspecified, the function samples base population
haplotypes. If specified, the function requests a list
containing objects of class |
nHaplotypes |
The requested number of haplotypes. |
nMeioses |
The number of offspring from each individual. For details see below. |
gg |
If specified, the combinations of haplotypes in individuals. Meiosis only occur within individuals. If not specified, individuals are sampled as random combinations of haplotypes. |
... |
Additional arguments to be passed to function
|
The function SampleHaplotypes
creates individuals by randomly
combining haplotypes from the list. Meiosis events in individuals
create new haplotypes. Argument nOff
sets the number of meiosis
events within each individual. Argument nHaplotypes
has only
effect when sampling a base population. See
SampleBaseHaplotype
for sampling base
haplotypes and for arguments of this function.
A list of length nHaplotpes
or nOff * length(orig)
of objects of class haplotype
.
SampleHaplotype
,
SampleBaseHaplotype
hList <- SampleHaplotypes(nHaplotypes = 20,nLoc = 100,genDist = 1,nDec = 3) ## create objects for(g in 1:10)hList <- SampleHaplotypes(orig = hList,genDist = 1,nDec = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.