# The VCF file
vcf.file <- system.file("extdata", "sequence.vcf", package="SNPRelate")
readLines(vcf.file)
gds.file <- tempfile()
convertVcfGds(vcf.file, gds.file)
# open GDS file
(gds <- GdsGenotypeReader(gds.file))
getScanID(gds)
getSnpID(gds)
getChromosome(gds)
getPosition(gds)
getVariable(gds, "sample.name")
getVariable(gds, "snp.rs.id")
getVariable(gds, "snp.allele")
getGenotype(gds)
# close the genotype file
close(gds)
unlink(gds.file)
Run the code above in your browser using DataLab