Learn R Programming

PopGenome (version 2.7.2)

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

Description

This generic function calculates some linkage disequilibrium statistics.

Usage

# S4 method for 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

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.

Details

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

Examples

Run this code
# NOT RUN {
# 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 

# }

Run the code above in your browser using DataLab