new.ped: Create an object of class ped.

Description Usage Arguments Details Value Examples

View source: R/Ped_Methods.R

Description

Create an object of class ped, from a data.frame, required input for reassign_gen, censor_ped, and trim_ped functions.

Usage

1
new.ped(ped_file)

Arguments

ped_file

Data.frame. A pedigree, see details.

Details

The data frame supplied to new.ped, ped_file, must contain the following variables:

name type description
FamID numeric family identification number
ID numeric individual identification number
dadID numeric identification number of father
momID numeric identification number of mother
sex numeric gender identification; if male sex = 0, if female sex = 1
affected logical disease-affection status:
affected = TRUE if affected by disease, and FALSE otherwise,

Optionally, ped_file may contain any of the following variables:

name type description
available logical availibility status;
available = TRUE if available, and FALSE otherwise.
DA1 numeric paternally inherited allele at the assumed disease locus:
DA1 = 1 if rare variant is present, and 0 otherwise
DA2 numeric maternally inherited allele at the assumed disease locus:
DA2 = 1 if rare variant is present, and 0 otherwise
birthYr numeric the individual's birth year
onsetYr numeric the individual's year of disease onset, when applicable, otherwise NA
deathYr numeric the individual's year of death, when applicable, otherwise NA
RR numeric the individual's relative-risk of disease
Gen numeric the individual's generation number relative to the eldest founder.
For the eldest founder Gen = 1, for his or her offspring Gen = 2, etc.
proband logical proband identifier:
proband = TRUE if individual is the proband, and FALSE otherwise.
subtype character the individual's disease subtype, when applicable, otherwise NA

We note that some of the optional fields above may be required for various ped functions

Value

An object of class ped.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(EgPeds)
head(EgPeds)

ped1 = new.ped(EgPeds[EgPeds$FamID == 1, ])
head(ped1, n = 3)
class(ped1)
summary(ped1)

AllPeds = new.ped(EgPeds)
head(AllPeds)
class(AllPeds)
summary(AllPeds)

simrvprojects/SimRVPedigree documentation built on Feb. 12, 2020, 6:12 p.m.