ibdPlot produces an IBD plot showing observed
identity by descent values color coded by expected relationship.
Theoretical boundaries for full-sibling, second-degree, and
third-degree relatives are plotted in orange.
ibdAreasDraw overlays relationship areas for IBD analysis on
the plot.
ibdAssignRelatedness identifies observed relatives.
ibdAssignRelatedness identifies observed relatives using the kinship coefficients and IBS0 estimates from the KING model.
ibdPlot(k0, k1, alpha=0.05, relation=NULL, color=NULL, rel.lwd=2, rel.draw=c("FS", "Deg2", "Deg3"), ...)
ibdAreasDraw(alpha=0.05, m=0.04, po.w=0.1, po.h=0.1, dup.w=0.1, dup.h=0.1, un.w=0.25, un.h=0.25, rel.lwd=2,
xcol=c("cyan","red","blue","lightgreen","magenta","black"))
ibdAssignRelatedness(k0, k1, alpha=0.05, m=0.04, po.w=0.1, po.h=0.1, dup.w=0.1, dup.h=0.1, un.w=0.25, un.h=0.25)
ibdAssignRelatednessKing(ibs0, kc, cut.kc.dup=1/(2^(3/2)), cut.kc.fs=1/(2^(5/2)), cut.kc.deg2=1/(2^(7/2)), cut.kc.deg3=1/(2^(9/2)), cut.ibs0.err=0.003)NULL, no boundaries are drawn.ibdAssignRelatedness and ibdAssignRelatednessKing return a vector of relationships with
values "Dup"=duplicate, "PO"=parent-offspring, "FS"=full sibling,
"Deg2"=second degree, "Deg3"=third degree, "U"=unrelated, and
"Q"=unknown.ibdPlot produces an IBD plot showing observed identity by descent
values color coded by expected relationship, typically as deduced from
pedigree data. Points are plotted according to their corresponding
value in the color vector, and the relation vector is used
to make the plot legend. In addition to the relationships listed above,
any relationships output from pedigreePairwiseRelatedness
will be recognized.
Theoretical boundary for full-sibs is indicated by ellipse and boundaries for second and third degree intervals are indicated in orange. For full-sibs, 100(1-alpha)% prediction ellipse is based on assuming bivariate normal distribution with known mean and covariance matrix. For second degree (half siblings, avuncular, grandparent-grandchild) and third degree (first cousins), 100(1-alpha)% prediction intervals for k1 are based on assuming normal distribution with known mean and variance, computed as in Hill and Weir (2011).
ibdAreasDraw overlays relationship areas on the plot to help
with analyzing observed relationships.
ibdAssignRelatedness identifies relatives based on their (k0, k1) coordinates.
ibdAssignRelatednessKing identifies relatives based on their (ibs0, kc) coordinates (KING model).
relationsMeanVar,
pedigreePairwiseRelatedness
k0 <- c(0, 0, 0.25, 0.5, 0.75, 1)
k1 <- c(0, 1, 0.5, 0.5, 0.25, 0)
exp.rel <- c("Dup", "PO", "FS", "HS", "FC", "U")
ibdPlot(k0, k1, relation=exp.rel)
ibdAreasDraw()
obs.rel <- ibdAssignRelatedness(k0, k1)
kc <- c(0.5, 0.25, 0.25, 0.125, 0.063, 0)
ibs0 <- c(0, 0, 0.25, 0.5, 0.75, 1)
obs.rel.king <- ibdAssignRelatednessKing(ibs0, kc)
Run the code above in your browser using DataLab