getGene: Return the gene object for the given geneid.

Description Usage Arguments Value References See Also Examples

Description

This is a wrapper for GET query of "/gene/<geneid>" service.

Usage

1
2
getGene(geneid, fields = c("symbol", "name", "taxid", "entrezgene"), 
        ..., return.as=c("records", "text"), mygene)

Arguments

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 species as well as several other fields. View available fields by calling ?metadata. Also, see http://docs.mygene.info/en/latest/doc/annotation_service.html for complete argument details and syntax.

return.as

"records"" (list), "text" (JSON).

mygene

A MyGene object that describes how to connect to data resources. See MyGene-class. If missing, default object will be used that accesses the main MyGene.info portal. Default is recommended.

Value

returns a gene object containing the queried annotations

References

Ref: http://docs.mygene.info/en/latest/doc/annotation_service.html

See Also

getGenes query queryMany

Examples

1
2
3
4
5
6
7
8
## 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")

SuLab/mygene.R documentation built on May 9, 2019, 3:22 p.m.