Description Usage Arguments Details Value References Examples
simDNAseq
simulates a segregating sites matrix consisting of n
sequences based on how the population size develops.
1 2 3 4 5 6 7 8 9 10 11 12 13 | simDNAseq(n, seqLen, mutRate, popType, ...)
## S3 method for class 'fixedPop'
simDNAseq(n, seqLen, mutRate, popType="fixedPop", expRate=NULL,
expansionTime=NULL, proportion=NULL)
## S3 method for class 'varPop'
simDNAseq(n, seqLen, mutRate, popType="varPop", expRate, expansionTime=NULL,
proportion=NULL)
## S3 method for class 'sudExpPop'
simDNAseq(n, seqLen, mutRate, popType="sudExpPop", expRate=NULL,
expansionTime, proportion)
|
n |
the sample size. |
seqLen |
the length of the DNA sequences. |
mutRate |
the mutation rate. |
popType |
a string indicating which population type to simulate from.
Should be either ' |
expRate |
the rate of the exponentially growing population, only used
when |
expansionTime |
parameter |
proportion |
parameter 0< α ≤ 1 determining the fraction of the population size before the expansion. |
If popType
is 'fixedPop
' we simulate the branches of the ancestral
tree from a population of fixed size.
If popType
is 'varPop
' we simulate the branches of the ancestral tree
from an exponentially growing population (forwards in time). This means that the relative size function is
f(x)=exp(-λx),
where λ is the rate of the exponentially growing population.
If popType
is 'sudExpPop
' we simulate the brances of the
ancestral tree from a suddenly expanded population. This means that backwards in
time the population size is N before the expansion and αN after
the expansion. The decline in population size happened at time bN
(in generations) in the past.
The output is a segregating sites matrix; that is a matrix consisting of zeroes and ones. Here the number 1 indicates that a mutation occured at this specific site, and the number 0 indicates that no mutation occured.
simDNAseq
returns a simulated n
times seqLen
segregating
sites matrix. See details.
Tavaré, S. (2004) Ancestral Inference in Population Genetics. Berlin: Springer-Verlag.
Wakeley J. (2009) Coalescent Theory: An Introduction. Colorado: Roberts and Company Publishers.
1 2 3 4 5 6 7 8 9 10 | ## An example with fixed population size
simDNAseq(n = 10, seqLen = 15, mutRate = 2, popType = "fixedPop")
## An example with variable population size
simDNAseq(n = 8, seqLen = 20, mutRate = 5, popType = "varPop",
expRate = 1.5)
## An example with suddenly expanded population size
simDNAseq(n = 25, seqLen = 30, mutRate = 8, popType = "sudExpPop",
expansionTime = 2, proportion = 0.9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.