# the file name of VCF
(vcf.fn <- seqExampleFileName("vcf"))
# or vcf.fn <- "C:/YourFolder/Your_VCF_File.vcf"
# convert
seqVCF2GDS(vcf.fn, "tmp.gds")
# list the structure of GDS variables
f <- seqOpen("tmp.gds", FALSE)
f
seqTranspose(f, "genotype/data")
f
# the original array
index.gdsn(f, "genotype/data")
# the transposed array
index.gdsn(f, "genotype/~data")
# close
seqClose(f)
unlink("tmp.gds")
Run the code above in your browser using DataLab