write.plink: Prepare data for PLINK
Description
Create input files and corresponding script for PLINK (Purcell et al. 2007) to estimate pairwise LD through function pairwiseLD.Usage
write.plink(gp, wdir = getwd(), prefix = paste(substitute(gp)),
ld.threshold = 0, type = c("data.frame", "matrix"),
ld.window=99999)Arguments
gp
gpData object with elements geno and map
wdir
character. Directory for PLINK input files
prefix
character. Prefix for PLINK input files.
ld.threshold
numeric. Threshold for the LD used in PLINK.
type
character. Specifies the type of return value for PLINK.
ld.window
numeric. Window size for pairwise differences which will be reported by PLINK (only for use.plink=TRUE; argument --ld-window-kb in PLINK) to thin the output dimensions. Only SNP pairs with a distance < ld.windo
Value
- No value returned. Files
prefix.map, prefix.ped and prefixPlinkScript.txt are created in the working directory
References
Purcell S, Neale B, Todd-Brown K, Thomas L, Ferreira MAR, Bender D, Maller J, Sklar P, de Bakker PIW, Daly MJ & Sham PC (2007)
PLINK: a toolset for whole-genome association and population-based linkage analysis. American Journal of Human Genetics, 81.Examples
Run this codewrite.plink(maize,type="data.frame")
Run the code above in your browser using DataLab