(Redirected from GMOD REST API
In progress.
This effort was started after Josh Goodman’s talk at the January 2009 GMOD Meeting meeting titled “MOD Web API (A RESTful interface for MODs)”. The main idea is to increase interoperability among the various model organism databases by creating an easy to use high level RESTful API. The queries iterated below are currently in the proposal stage and have no been implemented at any MOD.
organisms
Provides a list of organisms that are able to be queried with the service provider.
http://yourmod.org/gmodrpc/v<api version>/organisms[.xml | .json]
XML or JSON
XML
<?xml version="1.0" encoding="UTF-8"?>
<resultset>
<api_version>1.1</api_version>
<data_provider>FlyBase</data_provider>
<data_version>FB2008_10</data_version>
<result>
<organism>
<genus>Drosophila</genus>
<species>melanogaster</species>
<taxonomy_id>7227</taxonomy_id>
</organism>
</result>
<result>
<organism>
<species>Drosophila</species>
<genus>simulans</genus>
<taxonomy_id>7240</taxonomy_id>
</organism>
</result>
</resultset>
{
resultset:{
api_version:1.1,
data_provider:'FlyBase',
data_version:'FB2008_10',
result:[
{
organism:{
genus:'Drosophila',
species:'melanogaster',
taxonomy_id:7227
}
},
{
organism:{
species:'Drosophila',
genus:'simulans',
taxonomy_id:7240
}
}
]
}
}
fulltext
Performs a full text search on records and returns the IDs for matching records.
This service returns features that contain the search term anywhere in the gene record. Results can be restricted to a specific organism by supplying the NCBI taxonomy id.
http://yourmod.org/gmodrpc/v<api version>/fulltext/<search term>[.xml | .json]?[type=<SO term ID>][taxid=<taxid>][genus=<genus>][species=<species>]
XML or JSON
XML
<?xml version="1.0" encoding="UTF-8"?>
<resultset>
<api_version>1.1</api_version>
<data_provider>FlyBase</data_provider>
<data_version>FB2008_10</data_version>
<query_time>2009-01-15 09:03:00</query_time>
<query_url>http://flybase.org/gmodrpc/v1.1/fulltext/cotransfection?type=SO:0000704</query_url>
<result>
<dbxref>
<db>FlyBase</db>
<accession>FBgn0085432</accession>
<url>http://flybase.org/gmodrpc/v1.1/fetch/FBgn0085432</url>
</dbxref>
<date_created>2003-03-08 00:00:00</date_created>
<last_modified>2005-01-15 09:03:00</last_modified>
</result>
<result>
<dbxref>
<db>FlyBase</db>
<accession>FBgn0004364</accession>
<url>http://flybase.org/gmodrpc/v1.1/fetch/FBgn0004364</url>
</dbxref>
<date_created>2005-01-08 00:00:00</date_created>
<last_modified>2009-01-01 00:00:00</last_modified>
</result>
</resultset>
{
resultset:{
api_version:1.1,
data_provider:'FlyBase',
data_version:'FB2008_10',
query_time:'2009-01-15 09:03:00',
query_url:'http://flybase.org/gmodrpc/v1.1/fulltext/cotransfection?type=SO:0000704',
result:[
{
dbxref:{
db:'FlyBase',
accession:'FBgn0085432',
url:'http://flybase.org/gmodrpc/v1.1/fetch/FBgn0085432'
},
date_created:'2003-03-08 00:00:00',
last_modified:'2005-01-15 09:03:00'
},
{
dbxref:{
db:'FlyBase',
accession:'FBgn0004364',
url:'http://flybase.org/gmodrpc/v1.1/fetch/FBgn0004364'
},
date_created:'2005-01-08 00:00:00',
last_modified:'2009-01-01 00:00:00'
}
]
}
}
location
Retrieves a list of features that lie within a specific sequence range.
This service returns features that lie within a specific sequence range. Arguments include the name of the largest assembled unit (i.e. chromosome, scaffold, etc…), location start (fmin), location stop (fmax), and strand. Results can be restricted to a specific organism by supplying the NCBI taxonomy id.
http://yourmod.org/gmodrpc/v<api version>/location/chromosome/<name>[.xml | .json]?[type=<SO term ID>][fmin=<int>][fmax=<int>][strand=(1 | -1)][taxid=<taxid>][genus=<genus>][species=<species>]
XML or JSON
XML
<?xml version="1.0" encoding="UTF-8"?>
<resultset>
<api_version>1.1</api_version>
<data_provider>FlyBase</data_provider>
<data_version>FB2008_10</data_version>
<query_time>2009-01-15 09:03:00</query_time>
<query_url>http://flybase.org/gmodrpc/v1.1/location/chromosome/2L?type=SO:0000704&fmin=12587000&fmax=12629000&taxid=7227</query_url>
<result>
<dbxref>
<db>FlyBase</db>
<accession>FBgn0085424</accession>
<url>http://flybase.org/gmodrpc/v1.1/fetch/FBgn0085424</url>
</dbxref>
<date_created>2003-03-08 00:00:00</date_created>
<last_modified>2005-01-15 09:03:00</last_modified>
</result>
</resultset>
{
resultset:{
api_version:1.1,
data_provider:'FlyBase',
data_version:'FB2008_10',
query_time:'2009-01-15 09:03:00',
query_url:'http://flybase.org/gmodrpc/v1.1/location/chromosome/2L?type=SO:0000704&fmin=12587000&fmax=12629000&taxid=7227',
result:[
{
dbxref:{
db:'FlyBase',
accession:'FBgn0085424',
url:'http://flybase.org/gmodrpc/v1.1/fetch/FBgn0085424'
},
date_created:'2003-03-08 00:00:00',
last_modified:'2005-01-15 09:03:00'
}
]
}
}
ontology
Search for genes that have been annotated with a particular gene ontology ID.
This service returns genes that have been annotated with a particular ontology term. Results can be restricted to a specific organism by supplying the NCBI taxonomy id.
http://yourmod.org/gmodrpc/v<api version>/ontology/gene/<ontology ID>[.xml | .json]?[taxid=<taxid>][genus=<genus>][species=<species>]
XML or JSON
XML
<?xml version="1.0" encoding="UTF-8"?>
<resultset>
<api_version>1.1</api_version>
<data_provider>FlyBase</data_provider>
<data_version>FB2008_10</data_version>
<query_time>2009-01-15 09:03:00</query_time>
<query_url>http://flybase.org/gmodrpc/v1.1/ontology/gene/GO:0005515</query_url>
<result>
<dbxref>
<db>FlyBase</db>
<accession>FBgn0085432</accession>
<url>http://flybase.org/gmodrpc/v1.1/fetch/FBgn0085432</url>
</dbxref>
<date_created>2003-03-08 00:00:00</date_created>
<last_modified>2005-01-15 09:03:00</last_modified>
</result>
<result>
<dbxref>
<db>FlyBase</db>
<accession>FBgn0004364</accession>
<url>http://flybase.org/gmodrpc/v1.1/fetch/FBgn0004364</url>
</dbxref>
<date_created>2005-01-08 00:00:00</date_created>
<last_modified>2009-01-01 00:00:00</last_modified>
</result>
</resultset>
{
resultset:{
api_version:1.1,
data_provider:'FlyBase',
data_version:'FB2008_10',
query_time:'2009-01-15 09:03:00',
query_url:'http://flybase.org/gmodrpc/v1.1/ontology/gene/GO:0005515',
result:[
{
dbxref:{
db:'FlyBase',
accession:'FBgn0085432',
url:'http://flybase.org/gmodrpc/v1.1/fetch/FBgn0085432'
},
date_created:'2003-03-08 00:00:00',
last_modified:'2005-01-15 09:03:00'
},
{
dbxref:{
db:'FlyBase',
accession:'FBgn0004364',
url:'http://flybase.org/gmodrpc/v1.1/fetch/FBgn0004364'
},
date_created:'2005-01-08 00:00:00',
last_modified:'2009-01-01 00:00:00'
}
]
}
}
orthologs/gene
Search for orthologs of the supplied gene ID.
This service returns genes that have been determined by some means to be orthologous to the supplied gene ID. If the supplied gene ID is within the namespace of the web service provider then all known orthologs of that gene are returned. If the supplied gene ID is not within the namespace of the web service provider then it only returns genes for organisms that are offered by the service provider.
For example, for a given gene FlyBase stores orthology calls to other FlyBase genes and non FlyBase genes. Thus, given a FlyBase gene ID you can obtain a list of gene IDs for genes within FlyBase and to other non Drosophila species. In addition, given a non FlyBase gene ID you can obtain a list of FlyBase genes that are orthologous to it.
Results can be restricted to a specific organism by supplying the NCBI taxonomy ID.
http://yourmod.org/gmodrpc/v<api version>/orthologs/gene/<gene ID>[.xml | .json]?[taxid=<taxid>][genus=<genus>][species=<species>]
XML or JSON
XML
<?xml version="1.0" encoding="UTF-8"?>
<resultset>
<api_version>1.1</api_version>
<data_provider>FlyBase</data_provider>
<data_version>FB2008_10</data_version>
<query_time>2009-01-15 09:03:00</query_time>
<query_url>http://flybase.org/gmodrpc/v1.1/orthologs/gene/FBgn0000490</query_url>
<result>
<dbxref>
<db>FlyBase</db>
<accession>FBgn0097591</accession>
<data_provider>FlyBase</data_provider>
<url>http://flybase.org/gmodrpc/v1.1/fetch/FBgn0097591</url>
</dbxref>
</result>
<result>
<dbxref>
<db>ENSEMBL</db>
<accession>ENSBTAP00000004992</accession>
<data_provider>InParanoid</data_provider>
</dbxref>
</result>
</resultset>
{
resultset:{
api_version:1.1,
data_provider:'FlyBase',
data_version:'FB2008_10',
query_time:'2009-01-15 09:03:00',
query_url:'http://flybase.org/gmodrpc/v1.1/orthologs/gene/FBgn0000490',
result:[
{
dbxref:{
db:'FlyBase',
accession:'FBgn0097591',
data_provider:'FlyBase'
url:'http://flybase.org/gmodrpc/v1.1/fetch/FBgn0097591'
}
},
{
dbxref:{
db:'ENSEMBL',
accession:'ENSBTAP00000004992',
data_provider:'InParanoid'
}
}
]
}
}
orthologs/organism
Returns a list of orthologs between an organism and one or more other organisms.
This service returns genes that have been determined by some means to be orthologous between a single organism and one or more other organisms. The organisms are specified by providing taxonomy IDs.
http://yourmod.org/gmodrpc/v<api version>/orthologs/organism[/<taxid>][/genus/<genus>/species/<species>][.xml | .json]?[to_taxid=<taxid>][to_genus=<genus>&to_species=<species>]
XML or JSON
XML
<?xml version="1.0" encoding="UTF-8"?>
<resultset>
<api_version>1.1</api_version>
<data_provider>FlyBase</data_provider>
<data_version>FB2008_10</data_version>
<query_time>2009-01-15 09:03:00</query_time>
<query_url>http://flybase.org/gmodrpc/v1.1/orthologs/organism/genus/Drosophila/species/melanogaster</query_url>
<result>
<dbxref>
<db>FlyBase</db>
<accession>FBgn0000490</accession>
<taxonomy_id>7227</taxonomy_id>
<data_provider>FlyBase</data_provider>
<url>http://flybase.org/gmodrpc/v1.1/fetch/FBgn0000490</url>
</dbxref>
<dbxref>
<db>FlyBase</db>
<accession>FBgn0015673</accession>
<taxonomy_id>7240</taxonomy_id>
<data_provider>FlyBase</data_provider>
<url>http://flybase.org/gmodrpc/v1.1/fetch/FBgn0015673</url>
</dbxref>
<dbxref>
<db>WormBase</db>
<accession>WBGene00006570</accession>
<taxonomy_id>6239</taxonomy_id>
<data_provider>InParanoid</data_provider>
<url>http://wormbase.org/gmodrpc/v1.1/fetch/WBGene00006570</url>
</dbxref>
</result>
...
</resultset>
{
resultset:{
api_version:1.1,
data_provider:'FlyBase',
data_version:'FB2008_10',
query_time:'2009-01-15 09:03:00',
query_url:'http://flybase.org/gmodrpc/v1.1/orthologs/organism/genus/Drosophila/species/melanogaster',
result:[
{
dbxref:[
{
db:'FlyBase',
accession:'FBgn0000490',
taxonomy_id:7227,
data_provider:'FlyBase',
url:'http://flybase.org/gmodrpc/v1.1/fetch/FBgn0000490'
},
{
db:'FlyBase',
accession:'FBgn0015673'
taxonomy_id:7240,
data_provider:'FlyBase',
url:'http://flybase.org/gmodrpc/v1.1/fetch/FBgn0015673'
},
{
db:'WormBase',
accession:'WBGene00006570',
taxonomy_id:6239,
data_provider:'InParanoid',
url:'http://wormbase.org/gmodrpc/v1.1/fetch/WBGene00006570'
}
]
}
]
}
}
fetch/gene
To fetch gene records in the Generic gene page XML format as implemented by Bio GMOD GenericGenePage.
http://yourmod.org/gmodrpc/v<api version>/fetch/gene/<gene ID>
XML
XML
See Bio GMOD GenericGenePage for example XML.
fetch/seq
Returns FASTA sequence for the specified query.
http://yourmod.org/gmodrpc/v<api version>/fetch/seq/<ID>[/<SO term ID of subtype>]
FASTA