write.plink: Prepare data for PLINK

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/write.plink.r

Description

Create input files and corresponding script for PLINK (Purcell et al. 2007) to estimate pairwise LD through function pairwiseLD.

Usage

1
2
3
4
5
6
7
8
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

Author(s)

Valentin Wimmer

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

1
2
3
4
5
## Not run: 
library(synbreedData)
write.plink(maize, type = "data.frame")

## End(Not run)

synbreed documentation built on March 12, 2021, 3:01 a.m.