hapnumtest | R Documentation |
This is the post-hoc test for testing for the number of selected haplotypes. The test should only be performed if haplotype based test have shown evidence of selection.
hapnumtest( frequency_matrix, p_combine_method = "omnibus", deltat = 10, Ne = 1000, repli = 1, seed = 2022 )
frequency_matrix |
Numeric matrix, with each i,j element being the frequency of haplotype i at sequenced time point j. |
p_combine_method |
Factor, method of pvalue combination, can be "omnibus" (Futschik, A. et al. 2019), "harmonic" (Wilson, D.J. (2019)), "vovk" (Vovk, V. et al. 2018), "bonferroni", "BH" (Benjamini & Hochberg 1995). |
deltat |
Numeric, number of generations between each pair of time points of interests |
Ne |
Numeric vector with length as number of replicates, containing information of Ne (effective population size) at each replicated population. If Ne changes over time, take as input a numeric matrix, with the column being the replicate position, row being the Ne at each sequenced time points. |
repli |
Numeric, specifying the number of replicated populations. |
seed |
setting seed of the run |
A number specifying the number of selected haplotypes.
haplotest()
#We show here an example for the test for the number of selected haplotypes #Suppose we have the haplotype frequency matrix hap_freq, sequenced at every 10 generations, with effective population size 1000 and 3 replicate populations, using omnibus test as multiple testing correction, the number of selected haplotypes is computed by: hap_num = hapnumtest(hap_freq, p_combine_method = "omnibus", deltat = 10, Ne = rep(1000,3), repli = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.