Web API
The database has a REST-like Web API interface for accessing from your Web applications. This document shows how to access the database via our Web API.
We have the following Web APIs:
- Search API
- List API
- Probe set API
You can get contents in HTML, JSON, YAML, and so on. (See below)
Search API
Search API is for keyword search and is based on Tokyo Manifesto and TogoWS REST interface.
URL for retrieving a list of hit entries
http://brainstars.org/search/(query+string)[/(offset),(limit)]
output:
If the result has at least one hit entries, a list of entry IDs is returned in text/plain format (each line corresponds to each hit entry). If not, 404 Not found error code is returned. The output format can be changed to JSON, and so on (see below). "offset,limit" can be used to retrieve a part of hit entries. If "offset,limit" is not given, all hits are returned.
URL for retrieving the count of hit entries
http://brainstars.org/search/(query+string)/count
output:
The count of hit entries is returned in text/plain format
samples
- http://brainstars.org/search/receptor
- http://brainstars.org/search/receptor/1,5
- http://brainstars.org/search/receptor/count
List API
List API is for retrieving a list of entries, such as genes in a specific gene category.
http://brainstars.org/(type)[/(category)[/(subcategory)[/...]]]/(offset),(limit)
http://brainstars.org/(type)[/(category)[/(subcategory)[/...]]]/all
http://brainstars.org/(type)[/(category)[/(subcategory)[/...]]]/count
You can specify "type" in the following list:
- "marker": marker gene candidates
- "multistate": multi-state genes
- "onestate": one-state genes
- "ntnh": inferred connections among CNS regions by neurotransmitter/neurohormone
- "genefamily": gene family / categories
Marker gene candidates (marker)
[List of entries]:http://brainstars.org/marker/{high,low}/(region)/(offset),(limit)
[Count of entries]:http://brainstars.org/marker/{high,low}/(region)/count
{high,low}: "high": highly expressed regions, "low": low expressed regions.
(region): CNS region.
Multi-state genes (multistate)
[List of entries]:http://brainstars.org/multistate/{high,up,low,down}/(region)/(offset),(limit)
[Count of entries]:http://brainstars.org/multistate/{high,up,low,down}/(region)/count
{high,up,low,down}: "high": high state regions, "up": up state regions, "low": low state regions, "down": down state regions.
(region): CNS region.
One-state genes (onestate)
[List of entries]:http://brainstars.org/onestate/(offset),(limit)
[Count of entries]:http://brainstars.org/onestate/count
Inferred connections among CNS regions by neurotransmitter/neurohormone (ntnh)
[List of entries]:http://brainstars.org/ntnh/{high,low}/(ligand-region)/(receptor-region)/(offset),(limit)
[Count of entries]:http://brainstars.org/ntnh/{high,low}/(ligand-region)/(receptor-region)/count
{high,low}: "high": high state regions, "up": up state regions.
(ligand-region): Ligand CNS region.
(receptor-region): Receptor CNS region.
gene family / categories (genefamily)
[List of entries]:http://brainstars.org/genefamily/(category)/(keyword)/(offset),(limit)
[Count of entries]:http://brainstars.org/genefamily/(category)/(keyword)/count
(category): gene family / category name(keyword): keyword. If no keyword search required, make this omited or blank.
- "tf": transcription factors
- "transmem": transmembrane genes
- "channel": channel genes
- "gpcr": GPCR genes
- "adhesion": cell adhesion genes
- "excellmat": extracellular matrix genes
- "structural": structural protein genes
- "neurogenesis": neurogenesis related genes
- "hox": homeobox genes
- "nucrcpt": nuclear receptor genes
- "ntnh": neurotransmitter/neurohormone genes
- "axon": axon guidance genes
- "fox": forkhead genes
samples
- http://brainstars.org/marker/low/SCN/all
- http://brainstars.org/multistate/up/SCN/20,10
- http://brainstars.org/onestate/count
- http://brainstars.org/ntnh/high/SCN/ME/all
- http://brainstars.org/genefamily/tf//1,20
- http://brainstars.org/genefamily/tf//count
- http://brainstars.org/genefamily/tf/terminal/all
- http://brainstars.org/genefamily/tf/terminal/count
Entry API
Entry API is for obtaining information (annotation, expressions, links) about each entry
http://brainstars.org/probeset/(id)
samples
- http://brainstars.org/probeset/1450371_at
- http://brainstars.org/probeset/1450371_at?content-type=application/json
Content type
How to designate a content type
You can get information in another format rather than default format (default: text/plain in search/list API; text/html in entry API).
- Using a "content-type" parameter in the query string of the URI.
Example: http://brainstars.org/marker/high/LS?content-type=application/json - Using an "Accept" header of your HTTP request.
Example: curl -H "Accept: application/json" http://brainstars.org/marker/high/LS
Example: wget --header "Accept: application/json" http://brainstars.org/marker/high/LS
Supported content type
- JSON (text/x-json or application/json)
- YAML (text/yaml, text/x-yaml, or application/x-yaml)
- Perl Data::Dumper (text/x-data-dumper)
- Perl Data::Denter (text/x-data-denter)
- Perl Data::Taxi (text/x-data-taxi)
- Perl Storable (application/x-storable)
- Perl FreezeThaw (application/x-freezethaw)
- PHP Serialization (text/x-php-serialization)
Go to the documents page