synbreed (version 0.12-9)

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.window are reported (default = 99999).

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.

See Also

pairwiseLD

Examples

Run this code
# NOT RUN {
library(synbreedData)
write.plink(maize,type="data.frame")
# }

Run the code above in your browser using DataLab