Learn R Programming

nprcgenekeepr (version 3.0.0)

getIdsWithOneParent: Get ids of animals with only one parent

Description

Get ids of animals with only one parent

Usage

getIdsWithOneParent(uPed)

Value

Character vector of the IDs of animals with exactly one known parent.

Arguments

uPed

a trimmed pedigree dataframe with uninformative founders removed.

Examples

Run this code
examplePedigree <- nprcgenekeepr::examplePedigree
breederPed <- qcStudbook(examplePedigree,
  minSireAge = 2, minDamAge = 2,
  reportChanges = FALSE,
  reportErrors = FALSE
)
probands <- breederPed$id[!(is.na(breederPed$sire) &
  is.na(breederPed$dam)) &
  is.na(breederPed$exit)]
ped <- getProbandPedigree(probands, breederPed)
nrow(ped)
p <- removeUninformativeFounders(ped)
nrow(p)
p <- addBackSecondParents(p, ped)
nrow(p)
getIdsWithOneParent(p)

Run the code above in your browser using DataLab