Learn R Programming

SimRVPedigree (version 0.4.4)

new.ped: Create an object of class ped.

Description

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

Usage

new.ped(ped_file)

Arguments

ped_file

Data.frame. A pedigree, see details.

Value

An object of class ped.

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

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab