getGenes {mygene} | R Documentation |
This is a wrapper for POST query of "/gene" service.
getGenes(geneids, fields = c("symbol", "name", "taxid", "entrezgene"), ..., return.as=c("DataFrame", "records", "text"), mygene)
geneids |
A vector, list, or comm-sep string entrez/ensembl gene ids |
fields |
A vector of fields to return. If fields=="all", all available fields are returned. |
... |
Includes |
return.as |
"DataFrame" (default), "records" (list), "text" (JSON). |
mygene |
A MyGene object that describes how to connect to data resources. See |
returns a gene object (DataFrame, list, or JSON text) containing the queried annotations
Ref: http://docs.mygene.info/en/latest/doc/annotation_service.html
## Return the list of gene object for the given list of gene ids. getGenes(c(1017,1018)) ## mix types of gene ids getGenes(c(1017,1018,"ENSG00000148795"))