Description Usage Arguments Value Author(s) See Also Examples
compareSH
tests the nullhypothesis that replicated allele frequency trajectories were generated with identical selection coefficients (s) and dominance (h).
1 2 3 4 |
x |
object of class "compsh" as returned by |
traj |
numeric matrix of allele frequency trajectories, where columns correspond to individual time points |
t |
numeric vector indicating the number of generations for each column in |
Ne |
numeric specifying the effective population size |
haploid |
logical indicating wether a population of haploid ( |
h |
numeric defining the dominance that should be assumed. If |
N.ctraj |
numeric determining the number of simulations that should be performed to correct for bias in the consensus trajectory (by default |
N.pval |
integer; the number of simulations performed to estimate the p-value (by default |
cov |
numeric matrix of sequence coverages, where columns and rows correspond to measurement time points and replicates, respectively |
method |
character string defining the method that should be used to estimate s (and p0 or h). |
... |
currently not used. |
A list with class "compsh" containing the following components:
traj |
matrix with observed allele frequency trajectories. |
t |
generations of each measurement time point. |
Ne |
effective population size. |
haploid |
logical for diploid or haploid individuals. |
ctraj |
consensus trajectory used to estimate s and h. |
N.ctraj |
number of simulations to correct 'ctraj' from bias. |
s |
estimated common s. |
s.sep |
individual estimates of s, one for each replicate. |
h |
if |
h.sep |
individual estimates of h, one for each replicate. |
h.given |
dominance defined in |
cov |
matrix with observed sequence coverages. |
s.p.value |
p-value for s. |
h.p.value |
p-value for h. |
N.pval |
number of simulations to estimate p-value(s). |
Thomas Taus
1 2 3 4 5 6 7 | # simulate allele frequency trajectories under constant selection coefficient (and dominance)
tp <- seq(0, 100, by=10)
Ne <- 1000
traj <- wf.traj(p0=rep(0.05, times=3), Ne=Ne, t=tp, s=0.1, h=0.5, haploid=FALSE)
# test the null hypothesis that selection coefficients are identical between replicates
compareSH(traj=traj, t=tp, Ne=Ne, haploid=FALSE, N.pval = 100, h=0.5) ##### takes about 15 sec #####
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.