Learn R Programming

AlgebraicHaploPackage (version 1.2)

callhaplotype: calcultes the cotigency table of the haplotypes

Description

It starts with a contigency table of pairs of haplotypes and ends up with the haplotypes one. The heterocygote cases are the middle of the column and rows.

Usage

callhaplotype(dd)

Arguments

dd
This is a contingency table. Rows and columns are in the order are AA, AB,BB.

Value

The haplotype contingency table is returned. All entries are numeric.

Details

A 2x2 contingency table of haplotypes is calculated. The most likely solution had been choosen.

References

David Clayton. "An r package for analysis of whole-genome association studies." Human Heredity, 64(1):45 - 51, 2007. doi: doi:10.1001/archgenpsychiatry.2010.25. URL http://archpsyc.jamanetwork.com/article.aspx?articleid=210679. Jan Wolfertz(in press.):""

Examples

Run this code
print("###########################")
dd2=matrix(c(4,0,0,0,30,0,0,0,23),ncol=3,byrow=TRUE)
callhaplotype(dd2)
callhaplotype(dd2)/(2*57)

### The second example
print("##############################")
print("The second example: \n")
dd=matrix(c(1212, 2, 0, 679, 0,0,75,0,0), byrow=TRUE, nrow=3)
colnames(dd)=c("CC","CT","TT")
rownames(dd)=c("CC","CT","TT")
callhaplotype(dd)
print("##############################")

Run the code above in your browser using DataLab