fRNAdb::API
| [ Japanese ] |
Table of content
- Introduction
- REST Service
- REST Example
- fRNAdb API Query Syntax
- fRNAdb API Entry Feature
- fRNAdb API Response
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/miRNAYou 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,100Respose 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.
- Simple queries
Search entries contain a word "miRNA":
http://www.ncrna.org/frnadb/api/search/miRNA
Search entries contain a phrase "mature miRNA":
http://www.ncrna.org/frnadb/api/search/"mature miRNA" - Booleans (and, or, not)
Search entries contain both of "snoRNA" and "U13":
http://www.ncrna.org/frnadb/api/search/snoRNA and U13
Search entries contain either of "snoRNA" or "U13":
http://www.ncrna.org/frnadb/api/search/snoRNA or U13
Search entries contain "snoRNA" but "U13":
http://www.ncrna.org/frnadb/api/search/snoRNA not U13
Evaluation order can be set with parentheses:
http://www.ncrna.org/frnadb/api/search/(mature and miRNA) or (snoRNA and U13) - Indexes
Qualifiers defined by fRNAdb GUI are usable.
Search entries contain "miRNA" in the description qualifier:
http://www.ncrna.org/frnadb/api/search/desc=miRNA - Relations (all, any)
'desc all "mature miRNA"' is same as '(desc=mature) and (desc=miRNA)'
(Attention: not same as 'desc="mature miRNA"')
http://www.ncrna.org/frnadb/api/search/desc all "mature miRNA"
'desc any "mature miRNA"' is same as '(desc=mature) or (desc=miRNA)'
http://www.ncrna.org/frnadb/api/search/desc any "mature miRNA"
Attention
Above is not true with "ti"(PubMed Title) and "ta"(PubMed Title or Abstract), qualifiers of reference. 'ti all "mature miRNA"' means references contain both of "mature" and "miRNA" in the title. An entry linked to two references; one contains only "mature" in the title and the other contains only "miRNA" in the title is seached with '(ti=mature) and (ti=miRNA)' but 'ti all "mature miRNA"'. - Sequence Length
Search entries which length is between 21 and 23:
http://www.ncrna.org/frnadb/api/search/len="21:23"
Search entries which length is less or equal to 21:
http://www.ncrna.org/frnadb/api/search/len=":21"
Search entries which length is greater or equal to 23:
http://www.ncrna.org/frnadb/api/search/len="23:"
Search entries which length is 21 or 25:
http://www.ncrna.org/frnadb/api/search/len any "21 25" - Sorting (sortby)
Sort the result order by length ascendingly:
http://www.ncrna.org/frnadb/api/search/miRNA sortby len
Sort the result order by length descendingly:
http://www.ncrna.org/frnadb/api/search/miRNA sortby len%2Fsort.descending
fRNAdb API Entry Feature
| Feature | Contents | |
| seq | Nucleotide sequence | |
| acc | Genbank accession | |
| org | Organism | |
| so | SequenceOntology | |
| pmid | PubMed reference | |
| xid | CrossReference for entry itself (RNAdb, Rfam etc.) | |
| assoc | CrossReference to entry associated genes (OMIM, KEGG etc.) | |
| map | Genome mapping | |
fRNAdb API Response
- Search Response
<?xml version="1.0" encoding="UTF-8"?> <result version="3.0" xmlns="http://www.ncrna.org/frnadb/api/XMLSchema/search"> <!-- Requested query --> <query> <offset>0</offset> <limit>100</limit> <query_string>miRNA</query_string> </query> <!-- Hit count --> <count>70110</count> <!-- Hit entry list --> <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> - Entry Response
<?xml version="1.0" encoding="UTF-8"?> <!-- This is nonexistent data. --> <result version="3.0" xmlns="http://www.ncrna.org/frnadb/XMLSchema/entry"> <!-- Requested query --> <query> <feature>all</feature> <entry_num>1</entry_num> <entry_string>FR000000</entry_string> </query> <entry_list> <entry id="FR000000"> <length>22</length> <sequence>CATGCCTTGAGTGTAGGACCGT</sequence> <description>mature micro RNA (miRNA) miR-532-5p or Piwi-interacting RNA (piRNA)</description> <ontology> <sequence_ontology id="SO:0001035" name="piRNA" version="2.3"> <synonym>piwi-associated RNA</synonym> </sequence_ontology> <sequence_ontology id="SO:0000276" name="miRNA" version="2.3"> <synonym>micro RNA</synonym> <synonym>microRNA</synonym> <synonym>micro</synonym> </sequence_ontology> </ontology> <organism> <ncbi_taxonomy id="9913" name="Bos taurus"> <synonym>Bos bovis</synonym> <synonym>Bos primigenius taurus</synonym> <synonym>bovine</synonym> <synonym>cattle</synonym> <synonym>cow</synonym> <synonym>domestic cattle</synonym> <synonym>domestic cow</synonym> </ncbi_taxonomy> <ncbi_taxonomy id="9606" name="Homo sapiens"> <synonym>human</synonym> <synonym>man</synonym> </ncbi_taxonomy> </organism> <accession_list> <ncbi_genbank>DQ708952</ncbi_genbank> <ncbi_genbank>AF499825</ncbi_genbank> </accession_list> <reference> <ncbi_pubmed id="15199136"> <title>Human box H/ACA pseudouridylation guide RNA machinery.</title> <authors>Kiss AM, Jady BE, Bertrand E, Kiss T</authors> <abstract>Pseudouridine, the most abundant modified nucleoside in RNA, is ... </abstract> <issue>Mol Cell Biol, 24(13):5797-807, 2004 Jul</issue> <cited_num>11</cited_num> </ncbi_pubmed> </reference> <!-- Cross Reference for entry itself --> <cross_reference> <link to="RNAdb" id="PIR217600" version="2.0" /> <link to="miRBase" id="MIMAT0003848" version="9.2" /> <link to="miRBase" id="MIMAT0002888" version="9.2" /> <link to="miRBase" id="MIMAT0002889" version="9.2" /> </cross_reference> <!-- Cross Reference to entry associated genes --> <gene_association> <link to="OMIM" id="156240" /> <link to="OMIM" id="606613" /> </gene_association> <!-- snoRNA specific Cross Reference --> <snorna_feature> <host_gene>RPL7A (ribosomal protein L7A)</host_gene> <target_rna>18S rRNA A668</target_rna> <overlapping_gene genome="hg18" type="UCSC Gene" name="uc001ape.1"> <genomebrowser_link>URI</genomebrowser_link> </overlapping_gene> <overlapping_gene genome="hg18" type="UCSC Gene" name="uc001apf.1"> <genomebrowser_link>URI</genomebrowser_link> </overlapping_gene> <overlapping_gene genome="hg18" type="RefSeq Gene" name="BC062342"> <genomebrowser_link>URI</genomebrowser_link> </overlapping_gene> <overlapping_gene genome="dm3" type="FlyBase Gene" name="CG15442-RA"> <genomebrowser_link>URI</genomebrowser_link> </overlapping_gene> </snorna_feature> <!-- mature micro RNA specific Cross Reference --> <mirna_feature> <precursor_mirna> <link to="miRBase" id="MI0003205" version="9.2" /> <link to="miRBase" id="MI0003206" version="9.2" /> <link to="miRBase" id="MI0005061" version="9.2" /> <link to="fRNAdb" id="FR212689" version="3.0" /> <link to="fRNAdb" id="FR336718" version="3.0" /> <link to="fRNAdb" id="FR060646" version="3.0" /> </precursor_mirna> </mirna_feature> <!-- Cross Reference to complementary sequence in fRNAdb --> <complementary_sequence> <link to="fRNAdb" id="FR000000" version="3.0" /> </complementary_sequence> <!-- Cross Reference to similar sequences in fRNAdb --> <highly_similar_sequence> <link to="fRNAdb" id="FR000000" version="3.0" /> <link to="fRNAdb" id="FR000000" version="3.0" /> </highly_similar_sequence> <!-- Genome mapping --> <map> <locus> <genome>hg17</genome> <cytoband>Xp11.23</cytoband> <chromosome>chrX</chromosome> <start>49470809</start> <end>49470830</end> <strand>+</strand> <exon_number>1</exon_number> <exon start="49470809" end="49470830" /> <evidence>BLAT</evidence> <identity>100</identity> <genomebrowser_link>URI</genomebrowser_link> </locus> </map> <!-- Expression data (GEO) --> <expression> <tissue description="S2 cells, AGO2 IP" read_number="2" evidence="varidated"> <ncbi_taxonomy id="7227" name="Drosophila melanogaster"> <synonym>Drosophila melangaster</synonym> <synonym>fruit fly</synonym> </ncbi_taxonomy> <ncbi_pubmed id="16778019"> <title>Characterization of the piRNA complex from rat testes.</title> <authors>Lau NC, Seto AG, Kim J, Kuramochi-Miyagawa S, Nakano T, Bartel DP, Kingston RE</authors> <abstract>Small noncoding RNAs regulate processes essential ... </abstract> <issue>Science, 313(5785):363-7, 2006 Jul, Epub 2006 Jun</issue> <cited_num>25</cited_num> </ncbi_pubmed> <link to="NCBI_GEO" id="GSM280089" /> <method>Illumina-Solexa</method> <experiment description="small RNAs" authors="Czech B, Malone CD, Zhou R, Stark A, ... Hannon GJ, Brennecke J" date="2008-04-30"> <ncbi_taxonomy id="7227" name="Drosophila melanogaster"> <synonym>Drosophila melangaster</synonym> <synonym>fruit fly</synonym> </ncbi_taxonomy> <link to="NCBI_GEO" id="GSE11086" /> </experiment> </tissue> </expression> </entry> </entry_list> </result> - Genome Response
<?xml version="1.0" encoding="UTF-8"?> <result version="3.0" xmlns="http://www.ncrna.org/frnadb/XMLSchema/genome"> <entry_list> <entry id="FR000000"> <genome_list link="http://www.ncrna.org/frnadb/FR000000/map"> <genome name="hg17" link="http://www.ncrna.org/frnadb/FR000000/map/hg17" /> <genome name="hg18" link="http://www.ncrna.org/frnadb/FR000000/map/hg18" /> </genome_list> </entry> </entry_list> </result>