new TissueSearch(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
fetchTissue(URI, lensopt, callback)
Fetch the tissue represented by the URI provided.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
URI |
string | The URI for the tissue 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 TissueSearch("https://beta.openphacts.org/2.1", "appID", "appKey");
var callback=function(success, status, response){
var tissueResult = searcher.parseTissueResponse(response);
};
searcher.fetchTissue('ftp://ftp.nextprot.org/pub/current_release/controlled_vocabularies/caloha.obo#TS-0171', null, callback);
fetchTissueBatch(URIList, lensopt, callback)
Fetch the mutiple tissues represented by the URIs provided.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
URIList |
Array.<string> | A list of URIs for the tissue 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 TissueSearch("https://beta.openphacts.org/2.1", "appID", "appKey");
var callback=function(success, status, response){
var tissueResult = searcher.parseTissueBatchResponse(response);
};
searcher.fetchTissueBatch(['ftp://ftp.nextprot.org/pub/current_release/controlled_vocabularies/caloha.obo#TS-0171', 'ftp://ftp.nextprot.org/pub/current_release/controlled_vocabularies/caloha.obo#TS-0173'], null, callback);
parseTissueBatchResponse(response) → {Array.<FetchTissueResponse>}
Parse the results from TissueSearch#fetchTissueBatch
Parameters:
Name | Type | Description |
---|---|---|
response |
Object | the JSON response from TissueSearch#fetchTissueBatch |
- Source:
Returns:
Containing the flattened response
- Type
- Array.<FetchTissueResponse>
parseTissueResponse(response) → {FetchTissueResponse}
Parse the results from TissueSearch#fetchTissue
Parameters:
Name | Type | Description |
---|---|---|
response |
Object | the JSON response from TissueSearch#fetchTissue |
- Source:
Returns:
Containing the flattened response
- Type
- FetchTissueResponse