This function imports PLINK data into a genlight object and append available metadata.
gl.read.PLINK(
filename,
ind.metafile = NULL,
loc.metafile = NULL,
plink.cmd = "plink",
plink.path = "path",
plink.flags = NULL,
verbose = NULL
)
A genlight object with the SNP data and associated metadata included.
Fully qualified path to PLINK input file (without including the extension)
Name of the csv file containing the metrics for individuals [optional].
Name of the csv file containing the metrics for loci [optional].
The 'name' to call plink. This will depend on the file name (without the extension '.exe' if on windows) or the name of the PATH variable
The path where the executable is. If plink is listed in the PATH then there is no need for this. This is what the option "path" means
additional possible parameters passed on to plink.
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity].
Custodian: Carlo Pacioni -- Post to https://groups.google.com/d/forum/dartr
This function handles .ped or .bed file (with the associate files - e.g. .fam, .bim). However, if a .ped file is provided, PLINK needs to be installed and it is used to convert the .ped into a .bed, which is then converted into a genlight.
Additional metadata can be included passing .csv files. These will be appended to the existing metadata present in the PLINK files.
The locus metadata needs to be in a csv file with headings, with a mandatory column headed AlleleID corresponding exactly to the locus identity labels provided with the SNP data