fRNAdb::API

[ Japanese ]

Table of content




Introduction


fRNAdb API is a web service to use fRNAdb from Web Browser or your program. fRNAdb API provides search and data retrieval services via REST service. This REST service can be access using HTTP GET.


REST Service


If you want to search with the keyword "miRNA", you access the following URL via Web Browser.
http://www.ncrna.org/frnadb/api/search/miRNA
 
You can use more complex query that is combined together with terms, operators, and parentheses (see fRNAdb API Query Syntax). You will receive the following XML response.
<?xml version="1.0" encoding="UTF-8"?>
<result version="3.0" xmlns="http://www.ncrna.org/frnadb/api/XMLSchema/search">
  <query>
    <offset>0</offset>
    <limit>100</limit>
    <query_string>miRNA</query_string>
  </query>
  <count>70110</count>
  <entry_list next="http://www.ncrna.org/frnadb/api/search/miRNA/100,100">
    <entry id="FR000003" link="http://www.ncrna.org/frnadb/api/entry/FR000003" />
       :
    <entry id="FR000608" link="http://www.ncrna.org/frnadb/api/entry/FR000608" />
  </entry_list>
</result>
 
Hit count is found between <count>tag, value is 70,110.
Hit entries are listed between <entry_list>tag. If hit count is more than 100, only first 100 entries are returned. Next 100 entries are returned by next request:
http://www.ncrna.org/frnadb/api/search/miRNA/100,100
 
Respose detailes are described in fRNAdb API Response.

REST service provides the following API. These API response is XML.

URL Description Response
BaseURL/search/query Return hit count and hit entry list (only first 100 entries). Search Response
BaseURL/search/query/offset,limit Return hit count and hit entry list. Entry list range can be requested by offset,limit.
offset=100, limit=100 -> 101-200th entries
Search Response
BaseURL/search/query/count Return only hit count. Search Response
BaseURL/entry/EntryID Return all features of requested entry. Entry Response
BaseURL/entry/EntryID/feature Return only requested feature of requested entry. Entry Response
BaseURL/entry/EntryID/map/info Return genome list. Listed genomes have map feature of requested entry. Genome Response
BaseURL/entry/EntryID/map/genome Return map feature of requested entry for requested genome. Entry Response
BaseURL : http://www.ncrna.org/frnadb/api

Feature details are described in fRNAdb API Entry Feature

For several features, non-XML response can be requested.
Available URL is as following.

URL Format
BaseURL/entry/EntryID/map/genome.gff Sanger Institute GFF
BaseURL/entry/EntryID/map/genome.bed UCSC BED
BaseURL/entry/EntryID/seq.fasta NCBI FASTA

REST Sample


Request URL Sample
Database search http://www.ncrna.org/frnadb/api/search/miRNA
Database search (offset,limit requested) http://www.ncrna.org/frnadb/api/search/miRNA/101,100
Database search (return only hit count) http://www.ncrna.org/frnadb/api/search/miRNA/count
Entry retrieval (all feature) http://www.ncrna.org/frnadb/api/entry/FR000001
Entry retrieval (seq feature) http://www.ncrna.org/frnadb/api/entry/FR000001/seq
Entry retrieval (FASTA formated sequence) http://www.ncrna.org/frnadb/api/entry/FR000001/seq.fasta
Entry retrieval (mapped genome list) http://www.ncrna.org/frnadb/api/entry/FR000120/map/info
Entry retrieval (map feature) http://www.ncrna.org/frnadb/api/entry/FR000120/map/hg18
Entry retrieval (GFF formated map feature) http://www.ncrna.org/frnadb/api/entry/FR000120/map/hg18.gff
Entry retrieval (BED formated map feature) http://www.ncrna.org/frnadb/api/entry/FR000120/map/hg18.bed

fRNAdb API Query Syntax


Query compliant with CQL-1.2 is accepted.
Query is case-insensitive. "mirna and trna" and "MIRNA AND TRNA" are treated as a same query.

fRNAdb API Entry Feature


Feature Contents
seqNucleotide sequence
accGenbank accession
orgOrganism
soSequenceOntology
pmidPubMed reference
xidCrossReference for entry itself (RNAdb, Rfam etc.)
assocCrossReference to entry associated genes (OMIM, KEGG etc.)
mapGenome mapping

fRNAdb API Response