
Last chance! 50% off unlimited learning
Sale ends in
setVariantID(gdsfile, variant.id)
seqVCF2GDS
creates a variable
"variant.id" containing sequential integers to identify each variant.
setVariantID
allows the user to replace these values with
something more meaningful. The replacement values in
variant.id
must be unique and have the same length as the
original "variant.id" vector. Using character values for variant.id
may affect performance
for large datasets.
SeqVarGDSClass
,
seqVCF2GDS
oldfile <- system.file("extdata", "gl_chr1.gds", package="SeqVarTools")
newfile <- tempfile()
file.copy(oldfile, newfile)
gds <- seqOpen(newfile)
rsID <- seqGetData(gds, "annotation/id")
seqClose(gds)
setVariantID(newfile, rsID)
gds <- seqOpen(newfile)
seqGetData(gds, "variant.id")
head(getGenotype(gds))
seqClose(gds)
unlink(newfile)
Run the code above in your browser using DataLab