Description Usage Arguments Details Author(s) See Also Examples
Replace the variable "variant.id" in a GDS file with a user-supplied unique vector of the same length.
1 | setVariantID(gdsfile, variant.id)
|
gdsfile |
A character string with the file path of a GDS file. |
variant.id |
A vector with the new variant IDs. |
A VCF file created by 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.
Stephanie Gogarten
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.