Description Usage Arguments Details Value References See Also
Read a PLINK binary fileset into a genotypes
object
1 2 |
prefix |
path to a PLINK fileset, excluding |
intensity |
attempt to read intensity matrices ( |
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 |
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 NA
s.
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()
.
a genotypes
object, with alleles in the "01" encoding (see recode.genotypes
)
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.