An R package for analyzing and visualizing pedigrees
nameR()
- A helper function that attempts to standardize names with pesky inconsistenciesplotigree()
- Quick assembly of pedigrees plotsbreedr_f()
- Calculates Wright's F statistic from pedigree databreedr_COP()
- Computes a Coefficient of Parentage matrix from pedigree datareplace_name()
- A function that replaces names using a key. Helpful when going from selection numbers to cultivar names (similar to Excel's vlookup function).habsburg
- A small set of pedigree data from an infamously inbred royal family...xplotter()
- An interactive GUI for crossing simulations
Simply run the following two lines of code in an R session
install.packages("devtools")
devtools::install_github("mchizk1/breedr")
Once upon a time, in a far away land, there lived a king who was very inbred. Run the following to see an example of the simple 3-column format required for breedr datasets. Column 1 - individual ID Column 2 - female parent ID Column 3 - male parent ID
library(breedr)
head(habsburg)
The plotigree()
function uses the DiagrammeR package to make dynamic flowchart
representations of family tree plots.
The "FULL" (default) method displays the entire tree with color coding for parental sex:
plotigree(habsburg, "charles the bewitched", orientation = "LR")
The "CA" method displays a similar tree, but is consolidated by common ancestry. Common ancestors are highlighted in yellow:
plotigree(habsburg, "charles the bewitched", method = "CA")
To calculate the inbreeding coefficients (F) of all unique individuals in a dataset, run this:
breedr_F(habsburg)
And for a kinship matrix (coefficients of parentage), run this (this one can take a while):
breedr_COP(habsburg)