seqBED2GDS: Convert PLINK BED Format to SeqArray Format

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Conversion.R

Description

Converts a PLINK BED file to a SeqArray GDS file.

Usage

1
2
3
seqBED2GDS(bed.fn, fam.fn, bim.fn, out.gdsfn,
    compress.geno="LZMA_RA", compress.annotation="LZMA_RA",
    optimize=TRUE, digest=TRUE, verbose=TRUE)

Arguments

bed.fn

the file name of binary file, genotype information

fam.fn

the file name of first six columns of ".ped"

bim.fn

the file name of extended MAP file: two extra columns = allele names

out.gdsfn

the file name, output a file of SeqArray format

compress.geno

the compression method for "genotype"; optional values are defined in the function add.gdsn

compress.annotation

the compression method for the GDS variables, except "genotype"; optional values are defined in the function add.gdsn

optimize

if TRUE, optimize the access efficiency by calling cleanup.gds

digest

a logical value (TRUE/FALSE) or a character ("md5", "sha1", "sha256", "sha384" or "sha512"); add hash codes to the GDS file if TRUE or a digest algorithm is specified

verbose

if TRUE, show information

Value

Return the file name of SeqArray file with an absolute path.

Author(s)

Xiuwen Zheng

See Also

seqSNP2GDS, seqVCF2GDS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(SNPRelate)

# PLINK BED files
bed.fn <- system.file("extdata", "plinkhapmap.bed.gz", package="SNPRelate")
fam.fn <- system.file("extdata", "plinkhapmap.fam.gz", package="SNPRelate")
bim.fn <- system.file("extdata", "plinkhapmap.bim.gz", package="SNPRelate")

# convert
seqBED2GDS(bed.fn, fam.fn, bim.fn, "tmp.gds")

seqSummary("tmp.gds")

# remove the temporary file
unlink("tmp.gds", force=TRUE)

SeqArray documentation built on Nov. 14, 2018, 6:01 p.m.