read.plink.text: Read PLINK text file.

Description Usage Arguments Details Value

Description

read.plink.text reads PLINK text files in either the original or transposed format.

Usage

1
2
read.plink.text(ped, map = NULL, output.allele = TRUE, na.strings = c("0",
  "-9"))

Arguments

ped, map

PLINK files with appropraite extensions.

output.allele

logical, default is to output genotype as alleles.

na.strings

Character vector, set of characters to be treated as missing values.

Details

The PLINK pedigree file should be supplied with the appropriate extension. The corresponding map file can be omitted if it has the same file name as the pedigree file and has the appropriate extension.

Value

A list of three elements: genotype, fam and map. To be consistent with PLINK .ped file, genotype by default is a n_subject by (2 x n_marker) matrix of alleles, where 1 represents the reference allele and 2 the alternate allele. Alternatively, genotype can be outputted as 0, 1 or 2 copies of reference allele count by using output.allele = FALSE. Missing values are -9. fam is a dataframe that contains the first six columns of a PLINK .ped file. map is a dataframe that contains the four columns of a PLINK .map file, with two additional columns: allele_1 for the reference allele type, allele_2 for the alternate allele type.


bowenwang7/r3 documentation built on May 17, 2019, 6:39 p.m.