callhaplotype: calcultes the cotigency table of the haplotypes

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/AlgebraicHaplo.R

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

1

Arguments

dd

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

Details

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

Value

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

Note

The differences are the coice of the solution of the cubic equations. About 4 percent differences and about 7 assuming 1 per thousand. For data export or import you can use a different package.

Author(s)

Jan Wolfertz

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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("##############################")

Example output

[1] "###########################"
     [,1] [,2]
[1,]   38    0
[2,]    0   76
          [,1]      [,2]
[1,] 0.3333333 0.0000000
[2,] 0.0000000 0.6666667
[1] "##############################"
[1] "The second example: \n"
     [,1] [,2]
[1,] 3105  829
[2,]    2    0
[1] "##############################"

AlgebraicHaploPackage documentation built on May 2, 2019, 7:27 a.m.