Learn R Programming

myvariant (version 1.2.0)

getVariant: Return the variant object for the given HGVS id.

Description

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

Usage

getVariant(hgvsid, fields=NULL, ..., return.as=c("records", "text"), myvariant)

Arguments

hgvsid
HGVS id
fields
Fields to return, a list of a comma-sep string. If fields=="all", all available fields are returned.
...

return.as
"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#get-request http://docs.myvariant.info/en/latest/doc/variant_annotation_service.html#query-parameters

See Also

getVariants queryVariant queryVariants

Examples

Run this code
## return the variant object for the given HGVS id
getVariant("chr7:g.55241707G>T")

## customize fields
getVariant("chr7:g.55241707G>T", 
          fields=c("dbnsfp.cadd.phred", "dbnsfp.polyphen2"), 
          return.as="text")

Run the code above in your browser using DataLab