Check pedigree data for relationship errors
This function provides a convenient way to check for pedigree errors, given
the available marker data. The function calls ibdEstimate() to estimate IBD
coefficients for all pairs of typed pedigree members, and computes the
likelihood ratio (LR) comparing each estimate to the coefficients implied by
the pedigree. By default, the estimates are shown in a colour-coded plot
where unlikely relationships are easy to spot.
checkPairwise(x, plot = TRUE, labels = FALSE, LRthreshold = 1000, ...)
x |
A |
plot |
A logical (default: TRUE). If TRUE, a plot is produced, showing the IBD estimates in the IBD triangle. |
labels |
A logical (default: FALSE). If TRUE, labels are included in the IBD triangle plot. |
LRthreshold |
A positive number (default: 1000). IBD estimates whose LR exceed this, when compared to the coefficients implied by the pedigree, are encircled in the plot. |
... |
Further parameters passed on to |
A data frame containing both the estimated and pedigree-based IBD coefficients for each pair of typed individuals. The last column contains the likelihood ratio comparing the estimated coefficients to the pedigree-based ones.
Magnus Dehli Vigeland
### Example with realistic data x = addSon(nuclearPed(nch = 2), parent = 4) x = setMarkers(x, locus = NorwegianFrequencies) x = profileSim(x, N = 1, seed = 1729)[[1]] checkPairwise(x) ### Create sample swap between 1 and 3 als = getAlleles(x) als[c(1,3), ] = als[c(3,1), ] y = setAlleles(x, alleles = als) checkPairwise(y) # Combined plot of pedigree and IBD estimates dev.new(height = 5, width = 8, noRStudioGD = TRUE) layout(rbind(1:2), widths = 2:3) plot(x, margins = c(4,2,4,2)) checkPairwise(x, labels = TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.