API provides "convert" and "entry" methods. "convert" method provides that does the batch conversion to ID of the form that specifies the input ID list and that extracts the relation with ID of the data base besides ID of a certain database. "entry" method provides collected data IDs, collected databases, update information or the number of link URLs. [ ]element is optional. API samples
http://biodb.jp/convert/id_type/id_type or db_type/entry_id[,entry_id2,...][format]/ [output][count][format]/[offset,limit][format] |
http://biodb.jp/entry/method[format]/[count][format] |
Elements | Arguments | Descriptions |
---|---|---|
id_type,db_type | Refer to the table | |
entry_id | ex(AB210043) | Input data ID(s) that corresponds to "id_type" is specified(max is 100 IDs) |
output | id | Return IDs list. |
url | Return link URLs list. | |
format | .txt | Return as text format. |
.json | Return as json format. | |
count | count | Return the number of results. |
offset,limit | Integer ex(5,10) | Return the range of results. In example, Return the results between 5 to 14.(limit max is 100). |
method | id_type | Return the list of collected data IDs. |
db_type | Return the list of collected databases. | |
update | Return the update information of collected databases. | |
url | Return the hyperlinks number between collected data IDs and databases. |
http://biodb.jp/convert/acc_id/locusview/AB210043.txt |
##query_id,result_id,state,url AB210043,HIX0026954,1,http://www.h-invitational.jp/hinv/spsoup/locus_view?hix_id=HIX0026954 |
http://biodb.jp/convert/acc_id/locusview/AB210043.json |
{ hfs:{ "query":{ "id_type":"acc_id", "id":"AB210043" }, "result":{ "id_type":"hix_id", "db_type":"locusview", "url":["http://www.h-invitational.jp/hinv/spsoup/locus_view?hix_id=HIX0026954"], "id":["HIX0026954"], "state":"1" } } } |
|
|
|
|
Description | API |
---|---|
Return link URL information from Accession Number AB210043 to H-InvDB Locusview.(json format) | http://biodb.jp/convert/acc_id/locusview/AB210043 | Return IDs list of UniProt Accession Number O43278 and P56555 converting into H-Inv Transcript ID (HIT).(text format) | http://biodb.jp/convert/uniprot_id/hit_id/O43278,P56555/id.txt | Return link URLs information from UniProt Accession Number O43278 and P56555 to H-InvDB Transcript View.(text format) | http://biodb.jp/convert/uniprot_id/transcriptview/O43278,P56555/url.txt |
Return first results of link URLs information lists from UniProt Accession Number O43278 and P56555 to H-InvDB Transcript View.(txt format) | http://biodb.jp/convert/uniprot_id/transcriptview/O43278,P56555/url/1,1.txt |
Return list of collected databases(txt) | http://biodb.jp/entry/db_type.txt |
Return list of collected data IDs(txt) | http://biodb.jp/entry/id_type.txt |
Return update information of collected databases(txt) | http://biodb.jp/entry/update.txt |
Return link URLs list between collected databases(txt) | http://biodb.jp/entry/url.txt |
Response |
---|
{hfs:{"query":{"id_type":"acc_id","id":"AB058780"},"result":{"id_type":"hit_id","id":["HIT000001592"]}}} |
perl 5.8.0 |
---|
#!/usr/bin/perl use LWP::UserAgent; ## set URL my $url = "http://biodb.jp/convert/acc_id/hit_id/AB058780"; my $ua = LWP::UserAgent->new(); my $res = $ua->get($url); my $json = $res->content; ## view print "$json\n"; |
java 1.6.0 |
---|
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class Sample { public static void main(String[] args) throws IOException{ //set URL URL url = new URL("http://biodb.jp/convert/acc_id/locusview/AB210043"); HttpURLConnection con = (HttpURLConnection)url.openConnection(); con.setRequestMethod("GET"); con.connect(); BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream())); //view String line; while ((line = reader.readLine())!= null){ System.out.println(line); } reader.close(); con.disconnect(); } } |
ruby 1.6.8 |
---|
#!/usr/bin/ruby require 'net/http' Net::HTTP.version_1_2 ##set host host='biodb.jp' ##set URL path='/convert/acc_id/locusview/AB210043' Net::HTTP.start(host, 80) {|http| response = http.get(path) ##view puts response.body } |
python 2.2.3 |
---|
#!/usr/bin/python import httplib ##set host host = "biodb.jp" ##set URL path = "/convert/acc_id/locusview/AB210043" con = httplib.HTTPConnection(host) con.request('GET', path, body='') response = con.getresponse() ##view print response.read() |