getGene {mygene} | R Documentation |
This is a wrapper for GET query of "/gene/<geneid>" service.
getGene(geneid, fields = c("symbol", "name", "taxid", "entrezgene"), ..., return.as=c("records", "text"), mygene)
geneid |
Entrez/ensembl gene id |
fields |
Fields to return, a list of a comma-sep string. If fields=="all", all available fields are returned. |
... |
Includes |
return.as |
"records"" (list), "text" (JSON). |
mygene |
A MyGene object that describes how to connect to data resources. See |
returns a gene object containing the queried annotations
Ref: http://docs.mygene.info/en/latest/doc/annotation_service.html
## return the gene object for the given gene id getGene(1017) ## customize fields getGene(1017, fields=c("name", "symbol", "refseq"), return.as="text") ## all fields getGene(1017, fields="all")