# the VCF file
(vcf.fn <- seqExampleFileName("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)
# delete the temporary file
unlink("tmp.gds")
Run the code above in your browser using DataLab