read.plink: Read a PLINK binary fileset into a 'genotypes' object

Description Usage Arguments Details Value References See Also

Description

Read a PLINK binary fileset into a genotypes object

Usage

1
2
read.plink(prefix, intensity = FALSE, chr = NULL, from = NULL,
  to = NULL, markers = NULL, keep = NULL, keep.chrnames = FALSE, ...)

Arguments

prefix

path to a PLINK fileset, excluding *.bed suffix

intensity

attempt to read intensity matrices (*.bii), if present

chr

chromosome(s) to keep

from

keep markers at physical position greater than or equal to this

to

keep markers at physical position less than or equal to this

markers

keep *markers* with these names

keep

keep *samples* with these names

keep.chrnames

whether to keep chromosome names as-is, or allow them to be converted to PLINK's style

...

ignored

Details

Reads a PLINK binary fileset using pure R. The fileset should be generated in the "variant-major" format (the default in all recent versions of PLINK.) Missing genotypes are represented as NAs.

If any of chr,from,to,markers,keep are specified, the file will be read in random-access mode. Positional filters are applied only if one or more chromosomes are specified. Marker-name filters are applied after chromosome/position filters; it rarely makes sense to specify both a set of names and a set of positions. Chromosome names must match exactly those used in the marker map (*.bim file), and sample names must match exactly those used in the sample metadata file (*.fam file).

Random-access mode is not guaranteed to be more efficient than reading the whole dataset into the R session and then subsetting it. Efficiency gains will depend on how much of the data happends to be found in contiguous blocks, and also on hardware (eg. SSD versus standard hard disk).

If intensities are present, they are expected to be encoded as described in the help page for write.plink().

Value

a genotypes object, with alleles in the "01" encoding (see recode.genotypes)

References

PLINK v1.9: https://www.cog-genomics.org/plink2

Purcell S et al. (2007) PLINK: a toolset for whole-genome association and population-based linkage analysis. Am J Hum Genet 81(3): 559-575. doi:10.1086/519795.

See Also

write.plink


andrewparkermorgan/argyle documentation built on May 10, 2019, 11:08 a.m.