Learn R Programming

SeqArray (version 1.12.5)

seqOptimize: Optimize the Storage of Data Array

Description

Transpose data array or matrix for possibly higher-speed access.

Usage

seqOptimize(gdsfn, target=c("by.sample"), format.var=TRUE, cleanup=TRUE, verbose=TRUE)

Arguments

gdsfn
target
"by.sample" -- optimize GDS file for seqApply(..., margin="by.sample")
format.var
a character vector for selected variable names, or TRUE for all variables, according to "annotation/format"
cleanup
call link{cleanup.gds} if TRUE
verbose
if TRUE, show information

Value

None.

Details

Warning: optimizing GDS file for reading data by sample may increase file size by up to 2X as genotype data and all format data are duplicated.

See Also

seqGetData, seqApply

Examples

Run this code
# the file name of VCF
(vcf.fn <- seqExampleFileName("vcf"))
# or vcf.fn <- "C:/YourFolder/Your_VCF_File.vcf"

# convert
seqVCF2GDS(vcf.fn, "tmp.gds")

# prepare data for the SeqVarTools package
seqOptimize("tmp.gds", target="by.sample")


# list the structure of GDS variables
(f <- seqOpen("tmp.gds"))
# close
seqClose(f)


# delete the temporary file
unlink("tmp.gds")

Run the code above in your browser using DataLab