Learn R Programming

popgenr (version 0.2)

Dcalc: Calculate and visualize LD

Description

Calculates the degree of linkage disequilibirum between two biallelic diploid loci and plots the results.

Usage

Dcalc(AABB, AaBB, aaBB, AABb, AaBb, aaBb, AAbb, Aabb, aabb)

Arguments

AABB

Count of A and B double homozygotes.

AaBB

Count of A heterozygotes, B homozygotes.

aaBB

Count of a and B double homozygotes.

AABb

Count of A homozygotes, B heterozygotes.

AaBb

Count of double heterozygotes.

aaBb

Count of a homozygotes, B heterozygote.

AAbb

Count of A and b double homozygotes.

Aabb

Count of A heterozygotes, b homozygotes.

aabb

Count of a and b double homozygotes.

Examples

Run this code
# NOT RUN {
#assign genotype counts
AABB=2
AaBB=0
aaBB=0
AABb=0
AaBb=1
aaBb=0
AAbb=1
Aabb=0
aabb=0

#run function
Dcalc(AABB, AaBB, aaBB, AABb, AaBb, aaBb, AAbb, Aabb, aabb)
# }

Run the code above in your browser using DataLab