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, father/sire, mother/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 father, mother or sex. If a father/mother 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, fathers and mothers 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, father and mother 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.14 Index]