addBackSecondParents: Add back single parents trimmed pedigree

Description Usage Arguments Value Examples

View source: R/addBackSecondParents.R

Description

Uses the ped dataframe, which has full complement of parents and the uPed dataframe, which has all uninformative parents removed to add back single parents to the uPed dataframe where one parent is known. The parents are added back to the pedigree as an ID record with NA for both sire and dam of the added back ID.

Usage

1

Arguments

uPed

a trimmed pedigree dataframe with uninformative founders removed.

ped

a trimmed pedigree

Value

A dataframe with pedigree with single parents added.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
examplePedigree <- nprcgenekeepr::examplePedigree
breederPed <- qcStudbook(examplePedigree, minParentAge = 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)

rmsharp/nprcmanager documentation built on April 24, 2021, 3:13 p.m.