new TargetSearch(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. |
- License:
- Source:
Methods
compoundsForTarget(URI, callback)
The hierarchy classes for the different Compounds that interact with a given Target.
Parameters:
Name | Type | Description |
---|---|---|
URI |
string | The URI for the target of interest. |
callback |
requestCallback | Function that will be called with the result. |
- Source:
Example
var searcher = new TargetSearch("https://beta.openphacts.org/2.1", "appID", "appKey");
var callback=function(success, status, response){
var targetResult = searcher.parseTargetResponse(response);
};
searcher.compoundsForTarget('http://www.conceptwiki.org/concept/b932a1ed-b6c3-4291-a98a-e195668eda49', callback);
fetchTarget(URI, lensopt, callback)
Fetch the target represented by the URI provided.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
URI |
string | The URI for the target of interest. | |
lens |
string |
<optional> |
An optional lens to apply to the result. |
callback |
requestCallback | Function that will be called with the result. |
- Source:
Example
var searcher = new TargetSearch("https://beta.openphacts.org/2.1", "appID", "appKey");
var callback=function(success, status, response){
var targetResult = searcher.parseTargetResponse(response);
};
searcher.fetchTarget('http://www.conceptwiki.org/concept/b932a1ed-b6c3-4291-a98a-e195668eda49', null, callback);
fetchTargetBatch(URIList, lensopt, callback)
Fetch the targets represented by the URIs provided.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
URIList |
string | The URIs for the targets of interest. | |
lens |
string |
<optional> |
An optional lens to apply to the result. |
callback |
requestCallback | Function that will be called with the result. |
- Source:
Example
var searcher = new TargetSearch("https://beta.openphacts.org/2.1", "appID", "appKey");
var callback=function(success, status, response){
var targets = searcher.parseTargetBatchResponse(response);
};
searcher.fetchTargetBatch(['http://www.conceptwiki.org/concept/b932a1ed-b6c3-4291-a98a-e195668eda49', 'http://www.conceptwiki.org/concept/7b21c06f-0343-4fcc-ab0f-a74ffe871ade'], null, callback);
parseChemblBlock(chemblBlock) → {Object}
Parse a block of ChEMBL data for a target
Parameters:
Name | Type | Description |
---|---|---|
chemblBlock |
Object | JSON containing some ChEMBL data for a target |
- Source:
Returns:
Flattened ChEMBL response
- Type
- Object
parseConceptWikiBlock(conceptWikiBlock) → {Object}
Parse a block of concept wiki data for a target
Parameters:
Name | Type | Description |
---|---|---|
conceptWikiBlock |
Object | JSON containing some Concept Wiki data for a target |
- Source:
Returns:
Flattened Concept Wiki response
- Type
- Object
parseDrugbankBlock(drugbankBlock) → {Object}
Parse a block of drugbank data for a target
Parameters:
Name | Type | Description |
---|---|---|
drugbankBlock |
Object | JSON containing some drugbank data for a target |
- Source:
Returns:
Flattened drugbank response
- Type
- Object
parseTargetBatchResponse(response) → {FetchTargetBatchResponse}
Parse the results from TargetSearch#fetchTargetBatch
Parameters:
Name | Type | Description |
---|---|---|
response |
Object | the JSON response from TargetSearch#fetchTargetBatch |
- Source:
Returns:
Containing the flattened response
parseTargetResponse(response) → {FetchTargetResponse}
Parse the results from TargetSearch#fetchTarget
Parameters:
Name | Type | Description |
---|---|---|
response |
Object | the JSON response from TargetSearch#fetchTarget |
- Source:
Returns:
Containing the flattened response
- Type
- FetchTargetResponse
parseUniprotBlock(uniprotBlock) → {Object}
Parse a block of uniprot data for a target
Parameters:
Name | Type | Description |
---|---|---|
uniprotBlock |
Object | JSON containing some Uniprot data for a target |
- Source:
Returns:
Flattened uniprot response
- Type
- Object
targetPharmacology(URI, assayOrganismopt, targetOrganismopt, activityTypeopt, activityValueopt, minActivityValueopt, minExActivityValueopt, maxActivityValueopt, maxExActivityValueopt, activityUnitopt, activityRelationopt, pChemblopt, minpChemblopt, minExpChemblopt, maxpChemblopt, maxExpChemblopt, targetTypeopt, pageopt, pageSizeopt, orderByopt, lensopt, callback)
Fetch pharmacology records for the target represented by the URI provided.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
URI |
string | The URI for the target of interest | ||
assayOrganism |
string |
<optional> |
Filter by assay organism eg Homo Sapiens | |
targetOrganism |
string |
<optional> |
Filter by target organism eg Rattus Norvegicus | |
activityType |
string |
<optional> |
Filter by activity type eg IC50 | |
activityValue |
string |
<optional> |
Return pharmacology records with activity values equal to this number | |
minActivityValue |
string |
<optional> |
Return pharmacology records with activity values greater than or equal to this number | |
minExActivityValue |
string |
<optional> |
Return pharmacology records with activity values greater than this number | |
maxActivityValue |
string |
<optional> |
Return pharmacology records with activity values less than or equal to this number | |
maxExActivityValue |
string |
<optional> |
Return pharmacology records with activity values less than this number | |
activityUnit |
string |
<optional> |
Return pharmacology records which have this activity unit eg nanomolar | |
activityRelation |
string |
<optional> |
Return pharmacology records which have this activity relation eg = | |
pChembl |
string |
<optional> |
Return pharmacology records with pChembl equal to this number | |
minpChembl |
string |
<optional> |
Return pharmacology records with pChembl values greater than or equal to this number | |
minExpChembl |
string |
<optional> |
Return pharmacology records with pChembl values greater than this number | |
maxpChembl |
string |
<optional> |
Return pharmacology records with pChembl values less than or equal to this number | |
maxExpChembl |
string |
<optional> |
Return pharmacology records with pChembl values less than this number | |
targetType |
string |
<optional> |
Filter by one of the available target types. e.g. single_protein | |
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) | |
lens |
string |
<optional> |
Which chemistry lens to apply to the records | |
callback |
requestCallback | Function that will be called with the result |
- Source:
Example
var searcher = new TargetSearch("https://beta.openphacts.org/2.1", "appID", "appKey");
var callback=function(success, status, response){
var pharmacologyResult == searcher.parseTargetPharmacologyResponse(response);
};
searcher.targetPharmacology('http://www.conceptwiki.org/concept/b932a1ed-b6c3-4291-a98a-e195668eda49', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, 20, null, null, callback);
targetPharmacologyCount(URI, assayOrganismopt, targetOrganismopt, activityTypeopt, activityValueopt, minActivityValueopt, minExActivityValueopt, maxActivityValueopt, maxExActivityValueopt, activityUnitopt, activityRelationopt, pChemblopt, minpChemblopt, minExpChemblopt, maxpChemblopt, maxExpChemblopt, targetTypeopt, lensopt, callback)
Fetch a count of the pharmacology records belonging to the target represented by the URI provided.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
URI |
string | The URI for the target of interest | |
assayOrganism |
string |
<optional> |
Filter by assay organism eg Homo Sapiens |
targetOrganism |
string |
<optional> |
Filter by target organism eg Rattus Norvegicus |
activityType |
string |
<optional> |
Filter by activity type eg IC50 |
activityValue |
string |
<optional> |
Return pharmacology records with activity values equal to this number |
minActivityValue |
string |
<optional> |
Return pharmacology records with activity values greater than or equal to this number |
minExActivityValue |
string |
<optional> |
Return pharmacology records with activity values greater than this number |
maxActivityValue |
string |
<optional> |
Return pharmacology records with activity values less than or equal to this number |
maxExActivityValue |
string |
<optional> |
Return pharmacology records with activity values less than this number |
activityUnit |
string |
<optional> |
Return pharmacology records which have this activity unit eg nanomolar |
activityRelation |
string |
<optional> |
Return pharmacology records which have this activity relation eg = |
pChembl |
string |
<optional> |
Return pharmacology records with pChembl equal to this number |
minpChembl |
string |
<optional> |
Return pharmacology records with pChembl values greater than or equal to this number |
minExpChembl |
string |
<optional> |
Return pharmacology records with pChembl values greater than this number |
maxpChembl |
string |
<optional> |
Return pharmacology records with pChembl values less than or equal to this number |
maxExpChembl |
string |
<optional> |
Return pharmacology records with pChembl values less than this number |
targetType |
string |
<optional> |
Filter by one of the available target types. e.g. single_protein |
lens |
string |
<optional> |
Which chemistry lens to apply to the records |
callback |
requestCallback | Function that will be called with the result |
- Source:
Example
var searcher = new TargetSearch("https://beta.openphacts.org/2.1", "appID", "appKey");
var callback=function(success, status, response){
var pharmacologyResult == searcher.parseTargetPharmacologyCountResponse(response);
};
searcher.targetPharmacologyCount('http://www.conceptwiki.org/concept/b932a1ed-b6c3-4291-a98a-e195668eda49', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, callback);
targetTypes(lens, callback)
A list of target types
Parameters:
Name | Type | Description |
---|---|---|
lens |
string | Which chemistry lens to apply to the result |
callback |
requestCallback | Function that will be called with the result |
- Source: