Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

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.

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

Author(s)

Gustavo de los Campos, Paulino Perez Rodriguez,

Examples

## Not run: 

library(BGLR)
demo(read_ped)


## End(Not run)

BGLR

Bayesian Generalized Linear Regression

v1.0.8
GPL-3
Authors
Gustavo de los Campos, Paulino Perez Rodriguez,
Initial release
2018-11-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.