calc.R2-methods: Linkage statistics (R2, P-value, Distance)

Description Usage Arguments Details Value Examples

Description

This generic function calculates some linkage disequilibrium statistics.

Usage

1
2
## S4 method for signature 'GENOME'
calc.R2(object,subsites=FALSE,lower.bound=0,upper.bound=1)

Arguments

object

an object of class "GENOME"

subsites

same as in the other modules

lower.bound

sites with minor-allele-frequency>=lower.bound are considered

upper.bound

sites with minor-allele-frequency<=upper.bound are considered

Details

Note, the pairwise comparisons are computed via combn(n.snps,2).

Value

The slot GENOME.class@region.stats@linkage.disequilibrium will be filled.
(R2,P-value,Distance)
Fisher's Exact Test is used for the P-values.

Examples

1
2
3
4
5
6
# GENOME.class <- readData("...\Alignments")
# GENOME.class
# GENOME.class <- calc.R2(GENOME.class)
# show the result:
# GENOME.class@region.stats@linkage.disequilibrium
# [[x]][[y]] x:region, y:population 

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