-
Notifications
You must be signed in to change notification settings - Fork 0
API reference
Wiki ▸ API reference
Root URL for all FNTM API calls is http://fntm-api.princeton.edu.
# GET /organisms
Returns the list of organisms covered by the API. Because FNTM is specific to mouse, response of this endpoint is constant.
Example
$ curl http://fntm-api.princeton.edu/organisms
[
"Mus musculus"
]
# GET /genes
Returns the list of genes covered by the API.
Example
$ curl http://fntm-api.princeton.edu/genes
[
"0610007P14Rik",
"0610008J02Rik",
"0610009B22Rik",
"0610009F21Rik",
"0610009K14Rik",
...
]
# GET /contexts
Returns the list of contexts (i.e. tissues) covered by the API.
Example
$ curl http://fntm-api.princeton.edu/contexts
[
"adipose tissue",
"adrenal gland",
"amygdala",
"anterior olfactory nucleus",
"appendage girdle complex",
...
]
# GET /networks/:context/:gene[+:gene2[...]]
Returns the functional network for the specified context (i.e. tissue) for one or more query genes.
Parameter | Description |
---|---|
context |
Context. See contexts for valid values. |
gene[+gene2[...]] |
One or more query genes. See genes for valid values. |
[prior] |
Prior probability used to compute edge weights (default: 0.1) |
[size] |
Number of genes included in the response in addition to the query genes (default: 50) |
Example
$ curl 'http://fntm-api.princeton.edu/networks/brain/ptgs2+park7?prior=0.15&size=10'
[
"genes": [
{
"gs": false,
"std_name": "Hbegf",
"descrip": "heparin-binding EGF-like growth factor",
"query": false,
"sys_name": "Hbegf",
"id": 15200
},
...
],
"edges": [
{
"source": 0,
"target": 1,
"weight": 0.005727433823214942,
"id": 72520
},
...
]
]
# GET /evidence/:context
Returns datasets (i.e. evidence) supporting a predicted functional relationship between two genes in the specified context (i.e. tissue).
Parameter | Description |
---|---|
context |
Context. See contexts for valid values. |
source |
First gene. See genes for valid values. |
target |
Second gene |
[prior] |
Prior probability used to compute edge weights (default: 0.1) |
Example
$ curl 'http://fntm-api.princeton.edu/evidence/brain?source=ptgs2&target=park7&prior=0.15'
{
"datatypes": [
{
"name": "Phenotype",
"weight": 1.0
}
],
"datasets": [
{
"urltype": "",
"description": "MGI Gene-Phenotype Associations",
"title": "MGI Gene-Phenotype Associations",
"dataset": "mousephenotype",
"posterior": 0.03963939459655308,
"link": "http://www.informatics.jax.org/",
"slug": "mousephenotype"
},
...
]
}
<a name="post-funpred" href="#post-funpred""># POST /funpred/jobs
Starts a new functional prediction job.
Parameter | Description |
---|---|
gene_file |
File containing symbols of positive labels for the predictor |
context |
Context. See contexts for valid values. |
[email] |
Optional email address for receiving results notification |
[title] |
Optional title to identify this task |
Example
Save positive-symbols.txt to local directory, then run:
$ curl http://fntm-api.princeton.edu/funpred/jobs -F gene_file=@positive-symbols.txt \
-F context=brain \
-F email=<email> \
-F title=<title>
{
"context": "brain",
"created": "2016-12-05T15:38:38.586842Z",
"email": "<email>",
"gene_file": "http://fntm-api.princeton.edu/media/funpred/uploads/d46ffd99-b18e-4bb7-bab8-b09b646ccdf5/positive-symbols.txt",
"id": "d46ffd99-b18e-4bb7-bab8-b09b646ccdf5",
"log_file": null,
"result_file": null,
"status": "queued",
"title": "<title>"
}
<a name="get-funpred" href="#get-funpred""># GET /funpred/jobs/:id
Returns the status of an existing functional prediction job. The response includes links to job inputs, prediction log, and prediction results.
Parameter | Description |
---|---|
id |
Functional prediction job id |
Example
$ curl http://fntm-api.princeton.edu/funpred/jobs/d46ffd99-b18e-4bb7-bab8-b09b646ccdf5
{
"context": "brain",
"created": "2016-12-05T15:38:38Z",
"email": "<email>",
"gene_file": "http://fntm-api.princeton.edu/media/funpred/uploads/d46ffd99-b18e-4bb7-bab8-b09b646ccdf5/positive-symbols.txt",
"id": "d46ffd99-b18e-4bb7-bab8-b09b646ccdf5",
"log_file": "http://fntm-api.princeton.edu/media/funpred/results/d46ffd99-b18e-4bb7-bab8-b09b646ccdf5/log.txt",
"result_file": "http://fntm-api.princeton.edu/media/funpred/results/d46ffd99-b18e-4bb7-bab8-b09b646ccdf5/result.txt",
"status": "completed",
"title": "<title>"
}