check_pedigree: Check a pedigree for errors

View source: R/check_pedigree.R

check_pedigreeR Documentation

Check a pedigree for errors

Description

Perform a series of checks on the tabular data for a pedigree, checking for problems

Usage

check_pedigree(pedigree, ignore_sex = FALSE)

Arguments

pedigree

Numeric matrix or data frame with four columns: ID, mom ID, dad ID, sex. Sex is coded as 0=female, 1=male. There can be additional columns, but they'll be ignored.

ignore_sex

If TRUE, ignore the sex values completely (appropriate for hermaphroditic species.)

Details

The parents should be listed before any of their offspring. Founders should have 0's for mother and father; all others should have non-zero values for the parents, and the parents should appear in the pedigree. Father should be male and mothers should be female (unless ignore_sex=TRUE). Individual identifiers should be unique and non-zero. There should be no missing values anywhere. (NAs are allowed in the sex column if ignore_sex=TRUE.)

Value

TRUE (invisibly) if everything is okay; otherwise gives an error.

See Also

sim_from_pedigree(), sim_ril_pedigree()

Examples

tab <- sim_ril_pedigree(7)
check_pedigree(tab)


simcross documentation built on May 29, 2024, 2:41 a.m.