Learn R Programming

nprcgenekeepr (version 2.0.0)

getDescendantPedigree: Reduce a pedigree to a group and its descendants

Description

Filters a pedigree down to only the descendants of the provided group, building the pedigree forward in time starting from a group of probands. This is the downward (descendants-only) mirror of getProbandPedigree: it takes the transitive closure over offspring and returns the probands together with all of their descendants. It does not include collateral relatives (siblings, cousins, or mates).

Usage

getDescendantPedigree(probands, ped)

Value

A reduced pedigree containing the probands and all of their descendants.

Arguments

probands

a character vector with the list of animals whose descendants should be included in the final pedigree.

ped

datatable that is the Pedigree. It contains pedigree information. The fields id, sire and dam are required.

Examples

Run this code
library(nprcgenekeepr)
ped <- nprcgenekeepr::lacy1989Ped
## D's descendants are F and G
getDescendantPedigree(probands = "D", ped = ped)$id

Run the code above in your browser using DataLab