introgression.stats: Introgression statistics

Description Usage Arguments Details Value References Examples

Description

A generic function to estimate archaic admixture.

Usage

1
2
3
4
5
6
7
8
9
## S4 method for signature 'GENOME'
introgression.stats(object,
subsites=FALSE,
do.D=TRUE,
do.df=TRUE,
keep.site.info=TRUE,
block.size=FALSE,
do.RNDmin=FALSE,
l.smooth=FALSE)

Arguments

object

An object of class "GENOME"

subsites

"transitions": SNPs that are transitions.
"transversions": SNPs that are transversions.
"syn": synonymous sites.
"nonsyn": nonsynonymous sites.
"exon": SNPs in exon regions.
"intron": SNPs in intron regions.
"coding": SNPs in coding regions (CDS).
"utr": SNPs in UTR regions.
"gene": SNPs in genes.
"intergenic" : SNPs in intergenic regions.

do.D

Pattersons D and Martin's f statistic

do.df

d-fraction

keep.site.info

keep site specific values (GENOME.class@region.stats)

block.size

the block size for jackknife

do.RNDmin

RNDmin (Rosenzweig, 2016)

l.smooth

laplace smoothing for Bd-fraction

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].

Value

Returned value is a modified object of class "GENOME"

———————————————————
The following slots will be modified in the "GENOME" object
———————————————————

Slot Reference Description
1. D [1;eq. 2] Pattersons D statistic
2. f [2] f statistic
3. df [3] Bd-fraction
4. RNDmin [x] RNDmin
5. D.z [x] z values (jackknife)
6. D.pval [x] P values (jackknife)
7. df.z [3] z values (jackknife)
8. df.pval [3] P values (jackknife)

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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

Example output

Loading required package: ff
Loading required package: bit
Attaching package bit
package:bit (c) 2008-2012 Jens Oehlschlaegel (GPL-2)
creators: bit bitwhich
coercion: as.logical as.integer as.bit as.bitwhich which
operator: ! & | xor != ==
querying: print length any all min max range sum summary
bit access: length<- [ [<- [[ [[<-
for more help type ?bit

Attaching package: 'bit'

The following object is masked from 'package:base':

    xor

Attaching package ff
- getOption("fftempdir")=="/work/tmp/tmp/RtmpE1zMqD"

- getOption("ffextension")=="ff"

- getOption("ffdrop")==TRUE

- getOption("fffinonexit")==TRUE

- getOption("ffpagesize")==65536

- getOption("ffcaching")=="mmnoflush"  -- consider "ffeachflush" if your system stalls on large writes

- getOption("ffbatchbytes")==16777216 -- consider a different value for tuning your system

- getOption("ffmaxbytes")==536870912 -- consider a different value for tuning your system


Attaching package: 'ff'

The following objects are masked from 'package:bit':

    clone, clone.default, clone.list

The following objects are masked from 'package:utils':

    write.csv, write.csv2

The following objects are masked from 'package:base':

    is.factor, is.ordered

PopGenome documentation built on Feb. 1, 2020, 1:07 a.m.