Learn R Programming

PopGenome (version 2.7.2)

weighted.jackknife-methods: Weighted Jackknife

Description

Weighted Jackknife calculations.

Usage

# S4 method for GENOME
weighted.jackknife(object,
do.D=TRUE,
do.df=TRUE,
per.region=FALSE,
block.size=1)

Arguments

object

An object of class "GENOME"

do.D

Pattersons D and Martin's f statistic

do.df

d-fraction (distance fraction)

per.region

jacknife within regions

block.size

the block size for jackknife (SNPs)

Value

Returned value is a modified object of class "GENOME" --------------------------------------------------------- The following slots will be modified in the "GENOME" object ---------------------------------------------------------

Slot Reference Description
1. df.z [3] z values (jackknife)
2. df.SE [3] standard error (jackknife)
3. df.pval [3] P values (jackknife)
4. D.z [x] z values (jackknife)
5. D.SE [x] standard error (jackknife)
6. D.pval [x] P values (jackknife)

Details

To perform the D and f statistic one needs to define 3 populations via the function set.populations, where the third population represent the archaic population. In addition, an outgroup is required and have to be set via the function set.outgroup. Here, only SNPs where the outgroup is monomorphic are considered. f is the fraction of the genome that is admixed [2].

References

[1] Durand, E. Y., Patterson, N. J., Reich, D., & Slatkin, M. (2011). Testing for ancient admixture between closely related populations. Molecular Biology and Evolution, 28(8), 2239--2252. doi:10.1093/molbev/msr048 [2] Simon H Martin, Kanchon K Dasmahapatra, Nicola J Nadeau, et al. (2013). Genome-wide evidence for speciation with gene flow in Heliconius butterflies. Genome Res. doi:10.1101/gr.159426.113 [3] Bastian Pfeifer and Durrell D. Kapan (2019). Estimates of introgression as a function of pairwise distances. BMC Bioinformatics. https://doi.org/10.1186/s12859-019-2747-z

Examples

Run this code
# NOT RUN {
# GENOME.class <- readData("\home\Alignments")
# GENOME.class <- set.populations(GENOME.class,list(1:3,4:8,9:12))
# GENOME.class <- set.outgroup(GENOME.class,13)
# GENOME.class <- introgression.stats(GENOME.class, do.D=TRUE)
# show the result:
# GENOME.class@D
# GENOME.class@f
# GENOME.class <- introgression.stats(GENOME.class, do.df=TRUE)
# show the result:
# GENOME.class@df
# }

Run the code above in your browser using DataLab