Part of Relations
makeCEPH(id, sire, dam)
character vector with unique identifier for an individual
character vector with unique identifier for an
individual's father (NA
if unknown).
character vector with unique identifier for an
individual's mother (NA
if unknown).
List of lists: {fields: id, {subfields: parents, pgp, mgp}}. Pedigree information converted into a CEPH-style list. The top level list elements are the IDs from id. Below each ID is a list of three elements: parents (sire, dam), paternal grandparents (pgp: sire, dam), and maternal grandparents (mgp: sire, dam).
Creates a CEPH-style pedigree for each id, consisting of three generations: the id, the parents, and the grandparents. Inserts NA for unknown pedigree members.
Calculates the first-order relationships in a pedigree, and to convert pairwise kinships to the appropriate relationship category. Relationships categories: For each ID in the pair, find a CEPH-style pedigree and compare them
If one is the parent of the other
--- Designate the relationship as parent-offspring
Else if both parents are shared
--- Designate the relationship as full-siblings
Else if one parent is shared
--- Designate the relationship as half-siblings
Else if one is the grandparent of the other
--- Designate the relationship as grandparent-grandchild
Else if both grand parents are shared
--- Designate the relationship as cousin
Else if at least one grand parent is shared
--- Designate the relationship as cousin - other
Else if the parents of one are the grandparents of the other
--- Designate the relationship as full-avuncular
Else if a single parent of one is the grandparent of the other
--- Designate the relationship as avuncular - other
Else if the kinship is greater than 0, but the pair don't fall into
the above categories
--- Designate the relationship as other
Else
--- Designate the relationships as no relation.
# NOT RUN {
library(nprcgenekeepr)
ped <- nprcgenekeepr::lacy1989Ped
pedCEPH <- makeCEPH(ped$id, ped$sire, ped$dam)
head(ped)
head(pedCEPH$F)
# }
Run the code above in your browser using DataLab