|
API Methods
Please note that the API is currently still under development and is subject to changes.
The following methods are currently available via our XML REST-like API, accessible through HTTP GET requests:
info
rank
rank_genes
related
search
http://www.biograph.be/api/info
Given a concept's ID, get information on this concept.
This methods returns information on a concept, such as synonyms, concept type and a definition, provided by its ID.
Options
- id (required): The ID of the concept (use search to find concept IDs)
- key (required): This function requires an API key, but is not counted as a request (i.e., info requests are unlimited)
Example
-
Provided with the ID for schizophrenia (C0036341), the following example requests available information on this concept.
http://biograph.be/api/info?id=C0036341&key=YOURAPIKEY
<?xml version="1.0" encoding="UTF-8"?>
<concept>
<id>C0036341</id>
<preferred_synonym>Schizophrenia</preferred_synonym>
<type>Disease</type>
<definition>
A major psychotic disorder characterized by abnormalities in the perception or expression of reality.
It affects the cognitive and psychomotor functions. Common clinical signs and symptoms include delusions,
hallucinations, disorganized thinking, and retr
</definition>
<synonyms>
<synonym>Schizophrenia</synonym>
<synonym>Schizophrenias</synonym>
<synonym>Schizophrenia NOS</synonym>
<synonym>Dementia Praecox</synonym>
<synonym>Schizophrenic Disorders</synonym>
<synonym>Disorder, Schizophrenic</synonym>
<synonym>Schizophrenic Disorder</synonym>
<synonym>Disorders, Schizophrenic</synonym>
<synonym>unspecified schizophrenia</synonym>
<synonym>Schizophrenia, unspecified</synonym>
<synonym>Unspecified schizophrenia, unspecified state</synonym>
<synonym>Schizophrenia all types</synonym>
<synonym>SCHIZOPHRENIC DIS</synonym>
<synonym>SCZD</synonym>
<synonym>Schizophrenia NOS-unspec</synonym>
<synonym>Schizophrenia [Disease/Finding]</synonym>
</synonyms>
</concept>
http://www.biograph.be/api/rank
Prioritize target concepts to a source concept.
This method ranks target concepts in the context of a source concept, for example, to rank genes in the context of a disease.
For each of the targets, the response provides the ranking score and ranking statistics of the concepts among all concepts and among all concepts of the target's type.
Information on its directness and a link to an explanation of the ranking are also provided.
Ranked targets are sorted by their ranking score, ordered by their decreasing ranking score.
Options
- key (required): This function requires an API key. Upon calling this method, one request is deducted from your daily quotum.
- source (required): Source concept ID (use search to find concept IDs)
- targets (required): Comma separated list of target concept IDs (use search to find concept IDs)
Example
-
With respect to schizophrenia, the following example ranks the genes DISC1 (a known susceptibility gene for schizophrenia), TPH2 (a known susceptibility gene for major depression) and NDE1 (an unrelated gene):
http://biograph.be/api/rank?source=C0036341&targets=C1425014,C1427080,C1414054&key=YOURAPIKEY
<?xml version="1.0" encoding="UTF-8"?>
<rank targets="C1425014,C1427080,C1414054" source="C0036341">
<concept>
<id>C1414054</id>
<preferred_synonym>DISC1 gene</preferred_synonym>
<ranking_score>0.0239356627454811</ranking_score>
<ranking type="all">
<rank_all>112</rank_all>
<count_all>70995</count_all>
</ranking>
<ranking type="Gene">
<rank_type>87</rank_type>
<count_type>18180</count_type>
</ranking>
<directness>known</directness>
<explanation>http://biograph.be/relation/show/C0036341/C1414054</explanation>
</concept>
<concept>
<id>C1427080</id>
<preferred_synonym>TPH2 gene</preferred_synonym>
<ranking_score>0.000295120757606243</ranking_score>
<ranking type="all">
<rank_all>723</rank_all>
<count_all>70995</count_all>
</ranking>
<ranking type="Gene">
<rank_type>313</rank_type>
<count_type>18180</count_type>
</ranking>
<directness>inferred</directness>
<explanation>http://biograph.be/concept/graph/C0036341/C1427080</explanation>
</concept>
<concept>
<id>C1425014</id>
<preferred_synonym>NDE1 gene</preferred_synonym>
<ranking_score>8.45258372002842e-06</ranking_score>
<ranking type="all">
<rank_all>8521</rank_all>
<count_all>70995</count_all>
</ranking>
<ranking type="Gene">
<rank_type>5054</rank_type>
<count_type>18180</count_type>
</ranking>
<directness>inferred</directness>
<explanation>http://biograph.be/concept/graph/C0036341/C1425014</explanation>
</concept>
</rank>
http://www.biograph.be/api/rank_genes
Prioritize gene target concepts to a source concept.
This method wraps the rank method by first searching the targets as HUGO gene names and converting them to IDs (as in search).
This method then redirects to the rank method with a 302 HTTP response status.
Gene names that are not found in our database are ignored during the redirection since these cannot be ranked.
Options
- key (required): This function requires an API key, but is not counted as a request (i.e., search requests are unlimited). The method to which is redirected to, however, is counted.
- source (required): Source concept ID (use search to find concept IDs)
- targets (required): Comma separated list of HUGO gene names
Example
-
http://biograph.be/api/rank_genes?source=C0036341&targets=DISC1,TPH2,NDE1&key=YOURAPIKEY
redirects to
http://biograph.be/api/rank?source=C0036341&targets=C1414054,C1427080,C1425014&key=YOURAPIKEY
http://www.biograph.be/api/related
Find related concepts to a source concept.
Returns the top (maximum 100) related concepts for a source concept.
Optionally, only concepts of a certain type or concepts that are known to be related or inferred can be returned.
Related concepts are annotated with their ID, ranking score, preferred synonym, type, directness and a link to an explanation of the relation between source and target.
Concepts are ordered by decreasing ranking score, putting the most related concept first.
Options
- directness (optional): Only return known or inferred concepts, which is one of { known, inferred }. By default, both inferred and known genes are returned.
- key (required): This function requires an API key. Upon calling this method, one request is deducted from your daily quotum.
- source (required): The ID of the concept (use search to find concept IDs)
- type (optional): Limit responses to concepts of the type, which is one of { Gene, Disease, Compound, Function, Component, Pathway, Domain, Other }
Example
http://www.biograph.be/api/search
Search for the ID of a concept.
If the requested query matches the preferred synonym of a concept, this ID of the concept as used by BioGraph is returned.
If multiple concept have a preferred synonym that exactly matches the query, all these concepts are returned.
Otherwise, the search engine returns all concepts for which one of its synonyms matches.
If still no concepts have been found, all concepts whose synonyms match the query as a substring are returned.
Returned concepts are sorted by their network importance (in similarity to PageRank).
Search results are limited to the top 10 items.
Options
- key (required): This function requires an API key, but is not counted as a request (i.e., search requests are unlimited)
- type (optional): Limit responses to concepts of the type, which is one of { Gene, Disease, Compound, Function, Component, Pathway, Domain, Other }
- q (required): The query
Hints
-
If you need the ID for a HUGO gene name, search it by appending " gene" to the query, and limit the query to the Gene type, i.e.,
http://biograph.be/api/search?q=TPH2+gene&type=Gene&key=YOURAPIKEY
Example
-
In the following example, we want to determine the ID for schizophrenia.
http://biograph.be/api/search?q=schizophrenia&key=YOURAPIKEY
<?xml version="1.0" encoding="UTF-8"?>
<search>
<concept>
<id>C0036341</id>
<preferred_synonym>Schizophrenia</preferred_synonym>
<type>Disease</type>
<definition>
A major psychotic disorder characterized by abnormalities in the perception or expression of reality.
It affects the cognitive and psychomotor functions. Common clinical signs and symptoms include delusions,
hallucinations, disorganized thinking, and retr
</definition>
<synonyms>
<synonym>Schizophrenia</synonym>
<synonym>Schizophrenias</synonym>
<synonym>Schizophrenia NOS</synonym>
<synonym>Dementia Praecox</synonym>
<synonym>Schizophrenic Disorders</synonym>
<synonym>Disorder, Schizophrenic</synonym>
<synonym>Schizophrenic Disorder</synonym>
<synonym>Disorders, Schizophrenic</synonym>
<synonym>unspecified schizophrenia</synonym>
<synonym>Schizophrenia, unspecified</synonym>
<synonym>Unspecified schizophrenia, unspecified state</synonym>
<synonym>Schizophrenia all types</synonym>
<synonym>SCHIZOPHRENIC DIS</synonym>
<synonym>SCZD</synonym>
<synonym>Schizophrenia NOS-unspec</synonym>
<synonym>Schizophrenia [Disease/Finding]</synonym>
</synonyms>
</concept>
</search>
|