Learn R Programming

BGLR (version 1.1.3)

read_ped: read_ped

Description

This function reads genotype information stored in PED format used in plink.

Usage

read_ped(ped_file)

Value

The routine will return a vector of dimension n*p (n=number of individuals, p=number of snps), with the snps stacked.

The vector contains integer codes:

Integer codeGenotype
000 Homozygote "1"/"1"
101 Heterozygote
210 Missing genotype
311 Homozygote "2"/"2"

Arguments

ped_file

ASCII file with genotype information.

Author

Gustavo de los Campos, Paulino Perez Rodriguez,

Details

The PED file is a white-space (space or tab) delimited file: the first six columns are mandatory:

Family ID Individual ID Paternal ID Maternal ID Sex (1=male; 2=female; other=unknown) Phenotype

The IDs are alphanumeric: the combination of family and individual ID should uniquely identify a person. A PED file must have 1 and only 1 phenotype in the sixth column. The phenotype can be either a quantitative trait or an affection status column.

Examples

Run this code

if (FALSE) {

library(BGLR)
demo(read_ped)

}

Run the code above in your browser using DataLab