pedRecode {QTLRel}R Documentation

Recode a Pedigree

Description

Prepare a pedigree in a format that is suitable for certain functions

Usage

pedRecode(ped, ids, all = TRUE, msg = TRUE)

Arguments

ped

A pedigree, which is a data frame (id, sire, dam, ...). If "sex" is a component, male should be "M", "Male" or 1, and female should be "F", "Female" or 2 (other than 0 and 1). If given, "generation" can be numeric 0, 1, 2, ... or non-numeric "F0", "F1", "F2", ..., which should be in an increasing order. Note: 0 is reserved for unknown sire, dam or sex. If a sire/dam is an inbred founder, its ID should be tagged by character 'i' (e.g. 1i, 2i, etc.).

ids

If given, only individuals with ids and their ancestors are kept in the recoded pedigree.

all

If false, sires and dams with no parents are treated as unknown.

msg

If false, messages are suppressed.

Details

This function is used in cic, and it can be used for error checking with respect to sex and generation if sex and/or generation information is available. The actual values of generation can be anything but should correspond to the true order of generation; otherwise, cic may fail or we may get incorrect results. Information except id, sire and dam is optional.

Value

A recoded pedigree.

See Also

cic.

Examples

data(miscEx)

pedF8[1:10,]
pedR<- pedRecode(pedF8)
pedR[1:10,]
dim(pedR)
pedR<- pedRecode(pedF8, ids=pedF8$id[pedF8$gener=="F8"])
dim(pedR)

[Package QTLRel version 1.0 Index]