Learn R Programming

PopGenome (version 2.1.6)

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

Description

This generic function calculates some linkage disequilibrium statistics.

Usage

## S3 method for class '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

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
# 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