read_ped | R Documentation |
This function reads genotype information stored in PED format used in plink.
read_ped(ped_file)
ped_file |
ASCII file with genotype information. |
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.
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" |
Gustavo de los Campos, Paulino Perez Rodriguez,
## Not run:
library(BGLR)
demo(read_ped)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.