Description Usage Arguments Details Value References See Also
Write a genotypes
object as a PLINK binary fileset
1 2 |
gty |
an |
prefix |
path to the PLINK fileset to generate, excluding |
map |
a valid marker map; overrides existing map |
fam |
sample metadata to override any existing metadata |
intensity |
whether to write intensity matrices, if present (to |
keep.chrnames |
whether to keep chromosome names as-is, or allow them to be converted to PLINK's style |
... |
ignored |
Writes a PLINK binary fileset using pure R
. The fileset is generated in the
"variant-major" format (the default in all recent versions of PLINK), with appropriate magic
number. Complete sample metadata and a complete marker map, including reference alleles (columns "A1"
and "A2"), are both required.
This function only supports writing from character (allele enconding "native"
) genotypes,
in order to avoid ambiguity around the correspondence between alleles and numeric genotypes. But
numeric genotypes can be converted back to character via recode.genotypes(,"native")
.
If intensity data is saved, it is written to a binary file with suffix *.bii
in little-endian
encoding. First the X-intensity and then the Y-intensity matrix are convered to a single vector in
column-major fashion, and the result is written to disk. Intensities are pre-multiplied by 10,000 and
truncated to integers of size 2 bytes (max 2^16-1) to save space; this means values will be clipped to
6.5535 or less. In practice, for Illumina arrays, this makes essentially no difference at all for
downstream analysis.
TRUE
on completion
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.