plink2gscramble {gscramble}R Documentation

read plink-formatted .map and .ped files into 'gscramble' format

Description

This will read .ped and .map files (which can be gzipped, but cannot be the binary .bed or .bim plink format). The population specifier of each individual is assumed to be the first column (the FID column) in the .ped file.

Usage

plink2gscramble(ped = NULL, map = NULL, prefix = NULL, gz_ext = FALSE)

Arguments

ped

path to the plink .ped file holding information about the individuals and their genotypes. This file can also be gzipped. The function assumes that the second column of this file is unique across all family IDs. If this is not the case, the function throws a warning. It is assumed that missing genotypes are denoted by 0's in this file.

map

path to the plink .map file holding information about the markers. This file can be gzipped

prefix

If map and ped are not given as explicit paths to the file, you can give the prefix, and it will search for the two files with the .ped and .map extensions on the end of the prefix.

gz_ext

Logical. If TRUE, and specifying files by prefix, this will add a .gz extension to the map and ped files.

Value

A list with three components:

Examples

ped_plink <- system.file("extdata/example-plink.ped.gz", package = "gscramble")
map_plink <- system.file("extdata/example-plink.map.gz", package = "gscramble")

result <- plink2gscramble(ped_plink, map_plink)

[Package gscramble version 1.0.1 Index]