FishCODE API

FishCODE has an application programming interface (API) that allows you to obtain data without using a web page's GUI. This API is handy if you need to programmatically access some information but still don't want to download the entire dataset.

Currently we provide an implementation using HTTP, where database information is accessed via HTTP requests. For implementation reasons, similar to websites, some API methods only allow a limited number of returned results per query. If you need access to bulk data, you can download the entire dataset from the download page.

There are several methods available through FishCODE API:

Method API method URL Description
Gene basic information /api?method=genebase&species_id={}&gene_symbol={}
/api?method=genebase&fishcode_id={}
Gene basic information, id mapping, annotation information, examples url:
1. "http://bioinfo.ihb.ac.cn/fishcode/api?method=genebase&gene_symbol=tp53&species_id=7955"
2. "http://bioinfo.ihb.ac.cn/fishcode/api?method=genebase&fishcode_id=986307"
Gene expression/region methratio /api?method=express&SRR_id={},{}...&fishcode_id={},{}...
/api?method=methratio&SRR_id={},{}...&fishcode_id={},{}...
Quickly obtain the expression level or regional methylation rate of a gene under a specified SRR id (id can be obtained in FECO View), examples url:
1. "http://bioinfo.ihb.ac.cn/fishcode/api?method=express&SRR_id=SRR5115715,SRR5115716,SRR5115717&fishcode_id=986307
2. "http://bioinfo.ihb.ac.cn/fishcode/api?method=methratio&SRR_id=SRR12173559,SRR12173560,SRR12173561&fishcode_id=1013938"

Getting started (python)

>>> import requests,json

>>> data_request = requests.get("http://bioinfo.ihb.ac.cn/fishcode/api?method=genebase&gene_symbol=tp53&species_id=7955")

>>> result = json.loads(data_request.text)

...but before you start coding:

1. Please be considerate and wait one second between each call, so that our server won't get overloaded.

2. Although FishCODE understands various identifiers and does its best to disambiguate the input, it is recommended to query the API with a disambiguated identifier (the id assigned by FishCODE, which can be found on the gene detail page) will guarantee a faster server response.

3. The species id here corresponds to the species id assigned by NCBI Taxonomy, In the "Gene expression/region methratio" section, we will not respond to requests with more than 1000 gene ids (ids assigned by FishCODE) and no more than 30 SRR ids