Learn R Programming

BGLR (version 1.0.2)

read_ped: read_ped

Description

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

Usage

read_ped(ped_file)

Arguments

ped_file
ASCII file with genotype information.

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: ll{ Integer code Genotype 0 00 Homozygote "1"/"1" 1 01 Heterozygote 2 10 Missing genotype 3 11 Homozygote "2"/"2" }

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
library(BGLR)
demo(read_ped)

Run the code above in your browser using DataLab