# the file of VCF
(vcf.fn <- seqExampleFileName("vcf"))
# convert
seqVCF2GDS(vcf.fn, "tmp1.gds", storage.option=seqStorageOption())
(f1 <- seqOpen("tmp1.gds"))
# convert (maximize the compression ratio)
seqVCF2GDS(vcf.fn, "tmp2.gds", storage.option=seqStorageOption("ZIP_RA.max"))
(f2 <- seqOpen("tmp2.gds"))
# does not compress the genotypic data
seqVCF2GDS(vcf.fn, "tmp3.gds", storage.option=
seqStorageOption("ZIP_RA", geno.compress=""))
(f3 <- seqOpen("tmp3.gds"))
# compress with LZ4
seqVCF2GDS(vcf.fn, "tmp4.gds", storage.option=seqStorageOption("LZ4_RA"))
(f4 <- seqOpen("tmp4.gds"))
# close and remove the files
seqClose(f1)
seqClose(f2)
seqClose(f3)
seqClose(f4)
unlink(c("tmp1.gds", "tmp2.gds", "tmp3.gds", "tmp4.gds"))
Run the code above in your browser using DataLab