new PathwaySearch(baseURL, appID, appKey)
Parameters:
Name |
Type |
Description |
baseURL |
string
|
URL for the Open PHACTS API |
appID |
string
|
Application ID for the application being used. Created by https://dev.openphacts.org |
appKey |
string
|
Application Key for the application ID. |
- Author:
-
- License:
- Source:
Methods
byCompound(URI, organismopt, lensopt, pageopt, pageSizeopt, orderByopt, callback)
Get a list of pathways in which the given compound is active.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
URI |
string
|
|
|
URI of the compound (e.g.: "http://purl.obolibrary.org/obo/CHEBI_57305") |
organism |
string
|
<optional>
|
|
Restricts to pathways in this organism, if given |
lens |
string
|
<optional>
|
|
The Lens name |
page |
string
|
<optional>
|
1
|
Which page of records to return. |
pageSize |
string
|
<optional>
|
10
|
How many records to return. Set to 'all' to return all records in a single page |
orderBy |
string
|
<optional>
|
|
Order the records by this field eg ?assay_type or DESC(?assay_type) |
callback |
requestCallback
|
|
|
Function that will be called with the result. |
- Source:
byTarget(URI, organismopt, lensopt, pageopt, pageSizeopt, orderByopt, callback)
Get a list of pathways in which the given target is active.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
URI |
string
|
|
|
URI of the target (e.g.: "http://identifiers.org/ncbigene/282478") |
organism |
string
|
<optional>
|
|
Restricts to pathways in this organism, if given |
lens |
string
|
<optional>
|
|
The Lens name |
page |
string
|
<optional>
|
1
|
Which page of records to return. |
pageSize |
string
|
<optional>
|
10
|
How many records to return. Set to 'all' to return all records in a single page |
orderBy |
string
|
<optional>
|
|
Order the records by this field eg ?assay_type or DESC(?assay_type) |
callback |
requestCallback
|
|
|
Function that will be called with the result. |
- Source:
countInteractionsByEntity(URI, organismopt, directionopt, interaction_typeopt, callback)
Give the count of interactions of the given entity (metabolite, gene, protein).
Parameters:
Name |
Type |
Attributes |
Description |
URI |
string
|
|
URI of the compound (e.g.: "http://purl.obolibrary.org/obo/CHEBI_57305") |
organism |
string
|
<optional>
|
Restricts to pathways in this organism, if given |
direction |
string
|
<optional>
|
Only interactions of this direction (values: "up", "down"). |
interaction_type |
string
|
<optional>
|
Only interactions of this type (values: "directed" "undirected"). |
callback |
requestCallback
|
|
Function that will be called with the result. |
- Source:
countPathways(organismopt, lensopt, callback)
Get a count of the pathways
Parameters:
Name |
Type |
Attributes |
Description |
organism |
string
|
<optional>
|
Restricts to pathways in this organism, if given |
lens |
string
|
<optional>
|
The Lens name |
callback |
requestCallback
|
|
Function that will be called with the result. |
- Source:
countPathwaysByCompound(URI, organismopt, lensopt, callback)
Get a count of the list of pathways in which the given compound is active.
Parameters:
Name |
Type |
Attributes |
Description |
URI |
string
|
|
URI of the compound (e.g.: "http://purl.obolibrary.org/obo/CHEBI_57305") |
organism |
string
|
<optional>
|
Restricts to pathways in this organism, if given |
lens |
string
|
<optional>
|
The Lens name |
callback |
requestCallback
|
|
Function that will be called with the result. |
- Source:
countPathwaysByTarget(URI, organismopt, lensopt, callback)
Get a count of the list of pathways in which the given target is active.
Parameters:
Name |
Type |
Attributes |
Description |
URI |
string
|
|
URI of the target (e.g.: "http://identifiers.org/ncbigene/282478") |
organism |
string
|
<optional>
|
Restricts to pathways in this organism, if given |
lens |
string
|
<optional>
|
The Lens name |
callback |
requestCallback
|
|
Function that will be called with the result. |
- Source:
getCompounds(URI, lensopt, callback)
Get a list of compounds that are part of the pathway specified
Parameters:
Name |
Type |
Attributes |
Description |
URI |
string
|
|
URI of the pathway (e.g.: "http://identifiers.org/wikipathways/WP1008") |
lens |
string
|
<optional>
|
The Lens name |
callback |
requestCallback
|
|
Function that will be called with the result. |
- Source:
Example
var searcher = new PathwaySearch("https://beta.openphacts.org/1.5", "appID", "appKey");
var callback=function(success, status, response){
var compounds = searcher.parseGetCompoundsResponse(response);
};
searcher.getCompounds('http://identifiers.org/wikipathways/WP1008', null, callback);
getInteractions(URI, callback)
Give a list of interactions for the given pathway.
Parameters:
Name |
Type |
Description |
URI |
string
|
URI of the pathway (e.g.: "http://identifiers.org/wikipathways/WP1015") |
callback |
requestCallback
|
Function that will be called with the result. |
- Source:
getInteractionsByEntity(URI, organismopt, directionopt, interaction_typeopt, pageopt, pageSizeopt, orderByopt, callback)
Get a list of interactions of the given entity (metabolite, gene, protein).
Parameters:
Name |
Type |
Attributes |
Default |
Description |
URI |
string
|
|
|
URI of the compound (e.g.: "http://purl.obolibrary.org/obo/CHEBI_57305") |
organism |
string
|
<optional>
|
|
Restricts to pathways in this organism, if given |
direction |
string
|
<optional>
|
|
Only interactions of this direction (values: "up", "down"). |
interaction_type |
string
|
<optional>
|
|
Only interactions of this type (values: "directed" "undirected"). |
page |
string
|
<optional>
|
1
|
Which page of records to return. |
pageSize |
string
|
<optional>
|
10
|
How many records to return. Set to 'all' to return all records in a single page |
orderBy |
string
|
<optional>
|
|
Order the records by this field eg ?assay_type or DESC(?assay_type) |
callback |
requestCallback
|
|
|
Function that will be called with the result. |
- Source:
getTargets(URI, lensopt, callback)
Get a list of targets that are part of the pathway specified
Parameters:
Name |
Type |
Attributes |
Description |
URI |
string
|
|
URI of the pathway (e.g.: "http://identifiers.org/wikipathways/WP1008") |
lens |
string
|
<optional>
|
The Lens name |
callback |
requestCallback
|
|
Function that will be called with the result. |
- Source:
Example
var searcher = new PathwaySearch("https://beta.openphacts.org/2.1", "appID", "appKey");
var callback=function(success, status, response){
var targets = searcher.parseGetTargetsResponse(response);
};
searcher.getTargets('http://identifiers.org/wikipathways/WP1008', null, callback);
list(organismopt, lensopt, pageopt, pageSizeopt, orderByopt, callback)
Get the pathways
Parameters:
Name |
Type |
Attributes |
Default |
Description |
organism |
string
|
<optional>
|
|
Restricts to pathways in this organism, if given |
lens |
string
|
<optional>
|
|
The Lens name |
page |
string
|
<optional>
|
1
|
Which page of records to return. |
pageSize |
string
|
<optional>
|
10
|
How many records to return. Set to 'all' to return all records in a single page |
orderBy |
string
|
<optional>
|
|
Order the records by this field eg ?assay_type or DESC(?assay_type) |
callback |
requestCallback
|
|
|
Function that will be called with the result. |
- Source:
organisms(lensopt, pageopt, pageSizeopt, orderByopt, callback)
Get the organisms
Parameters:
Name |
Type |
Attributes |
Default |
Description |
lens |
string
|
<optional>
|
|
The Lens name |
page |
string
|
<optional>
|
1
|
Which page of records to return. |
pageSize |
string
|
<optional>
|
10
|
How many records to return. Set to 'all' to return all records in a single page |
orderBy |
string
|
<optional>
|
|
Order the records by this field eg ?assay_type or DESC(?assay_type) |
callback |
requestCallback
|
|
|
Function that will be called with the result. |
- Source: