Learn R Programming

nprcgenekeepr (version 3.0.0)

removeAutoGenIds: Remove automatically generated IDs from pedigree

Description

Identifies automatically generated IDs via isGeneratedUnknownId(), the shared detection predicate derived from the configurable auto-ID format (see getAutoIdFormat). With the default "U%04d", an automatically generated ID is a capital "U" followed by at least four capital letters or digits ("U0001", or "U05X3C" after de-identification). A real animal whose ID merely starts with "U" ("U1", "U123", "Uma") is kept, and so is its place as a sire or dam; a real ID of the full shape ("U1234") is removed unless the pedigree's placeholder column (see qcStudbook) marks it FALSE, and a TRUE mark removes a stand-in whatever its ID looks like. The "four or more" match is a prefix, so an ID such as "U1234abc" is removed too. Sire and dam entries that are generated IDs are set to NA.

Usage

removeAutoGenIds(ped)

Value

A pedigree with automatically generated IDs removed.

Arguments

ped

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

Examples

Run this code
examplePedigree <- nprcgenekeepr::examplePedigree
length(examplePedigree$id)
ped <- removeAutoGenIds(examplePedigree)
length(ped$id)

Run the code above in your browser using DataLab