Skip to content

API reference

amr4 edited this page Dec 5, 2016 · 7 revisions

WikiAPI reference

API root

Root URL for all FNTM API calls is http://fntm-api.princeton.edu.

Endpoints

Basic resources

Functional networks

Functional predictions


# 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"
        },
        ...
    ]
}

Clone this wiki locally