Learn R Programming

myvariant (version 1.2.0)

getVariants: Return the list of variant objects for the given list of HGVS ids.

Description

This is a wrapper for POST query of "/variant" service.

Usage

getVariants(hgvsids, fields=NULL, verbose=NULL, ..., return.as=c("DataFrame", "records", "text"), myvariant)

Arguments

hgvsids
A vector, list, or comm-sep string HGVS ids
fields
A vector of fields to return. If fields=="all", all available fields are returned.
verbose
A logical turning on or off process status messages. Default = TRUE.
...

return.as
"DataFrame" (default), "records" (list), "text" (JSON).
myvariant
A MyVariant object that describes how to connect to data resources. See MyVariant-class. If missing, default object will be used that accesses the main MyVariant.info portal. Default is recommended.

Value

References

http://docs.myvariant.info/en/latest/doc/variant_annotation_service.html#batch-queries-via-post http://docs.myvariant.info/en/latest/doc/variant_annotation_service.html#id2

See Also

getVariants queryVariant queryVariants

Examples

Run this code
## given a list of HGVS ids
vars <- c('chr1:g.866422C>T',
'chr1:g.876664G>A',
'chr1:g.69635G>C',
'chr1:g.69869T>A',
'chr1:g.881918G>A',
'chr1:g.865625G>A',
'chr1:g.879368C>A',
'chr1:g.889226C>T',
'chr1:g.879492C>G',
'chr1:g.879423T>G',
'chr1:g.881602C>T',
'chr1:g.879115C>G',
'chr1:g.69892T>C',
'chr1:g.879381C>T',
'chr1:g.878330C>G')

## Return the list of variant object for the given list of HGVS ids.
df <- getVariants(vars, fields="dbsnp, wellderly")

Run the code above in your browser using DataLab