seqSNP2GDS: Convert SNPRelate Format to SeqArray Format

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Conversion.R

Description

Converts a SNP GDS file to a SeqArray GDS file.

Usage

1
2
3
seqSNP2GDS(gds.fn, out.fn, storage.option="LZMA_RA", major.ref=TRUE,
    ds.type=c("packedreal16", "float", "double"), optimize=TRUE, digest=TRUE,
    verbose=TRUE)

Arguments

gds.fn

the file name of SNP format

out.fn

the file name, output a file of SeqArray format

storage.option

specify the storage and compression options, "LZMA_RA" to use LZMA compression algorithm with higher compression ratio compared to "ZIP_RA"

major.ref

if TRUE, use the major allele as a reference allele; otherwise, use A allele in SNP GDS file as a reference allele

ds.type

applicable when import dosages, the data type for storing dosages; see 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. If the input file is genotype dosage, the dosage matrix is stored in the node annotation/format/DS with the estimated dosage of alternative alleles. Any value less than 0 or greater than 2 will be replaced by NaN.

Author(s)

Xiuwen Zheng

See Also

seqGDS2SNP, seqVCF2GDS, seqGDS2VCF, seqBED2GDS

Examples

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

# the GDS file
gds.fn <- snpgdsExampleFileName()

seqSNP2GDS(gds.fn, "tmp.gds")

seqSummary("tmp.gds")


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

SeqArray documentation built on Nov. 17, 2018, 6 p.m.