-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·44 lines (38 loc) · 983 Bytes
/
main.py
File metadata and controls
executable file
·44 lines (38 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from hyperunison_public_api import UnisonSDKApi
from hyperunison_public_api import Configuration
try:
import pydevd_pycharm
pydevd_pycharm.settrace('host.docker.internal', port=55147, stdoutToServer=True, stderrToServer=True)
except:
pass
# Init variables
query = 'CDM: ovision/OMOP:5.4\nSELECT:\n - gender\n - race\n - year_of_birth\n\nFROM: [ATLAS1]\n\nLIMIT: 500\n'
api_key = 'HpipYth6ARM7G7ipR9iJJHXw8RY5xeG9EBsFKX2fIQREnNgzj63rdahFuYCMKjWN'
biobank_id = '1'
api = UnisonSDKApi(
Configuration(
host='http://host.docker.internal:8082',
)
)
# Execute Cohort request
response = api.execute_cohort_request(
api_key,
biobank_id,
query
)
print(response)
# Get multi pipeline
response = api.get_multi_pipeline(
api_key=api_key,
id='1'
)
print(response)
# Run custom workflow
api.run_custom_workflow(
api_key=api_key,
pipeline_version_id='0',
parameters=list([]),
project='',
biobanks=list([]),
cohort=''
)