Skip to content

Commit ff7f33e

Browse files
authored
Merge pull request #192 from WengLab-InformaticsResearch/lookup_and_score
Change operation from lookup to lookup_and_score. No change in behavior
2 parents 9783a52 + aba7daf commit ff7f33e

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

cohd/TRAPI14.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ info:
1717
[Athena](http://athena.ohdsi.org) (OMOP vocabularies, search, concept relationships, concept hierarchy)
1818
[Atlas](http://www.ohdsi.org/web/atlas/) (OMOP vocabularies, search, concept relationships, concept hierarchy,
1919
concept sets)
20-
version: 6.3.12
20+
version: 6.3.13
2121
title: COHD TRAPI
2222
contact:
2323
name: Casey Ta
@@ -44,7 +44,7 @@ info:
4444
version: 1.4.0
4545
asyncquery: false
4646
operations:
47-
- lookup
47+
- lookup_and_score
4848
batch_size_limit: 100
4949
rate_limit: 10
5050
externalDocs:

cohd/cohd_trapi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def operate(self):
6868
limit_max_results = 500
6969
json_inf_replacement = 999 # value to replace +/-Infinity with in JSON
7070
supported_query_methods = ['relativeFrequency', 'obsExpRatio', 'chiSquare']
71+
supported_operation = 'lookup_and_score'
7172

7273
# Mapping for which predicate should be used for each COHD analysis method. For now, it's all correlated_with
7374
default_predicate = 'biolink:correlated_with'

cohd/cohd_trapi_14.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CohdTrapi140(CohdTrapi):
3737
edge_types_negative = ['biolink:negatively_correlated_with']
3838
default_negative_predicate = edge_types_negative[0]
3939

40-
tool_version = f'{CohdTrapi._SERVICE_NAME} 6.3.12'
40+
tool_version = f'{CohdTrapi._SERVICE_NAME} 6.3.13'
4141
schema_version = '1.4.2'
4242
biolink_version = bm_version
4343

@@ -155,9 +155,9 @@ def _check_query_input(self):
155155
# Check the workflow. Should be at most a single lookup operation
156156
workflow = self._json_data.get('workflow')
157157
if workflow and type(workflow) is list:
158-
if len(workflow) > 1 or workflow[0]['id'] != 'lookup':
158+
if len(workflow) > 1 or workflow[0]['id'] != CohdTrapi.supported_operation:
159159
self._valid_query = False
160-
msg = 'Unsupported workflow. Only a single "lookup" operation is supported'
160+
msg = f'Unsupported workflow. Only a single "{CohdTrapi.supported_operation}" operation is supported'
161161
self.log(msg, level=logging.WARNING)
162162
response = self._trapi_mini_response(TrapiStatusCode.NO_RESULTS, msg)
163163
self._invalid_query_response = response, 200

0 commit comments

Comments
 (0)