query: Return the query result.

Description Usage Arguments Value References See Also Examples

Description

This is a wrapper for GET query of "/query?q=<query>" service.

Usage

1
query(q, ..., return.as=c("DataFrame", "records", "text"), mygene)

Arguments

q

query term(s), see query syntax at http://mygene.info/doc/query_service.html#query-syntax

...

Commonly queried fields include species, fields, size as well as several other fields. View available fields by calling ?metadata. Also, see http://docs.mygene.info/en/latest/doc/query_service.html for complete argument details and syntax.

return.as

"DataFrame" (default), "records" (list), or "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/query_service.html

See Also

queryMany getGene getGenes

Examples

1
2
3
4
5
6
7
8
## return the query result
query("cdk2", size=5)

query("reporter:1000_at")

query("symbol:cdk2", return.as="text")

query(q="cyclin-dependent kinase", fields="uniprot")

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