haplotypeit {AlgebraicHaploPackage} | R Documentation |
This functions recalculates the potential 2x2 haplotype matrics. It gets a 3x3 matrixs and returns a list A,B,C,D of vectors. A[1],B[1],C[1],D[1] is the first solution of the matrix. There are always three solutions.
haplotypeit(a, b, c, d, e, f, g, h, i)
a |
Number of counts of matching snip pairs. |
b |
Number of counts of matching snip pairs.. |
c |
Number of counts of matching snip pairs. |
d |
Number of counts of matching snip pairs. |
e |
Number of counts of matching snip pairs. |
f |
Number of counts of matching snip pairs. |
g |
Number of counts of matching snip pairs. |
h |
Number of counts of matching snip pairs. |
i |
Number of counts of matching snip pairs. |
The software automatically resolves the cases e=0 by circumventing the cubic equation. If the degree of the equation is lower additional copies of some solution will be made to produce the outputformat. The output format is a list of four vectors of copefficients. Each vector contains three complex numbers.
output$A is a vector of length 3. output$B,Output$C, output$D is eighter of length 3. One potential solution is A[1],B[1],C[1],D[1].
Jan wolfertz
This methods refers to an article: 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.
callhaplotype
haplotypeit(4,0,0,0,30,0,0,0,23) print("##############################") print("This tests the cubic routine") haplotypeit(4,0,0,0,30,0,0,0,23) ### Formated of 4 digits print("Formated of 4 digits") round(as.numeric(Re(haplotypeit(4,0,0,0,30,0,0,0,23)$A)),digit=4) round(as.numeric(Re(haplotypeit(4,0,0,0,30,0,0,0,23)$B)),digit=4) round(as.numeric(Re(haplotypeit(4,0,0,0,30,0,0,0,23)$C)),digit=4) round(as.numeric(Re(haplotypeit(4,0,0,0,30,0,0,0,23)$D)),digit=4) ###