Description Usage Arguments Details Value Note Author(s) References
read.plink is a convenience function designed to read PLINK binary files (i.e. files that end with the suffix “.bed”) in a R session. Please be aware that binary PLINK files are binary for a reason, i.e. to store genotype data in a compact way. Once they are imported in R they exist in R in a un “unpacked” form, and can therefore be very big. If the .bed file is big, or very big, the result will be that R will run out of memory and crash, or make the whole system slow or unresponsive. It is MANDATORY that in the directory containing the binary file also reside two accesory files, with the same name as the binary file but with extensions .fam and .bim, both produced by PLINK.
read.plink(root,indiv = NULL, opts = mPhen.options("geno.input"))
filename of the dataset in PLINK binary format, WITHOUT the .bed extension.
List of individuals, results will be in this order
List of options, use mPhen.options("geno.input",descr=TRUE) for more details of each option.
Please note that, if the binary file is listed a “mydata.bed”, the filename is “mydata”, and the extension is “.bed”. In this case “mydata” would be used as
A matrix of dimesions n by m, with n rows corresponding to the n individuals in the dataset, and m columns corresponding to the m markers. The colnames are retrived from the .fam file, and (should) correspond to the markers' names.
Please do note that the concept of a “big” binary file, or a binary file that is “too big” is purely dependent on the computer on which the code is running. A computer with 512MB of RAM will stop being able to read in a whole binary file well before a 16GB RAM machine.
Federico Calboli email@example.com
The plink homepage is at: https://www.cog-genomics.org/plink2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.