pyxetabase 3.1.0.dev2__tar.gz → 4.0.0.dev30__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyxetabase might be problematic. Click here for more details.
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/PKG-INFO +1 -1
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/commons.py +6 -6
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/opencga_config.py +59 -8
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/_parent_rest_clients.py +47 -13
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/admin_client.py +1 -2
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/cohort_client.py +11 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/file_client.py +1 -1
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/meta_client.py +4 -3
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/study_client.py +28 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/variant_operation_client.py +26 -27
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase.egg-info/PKG-INFO +1 -1
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/setup.py +1 -1
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/LICENSE +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/README.rst +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/__init__.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/exceptions.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/opencga_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/__init__.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/alignment_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/clinical_analysis_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/cvdb_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/disease_panel_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/family_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/federation_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/ga4gh_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/individual_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/job_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/organization_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/project_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/sample_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/user_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/variant_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/workflow_client.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_response.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/retry.py +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase.egg-info/SOURCES.txt +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase.egg-info/dependency_links.txt +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase.egg-info/requires.txt +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase.egg-info/top_level.txt +0 -0
- {pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/setup.cfg +0 -0
|
@@ -145,22 +145,22 @@ def _fetch(config, sid, category, resource, method, subcategory=None, query_id=N
|
|
|
145
145
|
# Getting REST response
|
|
146
146
|
if method == 'get':
|
|
147
147
|
try:
|
|
148
|
-
r = requests.get(url, headers=header, cookies=config.cookies)
|
|
148
|
+
r = requests.get(url, headers=header, cookies=config.cookies, verify=not config.tlsAllowInvalidCertificates)
|
|
149
149
|
except requests.exceptions.ConnectionError:
|
|
150
150
|
sleep(1)
|
|
151
|
-
r = requests.get(url, headers=header, cookies=config.cookies)
|
|
151
|
+
r = requests.get(url, headers=header, cookies=config.cookies, verify=not config.tlsAllowInvalidCertificates)
|
|
152
152
|
elif method == 'post':
|
|
153
153
|
try:
|
|
154
|
-
r = requests.post(url, json=data, headers=header, cookies=config.cookies)
|
|
154
|
+
r = requests.post(url, json=data, headers=header, cookies=config.cookies, verify=not config.tlsAllowInvalidCertificates)
|
|
155
155
|
except requests.exceptions.ConnectionError:
|
|
156
156
|
sleep(1)
|
|
157
|
-
r = requests.post(url, json=data, headers=header, cookies=config.cookies)
|
|
157
|
+
r = requests.post(url, json=data, headers=header, cookies=config.cookies, verify=not config.tlsAllowInvalidCertificates)
|
|
158
158
|
elif method == 'delete':
|
|
159
159
|
try:
|
|
160
|
-
r = requests.delete(url, headers=header, cookies=config.cookies)
|
|
160
|
+
r = requests.delete(url, headers=header, cookies=config.cookies, verify=not config.tlsAllowInvalidCertificates)
|
|
161
161
|
except requests.exceptions.ConnectionError:
|
|
162
162
|
sleep(1)
|
|
163
|
-
r = requests.delete(url, headers=header, cookies=config.cookies)
|
|
163
|
+
r = requests.delete(url, headers=header, cookies=config.cookies, verify=not config.tlsAllowInvalidCertificates)
|
|
164
164
|
else:
|
|
165
165
|
raise NotImplementedError('method: ' + method + ' not implemented.')
|
|
166
166
|
|
|
@@ -37,12 +37,21 @@ class ClientConfiguration(object):
|
|
|
37
37
|
return config_dict
|
|
38
38
|
|
|
39
39
|
def get_sso_login_info(self):
|
|
40
|
+
# Checking if SSO login is specified
|
|
40
41
|
if (('sso_login' in self._config and self._config['sso_login']) or
|
|
41
42
|
('cookies' in self._config and self._config['cookies'])):
|
|
42
|
-
|
|
43
|
+
|
|
44
|
+
# Getting session file name
|
|
45
|
+
if 'name' in self._config['rest'] and self._config['rest']['name']:
|
|
46
|
+
host_name = self._config['rest']['name']
|
|
47
|
+
else:
|
|
48
|
+
host_name = 'opencga'
|
|
49
|
+
python_session_fhand = open(os.path.expanduser("~/.opencga/{}_session.json".format(host_name)), 'r')
|
|
50
|
+
|
|
51
|
+
# Loading info from session file
|
|
43
52
|
session_info = json.loads(python_session_fhand.read())
|
|
44
53
|
self._config['sso_login'] = True
|
|
45
|
-
self._config['cookies'] = session_info['cookies']
|
|
54
|
+
self._config['cookies'] = session_info['attributes']['cookies']
|
|
46
55
|
self._config['token'] = session_info['token']
|
|
47
56
|
|
|
48
57
|
def _validate_configuration(self):
|
|
@@ -55,16 +64,46 @@ class ClientConfiguration(object):
|
|
|
55
64
|
if 'host' not in self._config['rest'] or not self._config['rest']['host']:
|
|
56
65
|
raise ValueError('Missing configuration field "host".')
|
|
57
66
|
|
|
58
|
-
self._validate_host(
|
|
67
|
+
self._validate_host()
|
|
59
68
|
|
|
60
|
-
|
|
61
|
-
def _validate_host(host):
|
|
69
|
+
def _validate_host(self):
|
|
62
70
|
try:
|
|
63
|
-
r = requests.head(host, timeout=2)
|
|
71
|
+
r = requests.head(self.host, timeout=2, verify=not self.tlsAllowInvalidCertificates)
|
|
64
72
|
if r.status_code == 302:
|
|
65
73
|
return
|
|
74
|
+
except requests.exceptions.SSLError:
|
|
75
|
+
raise Exception('Invalid SSL certificate from "{}"'.format(self.host))
|
|
66
76
|
except requests.ConnectionError:
|
|
67
|
-
raise Exception('Unreachable host "{}"'.format(host))
|
|
77
|
+
raise Exception('Unreachable host "{}"'.format(self.host))
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def host(self):
|
|
81
|
+
return self._config['rest']['host']
|
|
82
|
+
|
|
83
|
+
@host.setter
|
|
84
|
+
def host(self, new_host):
|
|
85
|
+
self._config['rest']['host'] = new_host
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def tlsAllowInvalidCertificates(self):
|
|
89
|
+
if ('tlsAllowInvalidCertificates' in self._config['rest']
|
|
90
|
+
and self._config['rest']['tlsAllowInvalidCertificates'] is not None):
|
|
91
|
+
return self._config['rest']['tlsAllowInvalidCertificates']
|
|
92
|
+
else:
|
|
93
|
+
return False
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def version(self):
|
|
97
|
+
return self._config['version'] if 'version' in self._config else 'v2'
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def cookies(self):
|
|
101
|
+
if 'cookies' in self._config and self._config['cookies']:
|
|
102
|
+
python_session_fhand = open(os.path.expanduser("~/.opencga/python_session.json"), 'r')
|
|
103
|
+
session_info = json.loads(python_session_fhand.read())
|
|
104
|
+
return session_info['cookies']
|
|
105
|
+
else:
|
|
106
|
+
return None
|
|
68
107
|
|
|
69
108
|
@property
|
|
70
109
|
def configuration(self):
|
|
@@ -77,7 +116,19 @@ class ClientConfiguration(object):
|
|
|
77
116
|
@host.setter
|
|
78
117
|
def host(self, host):
|
|
79
118
|
self._config['rest']['host'] = host
|
|
80
|
-
self._validate_host(
|
|
119
|
+
self._validate_host()
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def tlsAllowInvalidCertificates(self):
|
|
123
|
+
if ('tlsAllowInvalidCertificates' in self._config['rest'] and
|
|
124
|
+
self._config['rest']['tlsAllowInvalidCertificates'] is not None):
|
|
125
|
+
return self._config['rest']['tlsAllowInvalidCertificates']
|
|
126
|
+
else:
|
|
127
|
+
return False
|
|
128
|
+
|
|
129
|
+
@tlsAllowInvalidCertificates.setter
|
|
130
|
+
def tlsAllowInvalidCertificates(self, tlsAllowInvalidCertificates):
|
|
131
|
+
self._config['rest']['tlsAllowInvalidCertificates'] = tlsAllowInvalidCertificates
|
|
81
132
|
|
|
82
133
|
@property
|
|
83
134
|
def version(self):
|
{pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/_parent_rest_clients.py
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import os
|
|
2
|
+
import requests
|
|
2
3
|
|
|
3
|
-
from pyxetabase.commons import execute
|
|
4
|
+
from pyxetabase.commons import execute, _create_rest_url, snake_to_camel_case
|
|
4
5
|
from pyxetabase.rest_response import RestResponse
|
|
5
6
|
from pyxetabase.retry import retry
|
|
6
7
|
|
|
@@ -87,18 +88,23 @@ class _ParentRestClient(object):
|
|
|
87
88
|
def _post(self, category, resource, data=None, query_id=None, subcategory=None,
|
|
88
89
|
second_query_id=None, **options):
|
|
89
90
|
"""Queries the REST service and returns the result"""
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
data=data, **options
|
|
95
|
-
)
|
|
91
|
+
# Special treatment for the "/{apiVersion}/files/upload" endpoint
|
|
92
|
+
if category == 'files' and resource == 'upload':
|
|
93
|
+
response = self._upload(category=category, resource=resource, **options)
|
|
94
|
+
return RestResponse(response)
|
|
96
95
|
else:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
if data is not None:
|
|
97
|
+
return self._rest_retry(
|
|
98
|
+
method='post', category=category, resource=resource, query_id=query_id,
|
|
99
|
+
subcategory=subcategory, second_query_id=second_query_id,
|
|
100
|
+
data=data, **options
|
|
101
|
+
)
|
|
102
|
+
else:
|
|
103
|
+
return self._rest_retry(
|
|
104
|
+
method='post', category=category, resource=resource, query_id=query_id,
|
|
105
|
+
subcategory=subcategory, second_query_id=second_query_id,
|
|
106
|
+
**options
|
|
107
|
+
)
|
|
102
108
|
|
|
103
109
|
def _delete(self, category, resource, query_id=None, subcategory=None,
|
|
104
110
|
second_query_id=None, **options):
|
|
@@ -108,3 +114,31 @@ class _ParentRestClient(object):
|
|
|
108
114
|
subcategory=subcategory, second_query_id=second_query_id,
|
|
109
115
|
**options
|
|
110
116
|
)
|
|
117
|
+
|
|
118
|
+
def _upload(self, category, resource, **options):
|
|
119
|
+
"""Upload files"""
|
|
120
|
+
|
|
121
|
+
# Checking that the parameter file contains the file path to upload
|
|
122
|
+
if 'file' not in options or not isinstance(options['file'], str):
|
|
123
|
+
raise ValueError('To upload a file, please specify the file path as the "file" parameter.')
|
|
124
|
+
|
|
125
|
+
# Creating URL and headers
|
|
126
|
+
url, header = _create_rest_url(host=self._cfg.host, version=self._cfg.version, sid=self.token,
|
|
127
|
+
category=category, resource=resource, options=options)
|
|
128
|
+
|
|
129
|
+
# Creating data
|
|
130
|
+
data = {}
|
|
131
|
+
for k, v in options.items():
|
|
132
|
+
if k == 'file': # Param "file" is not included in data
|
|
133
|
+
continue
|
|
134
|
+
data[snake_to_camel_case(k)] = v
|
|
135
|
+
|
|
136
|
+
# Uploading
|
|
137
|
+
fpath = os.path.realpath(os.path.expanduser(options['file']))
|
|
138
|
+
with open(fpath, "rb") as f:
|
|
139
|
+
fhand = {"file": (fpath, f, "application/octet-stream")}
|
|
140
|
+
response = requests.post(url, headers=header, files=fhand, data=data or None)
|
|
141
|
+
if response.status_code != 200:
|
|
142
|
+
raise Exception(response.content)
|
|
143
|
+
|
|
144
|
+
return response.json()
|
|
@@ -147,8 +147,7 @@ class Admin(_ParentRestClient):
|
|
|
147
147
|
|
|
148
148
|
def sync_users(self, data=None, **options):
|
|
149
149
|
"""
|
|
150
|
-
|
|
151
|
-
group in a study from catalog.
|
|
150
|
+
[DEPRECATED] Moved to /users/sync.
|
|
152
151
|
PATH: /{apiVersion}/admin/users/sync
|
|
153
152
|
|
|
154
153
|
:param dict data: JSON containing the parameters. (REQUIRED)
|
|
@@ -61,6 +61,9 @@ class Cohort(_ParentRestClient):
|
|
|
61
61
|
:param str status: status.
|
|
62
62
|
:param str internal_status: internalStatus.
|
|
63
63
|
:param str annotation: Cohort annotation.
|
|
64
|
+
:param str tags: Tags. Also admits basic regular expressions using the
|
|
65
|
+
operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
|
|
66
|
+
sensitive, '~/value/i' for case insensitive search.
|
|
64
67
|
:param str acl: acl.
|
|
65
68
|
:param str samples: Cohort sample IDs.
|
|
66
69
|
:param str num_samples: Number of samples.
|
|
@@ -137,6 +140,9 @@ class Cohort(_ParentRestClient):
|
|
|
137
140
|
:param str uuid: Comma separated list of cohort IDs up to a maximum of
|
|
138
141
|
100.
|
|
139
142
|
:param str type: Cohort type.
|
|
143
|
+
:param str tags: Tags. Also admits basic regular expressions using the
|
|
144
|
+
operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
|
|
145
|
+
sensitive, '~/value/i' for case insensitive search.
|
|
140
146
|
:param str creation_date: creationDate.
|
|
141
147
|
:param str modification_date: modificationDate.
|
|
142
148
|
:param bool deleted: deleted.
|
|
@@ -223,6 +229,9 @@ class Cohort(_ParentRestClient):
|
|
|
223
229
|
:param str uuid: Comma separated list of cohort IDs up to a maximum of
|
|
224
230
|
100.
|
|
225
231
|
:param str type: Cohort type.
|
|
232
|
+
:param str tags: Tags. Also admits basic regular expressions using the
|
|
233
|
+
operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
|
|
234
|
+
sensitive, '~/value/i' for case insensitive search.
|
|
226
235
|
:param str creation_date: creationDate.
|
|
227
236
|
:param str modification_date: modificationDate.
|
|
228
237
|
:param bool deleted: deleted.
|
|
@@ -303,6 +312,8 @@ class Cohort(_ParentRestClient):
|
|
|
303
312
|
:param str annotation_sets_action: Action to be performed if the array
|
|
304
313
|
of annotationSets is being updated. Allowed values: ['ADD SET
|
|
305
314
|
REMOVE']
|
|
315
|
+
:param str tags_action: Action to be performed if the array of tags is
|
|
316
|
+
being updated. Allowed values: ['ADD SET REMOVE']
|
|
306
317
|
:param bool include_result: Flag indicating to include the created or
|
|
307
318
|
updated document result in the response.
|
|
308
319
|
:param dict data: body.
|
|
@@ -420,7 +420,7 @@ class File(_ParentRestClient):
|
|
|
420
420
|
MICROARRAY_EXPRESSION_TWOCHANNELS_GENEPIX DATAMATRIX_EXPRESSION
|
|
421
421
|
IDLIST IDLIST_RANKED ANNOTATION_GENEVSANNOTATION OTHER_NEWICK
|
|
422
422
|
OTHER_BLAST OTHER_INTERACTION OTHER_GENOTYPE OTHER_PLINK OTHER_VCF
|
|
423
|
-
OTHER_PED VCF4 VARIANT ALIGNMENT COVERAGE SEQUENCE PEDIGREE
|
|
423
|
+
OTHER_PED VCF4 CVDB VARIANT ALIGNMENT COVERAGE SEQUENCE PEDIGREE
|
|
424
424
|
REFERENCE_GENOME NONE UNKNOWN']
|
|
425
425
|
:param str checksum: Expected MD5 file checksum.
|
|
426
426
|
:param bool resource: Boolean field indicating whether the file is a
|
|
@@ -55,15 +55,16 @@ class Meta(_ParentRestClient):
|
|
|
55
55
|
|
|
56
56
|
return self._get(category='meta', resource='model', **options)
|
|
57
57
|
|
|
58
|
-
def openapi(self, **options):
|
|
58
|
+
def openapi(self, url, **options):
|
|
59
59
|
"""
|
|
60
60
|
Opencga openapi json.
|
|
61
61
|
PATH: /{apiVersion}/meta/openapi
|
|
62
62
|
|
|
63
|
-
:param str
|
|
64
|
-
:param str
|
|
63
|
+
:param str url: Opencga host with environment. (REQUIRED)
|
|
64
|
+
:param str study: Opencga study to be default in queries.
|
|
65
65
|
"""
|
|
66
66
|
|
|
67
|
+
options['url'] = url
|
|
67
68
|
return self._get(category='meta', resource='openapi', **options)
|
|
68
69
|
|
|
69
70
|
def ping(self, **options):
|
|
@@ -166,6 +166,19 @@ class Study(_ParentRestClient):
|
|
|
166
166
|
|
|
167
167
|
return self._get(category='studies', resource='groups', query_id=study, **options)
|
|
168
168
|
|
|
169
|
+
def sync_groups(self, study, data=None, **options):
|
|
170
|
+
"""
|
|
171
|
+
Associate a remote group from an authentication origin with a local
|
|
172
|
+
group in a study.
|
|
173
|
+
PATH: /{apiVersion}/studies/{study}/groups/sync
|
|
174
|
+
|
|
175
|
+
:param dict data: JSON containing the parameters. (REQUIRED)
|
|
176
|
+
:param str study: Study [[organization@]project:]study where study and
|
|
177
|
+
project can be either the ID or UUID. (REQUIRED)
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
return self._post(category='studies', resource='sync', query_id=study, subcategory='groups', data=data, **options)
|
|
181
|
+
|
|
169
182
|
def update_groups(self, study, data=None, **options):
|
|
170
183
|
"""
|
|
171
184
|
Add or remove a group.
|
|
@@ -386,6 +399,21 @@ class Study(_ParentRestClient):
|
|
|
386
399
|
|
|
387
400
|
return self._post(category='studies', resource='update', query_id=study, data=data, **options)
|
|
388
401
|
|
|
402
|
+
def sync_users(self, study, authentication_origin_id, **options):
|
|
403
|
+
"""
|
|
404
|
+
Synchronize all users from the remote groups of a given authentication
|
|
405
|
+
origin.
|
|
406
|
+
PATH: /{apiVersion}/studies/{study}/users/sync
|
|
407
|
+
|
|
408
|
+
:param str authentication_origin_id: Authentication origin ID.
|
|
409
|
+
(REQUIRED)
|
|
410
|
+
:param str study: Study [[organization@]project:]study where study and
|
|
411
|
+
project can be either the ID or UUID. (REQUIRED)
|
|
412
|
+
"""
|
|
413
|
+
|
|
414
|
+
options['authenticationOriginId'] = authentication_origin_id
|
|
415
|
+
return self._post(category='studies', resource='sync', query_id=study, subcategory='users', **options)
|
|
416
|
+
|
|
389
417
|
def variable_sets(self, study, **options):
|
|
390
418
|
"""
|
|
391
419
|
Fetch variableSets from a study.
|
{pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/variant_operation_client.py
RENAMED
|
@@ -86,6 +86,32 @@ class VariantOperation(_ParentRestClient):
|
|
|
86
86
|
|
|
87
87
|
return self._delete(category='operation', resource='delete', subcategory='variant/annotation', **options)
|
|
88
88
|
|
|
89
|
+
def variant_annotation_extension_configure(self, data=None, **options):
|
|
90
|
+
"""
|
|
91
|
+
Install a variant annotation extension and configure the project to
|
|
92
|
+
use it.
|
|
93
|
+
PATH: /{apiVersion}/operation/variant/annotation/extension/configure
|
|
94
|
+
|
|
95
|
+
:param str job_id: Job ID. It must be a unique string within the
|
|
96
|
+
study. An ID will be autogenerated automatically if not provided.
|
|
97
|
+
:param str job_description: Job description.
|
|
98
|
+
:param str job_depends_on: Comma separated list of existing job IDs
|
|
99
|
+
the job will depend on.
|
|
100
|
+
:param str job_tags: Job tags.
|
|
101
|
+
:param str job_scheduled_start_time: Time when the job is scheduled to
|
|
102
|
+
start.
|
|
103
|
+
:param str job_priority: Priority of the job.
|
|
104
|
+
:param bool job_dry_run: Flag indicating that the job will be executed
|
|
105
|
+
in dry-run mode. In this mode, OpenCGA will validate that all
|
|
106
|
+
parameters and prerequisites are correctly set for successful
|
|
107
|
+
execution, but the job will not actually run.
|
|
108
|
+
:param str project: project.
|
|
109
|
+
:param dict data: Parameters to configure a variant annotation
|
|
110
|
+
extension.
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
return self._post(category='operation', resource='configure', subcategory='variant/annotation/extension', data=data, **options)
|
|
114
|
+
|
|
89
115
|
def index_variant_annotation(self, data=None, **options):
|
|
90
116
|
"""
|
|
91
117
|
Create and load variant annotations into the database.
|
|
@@ -601,33 +627,6 @@ class VariantOperation(_ParentRestClient):
|
|
|
601
627
|
|
|
602
628
|
return self._post(category='operation', resource='secondaryIndex', subcategory='variant', data=data, **options)
|
|
603
629
|
|
|
604
|
-
def delete_variant_secondary_index(self, **options):
|
|
605
|
-
"""
|
|
606
|
-
Remove a secondary index from the search engine for a specific set of
|
|
607
|
-
samples.
|
|
608
|
-
PATH: /{apiVersion}/operation/variant/secondaryIndex/delete
|
|
609
|
-
|
|
610
|
-
:param str job_id: Job ID. It must be a unique string within the
|
|
611
|
-
study. An ID will be autogenerated automatically if not provided.
|
|
612
|
-
:param str job_description: Job description.
|
|
613
|
-
:param str job_depends_on: Comma separated list of existing job IDs
|
|
614
|
-
the job will depend on.
|
|
615
|
-
:param str job_tags: Job tags.
|
|
616
|
-
:param str job_scheduled_start_time: Time when the job is scheduled to
|
|
617
|
-
start.
|
|
618
|
-
:param str job_priority: Priority of the job.
|
|
619
|
-
:param bool job_dry_run: Flag indicating that the job will be executed
|
|
620
|
-
in dry-run mode. In this mode, OpenCGA will validate that all
|
|
621
|
-
parameters and prerequisites are correctly set for successful
|
|
622
|
-
execution, but the job will not actually run.
|
|
623
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
624
|
-
project can be either the ID or UUID.
|
|
625
|
-
:param str samples: Samples to remove. Needs to provide all the
|
|
626
|
-
samples in the secondary index.
|
|
627
|
-
"""
|
|
628
|
-
|
|
629
|
-
return self._delete(category='operation', resource='delete', subcategory='variant/secondaryIndex', **options)
|
|
630
|
-
|
|
631
630
|
def setup_variant(self, data=None, **options):
|
|
632
631
|
"""
|
|
633
632
|
Execute Variant Setup to allow using the variant engine. This setup is
|
|
@@ -14,7 +14,7 @@ with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
|
|
|
14
14
|
|
|
15
15
|
setup(
|
|
16
16
|
name='pyxetabase',
|
|
17
|
-
version='
|
|
17
|
+
version='4.0.0.dev30',
|
|
18
18
|
description='A REST client for OpenCGA enterprise REST web services',
|
|
19
19
|
long_description=long_description,
|
|
20
20
|
long_description_content_type='text/x-rst',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/alignment_client.py
RENAMED
|
File without changes
|
{pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/clinical_analysis_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/disease_panel_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/federation_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/individual_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyxetabase-3.1.0.dev2 → pyxetabase-4.0.0.dev30}/pyxetabase/rest_clients/organization_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|