getGenes: Return the list of gene objects for the given list of...

Description Usage Arguments Value References See Also Examples

Description

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

Usage

1
2
getGenes(geneids, fields = c("symbol", "name", "taxid", "entrezgene"), ..., 
          return.as=c("DataFrame", "records", "text"), mygene)

Arguments

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 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

"DataFrame" (default), "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 (DataFrame, list, or JSON text) containing the queried annotations

References

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

See Also

getGene query queryMany

Examples

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

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