pyxetabase 4.0.0.dev35__py3-none-any.whl → 4.0.0.dev62__py3-none-any.whl

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.
@@ -1,6 +1,7 @@
1
- import json
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
- if data is not None:
91
- return self._rest_retry(
92
- method='post', category=category, resource=resource, query_id=query_id,
93
- subcategory=subcategory, second_query_id=second_query_id,
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
- 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
- **options
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()
@@ -27,7 +27,7 @@ class Admin(_ParentRestClient):
27
27
  :param str entity: Entity to be grouped by. Allowed values: ['AUDIT
28
28
  NOTE ORGANIZATION USER PROJECT STUDY FILE SAMPLE JOB INDIVIDUAL
29
29
  COHORT DISEASE_PANEL FAMILY CLINICAL_ANALYSIS INTERPRETATION
30
- VARIANT ALIGNMENT CLINICAL EXPRESSION RGA FUNCTIONAL WORKFLOW
30
+ VARIANT ALIGNMENT CLINICAL EXPRESSION RGA FUNCTIONAL EXTERNAL_TOOL
31
31
  RESOURCE'] (REQUIRED)
32
32
  :param str fields: Comma separated list of fields by which to group
33
33
  by. (REQUIRED)
@@ -54,16 +54,23 @@ class Admin(_ParentRestClient):
54
54
 
55
55
  return self._post(category='admin', resource='install', subcategory='catalog', data=data, **options)
56
56
 
57
- def jwt_catalog(self, data=None, **options):
57
+ def update_catalog_workspace(self, data=None, **options):
58
58
  """
59
- Change JWT secret key.
60
- PATH: /{apiVersion}/admin/catalog/jwt
59
+ Update the OpenCGA Catalog workspace.
60
+ PATH: /{apiVersion}/admin/catalog/workspace/update
61
61
 
62
- :param dict data: JSON containing the parameters. (REQUIRED)
63
- :param str organization: Organization id.
62
+ :param dict data: JSON containing the workspace parameters. (REQUIRED)
63
+ """
64
+
65
+ return self._post(category='admin', resource='update', subcategory='catalog/workspace', data=data, **options)
66
+
67
+ def list_organizations(self, **options):
68
+ """
69
+ List current Organizations.
70
+ PATH: /{apiVersion}/admin/organizations/list
64
71
  """
65
72
 
66
- return self._post(category='admin', resource='jwt', subcategory='catalog', data=data, **options)
73
+ return self._get(category='admin', resource='list', subcategory='organizations', **options)
67
74
 
68
75
  def fetch_resource(self, data=None, **options):
69
76
  """
@@ -375,22 +375,27 @@ class ClinicalAnalysis(_ParentRestClient):
375
375
 
376
376
  return self._post(category='analysis', resource='run', subcategory='clinical/interpreter/exomiser', data=data, **options)
377
377
 
378
- def query_interpreter_rd(self, **options):
379
- """
380
- RD interpretation analysis.
381
- PATH: /{apiVersion}/analysis/clinical/interpreter/rd/query
382
-
383
- :param str clinical_analysis_id: Comma separated list of clinical
384
- analysis IDs or names up to a maximum of 100.
378
+ def rd_interpreter(self, **options):
379
+ """
380
+ Rare disease interpretation analysis.
381
+ PATH: /{apiVersion}/analysis/clinical/interpreter/rd
382
+
383
+ :param str clinical_analysis_id: Clinical analysis ID.
384
+ :param str proband_id: Proband ID.
385
+ :param str family_id: Family ID.
386
+ :param str panel_ids: List of panel IDs (separated by commas).
387
+ :param str disorder_id: Disorder ID.
388
+ :param str config_file: RD interpretation configuration file
389
+ (otherwise the default one will be used).
385
390
  :param str study: Study [[organization@]project:]study where study and
386
391
  project can be either the ID or UUID.
387
392
  """
388
393
 
389
- return self._get(category='analysis', resource='query', subcategory='clinical/interpreter/rd', **options)
394
+ return self._get(category='analysis', resource='rd', subcategory='clinical/interpreter', **options)
390
395
 
391
396
  def run_interpreter_rd(self, data=None, **options):
392
397
  """
393
- Run clinical interpretation analysis for rare diseases.
398
+ Run interpretation analysis for rare diseases.
394
399
  PATH: /{apiVersion}/analysis/clinical/interpreter/rd/run
395
400
 
396
401
  :param dict data: Parameters to execute the rare disease
@@ -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.
@@ -190,8 +190,14 @@ class DiseasePanel(_ParentRestClient):
190
190
  Import panels.
191
191
  PATH: /{apiVersion}/panels/import
192
192
 
193
+ :param str include: Fields included in the response, whole JSON path
194
+ must be provided.
195
+ :param str exclude: Fields excluded in the response, whole JSON path
196
+ must be provided.
193
197
  :param str study: Study [[organization@]project:]study where study and
194
198
  project can be either the ID or UUID.
199
+ :param bool include_result: Flag indicating to include the created or
200
+ updated document result in the response.
195
201
  :param dict data: Panel parameters.
196
202
  """
197
203
 
@@ -436,6 +436,18 @@ class File(_ParentRestClient):
436
436
 
437
437
  return self._post(category='files', resource='upload', **options)
438
438
 
439
+ def update_uri(self, data=None, **options):
440
+ """
441
+ Update URIs of files that have been manually moved in disk.
442
+ PATH: /{apiVersion}/files/uri/update
443
+
444
+ :param dict data: Parameters to modify. (REQUIRED)
445
+ :param str study: Study [[organization@]project:]study where study and
446
+ project can be either the ID or UUID.
447
+ """
448
+
449
+ return self._post(category='files', resource='update', subcategory='uri', data=data, **options)
450
+
439
451
  def acl(self, files, **options):
440
452
  """
441
453
  Return the acl defined for the file or folder. If member is provided,
@@ -265,7 +265,8 @@ class Job(_ParentRestClient):
265
265
  Execute an analysis from a custom binary.
266
266
  PATH: /{apiVersion}/jobs/tool/run
267
267
 
268
- :param dict data: NextFlow run parameters. (REQUIRED)
268
+ :param dict data: Container image to be executed and its requirements.
269
+ (REQUIRED)
269
270
  :param str study: Study [[organization@]project:]study where study and
270
271
  project can be either the ID or UUID.
271
272
  :param str job_id: Job ID. It must be a unique string within the
@@ -139,7 +139,8 @@ class Study(_ParentRestClient):
139
139
  :param str resource: Resource involved. Allowed values: ['AUDIT NOTE
140
140
  ORGANIZATION USER PROJECT STUDY FILE SAMPLE JOB INDIVIDUAL COHORT
141
141
  DISEASE_PANEL FAMILY CLINICAL_ANALYSIS INTERPRETATION VARIANT
142
- ALIGNMENT CLINICAL EXPRESSION RGA FUNCTIONAL WORKFLOW RESOURCE']
142
+ ALIGNMENT CLINICAL EXPRESSION RGA FUNCTIONAL EXTERNAL_TOOL
143
+ RESOURCE']
143
144
  :param str resource_id: Resource ID.
144
145
  :param str resource_uuid: resource UUID.
145
146
  :param str status: Filter by status. Allowed values: ['SUCCESS ERROR']
@@ -0,0 +1,471 @@
1
+ """
2
+ WARNING: AUTOGENERATED CODE
3
+
4
+ This code was generated by a tool.
5
+
6
+ Manual changes to this file may cause unexpected behavior in your application.
7
+ Manual changes to this file will be overwritten if the code is regenerated.
8
+ """
9
+
10
+ from pyxetabase.rest_clients._parent_rest_clients import _ParentRestClient
11
+
12
+
13
+ class UserTool(_ParentRestClient):
14
+ """
15
+ This class contains methods for the 'User Tools' webservices
16
+ PATH: /{apiVersion}/tools
17
+ """
18
+
19
+ def __init__(self, configuration, token=None, login_handler=None, *args, **kwargs):
20
+ super(UserTool, self).__init__(configuration, token, login_handler, *args, **kwargs)
21
+
22
+ def update_acl(self, members, action, data=None, **options):
23
+ """
24
+ Update the set of user tool permissions granted for the member.
25
+ PATH: /{apiVersion}/tools/acl/{members}/update
26
+
27
+ :param dict data: JSON containing the parameters to update the
28
+ permissions. (REQUIRED)
29
+ :param str action: Action to be performed [ADD, SET, REMOVE or RESET].
30
+ Allowed values: ['SET ADD REMOVE RESET'] (REQUIRED)
31
+ :param str members: Comma separated list of user or group ids.
32
+ (REQUIRED)
33
+ :param str study: Study [[organization@]project:]study where study and
34
+ project can be either the ID or UUID.
35
+ """
36
+
37
+ options['action'] = action
38
+ return self._post(category='tools', resource='update', subcategory='acl', second_query_id=members, data=data, **options)
39
+
40
+ def aggregation_stats(self, **options):
41
+ """
42
+ Fetch user tool stats.
43
+ PATH: /{apiVersion}/tools/aggregationStats
44
+
45
+ :param str study: Study [[organization@]project:]study where study and
46
+ project can be either the ID or UUID.
47
+ :param str id: Comma separated list of external tool IDs up to a
48
+ maximum of 100. Also admits basic regular expressions using the
49
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
50
+ sensitive, '~/value/i' for case insensitive search.
51
+ :param str name: Comma separated list of external tool names up to a
52
+ maximum of 100. Also admits basic regular expressions using the
53
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
54
+ sensitive, '~/value/i' for case insensitive search.
55
+ :param str uuid: Comma separated list of external tool UUIDs up to a
56
+ maximum of 100.
57
+ :param str tags: Comma separated list of tags.
58
+ :param bool draft: Boolean field indicating whether the workflow is a
59
+ draft or not.
60
+ :param str internal.registration_user_id: UserId that created the
61
+ workflow.
62
+ :param str type: External tool type. Allowed types: [CUSTOM_TOOL,
63
+ VARIANT_WALKER or WORKFLOW].
64
+ :param str scope: External tool scope. Allowed types:
65
+ [CLINICAL_INTERPRETATION, SECONDARY_ANALYSIS, RESEARCH or OTHER].
66
+ :param str workflow_repository_name: Workflow repository name.
67
+ :param str container_name: Container name.
68
+ :param str creation_date: Creation date. Format: yyyyMMddHHmmss.
69
+ Examples: >2018, 2017-2018, <201805.
70
+ :param str modification_date: Modification date. Format:
71
+ yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
72
+ :param str acl: Filter entries for which a user has the provided
73
+ permissions. Format: acl={user}:{permissions}. Example:
74
+ acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
75
+ user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
76
+ study owners or administrators can query by this field. .
77
+ :param str release: Release when it was created.
78
+ :param int snapshot: Snapshot value (Latest version of the entry in
79
+ the specified release).
80
+ :param bool deleted: Boolean to retrieve deleted entries.
81
+ :param str field: Field to apply aggregation statistics to (or a list
82
+ of fields separated by semicolons), e.g.:
83
+ studies;type;numSamples[0..10]:1;format:sum(size).
84
+ """
85
+
86
+ return self._get(category='tools', resource='aggregationStats', **options)
87
+
88
+ def run_custom_builder(self, data=None, **options):
89
+ """
90
+ Execute an analysis from a custom binary.
91
+ PATH: /{apiVersion}/tools/custom/builder/run
92
+
93
+ :param dict data: body. (REQUIRED)
94
+ :param str study: Study [[organization@]project:]study where study and
95
+ project can be either the ID or UUID.
96
+ :param str job_id: Job ID. It must be a unique string within the
97
+ study. An ID will be autogenerated automatically if not provided.
98
+ :param str job_description: Job description.
99
+ :param str job_depends_on: Comma separated list of existing job IDs
100
+ the job will depend on.
101
+ :param str job_tags: Job tags.
102
+ :param str job_scheduled_start_time: Time when the job is scheduled to
103
+ start.
104
+ :param str job_priority: Priority of the job.
105
+ :param bool job_dry_run: Flag indicating that the job will be executed
106
+ in dry-run mode. In this mode, OpenCGA will validate that all
107
+ parameters and prerequisites are correctly set for successful
108
+ execution, but the job will not actually run.
109
+ """
110
+
111
+ return self._post(category='tools', resource='run', subcategory='custom/builder', data=data, **options)
112
+
113
+ def create_custom(self, data=None, **options):
114
+ """
115
+ Register a new user tool of type CUSTOM_TOOL.
116
+ PATH: /{apiVersion}/tools/custom/create
117
+
118
+ :param dict data: JSON containing workflow information. (REQUIRED)
119
+ :param str include: Fields included in the response, whole JSON path
120
+ must be provided.
121
+ :param str exclude: Fields excluded in the response, whole JSON path
122
+ must be provided.
123
+ :param str study: Study [[organization@]project:]study where study and
124
+ project can be either the ID or UUID.
125
+ :param bool include_result: Flag indicating to include the created or
126
+ updated document result in the response.
127
+ """
128
+
129
+ return self._post(category='tools', resource='create', subcategory='custom', data=data, **options)
130
+
131
+ def run_custom_docker(self, data=None, **options):
132
+ """
133
+ Execute an analysis from a custom binary.
134
+ PATH: /{apiVersion}/tools/custom/run
135
+
136
+ :param dict data: Custom tool run parameters. (REQUIRED)
137
+ :param str study: Study [[organization@]project:]study where study and
138
+ project can be either the ID or UUID.
139
+ :param str job_id: Job ID. It must be a unique string within the
140
+ study. An ID will be autogenerated automatically if not provided.
141
+ :param str job_description: Job description.
142
+ :param str job_depends_on: Comma separated list of existing job IDs
143
+ the job will depend on.
144
+ :param str job_tags: Job tags.
145
+ :param str job_scheduled_start_time: Time when the job is scheduled to
146
+ start.
147
+ :param str job_priority: Priority of the job.
148
+ :param bool job_dry_run: Flag indicating that the job will be executed
149
+ in dry-run mode. In this mode, OpenCGA will validate that all
150
+ parameters and prerequisites are correctly set for successful
151
+ execution, but the job will not actually run.
152
+ """
153
+
154
+ return self._post(category='tools', resource='run', subcategory='custom', data=data, **options)
155
+
156
+ def update_custom(self, tool_id, data=None, **options):
157
+ """
158
+ Update some custom user tool attributes.
159
+ PATH: /{apiVersion}/tools/custom/{toolId}/update
160
+
161
+ :param str tool_id: Comma separated list of external tool IDs up to a
162
+ maximum of 100. Also admits basic regular expressions using the
163
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
164
+ sensitive, '~/value/i' for case insensitive search. (REQUIRED)
165
+ :param str include: Fields included in the response, whole JSON path
166
+ must be provided.
167
+ :param str exclude: Fields excluded in the response, whole JSON path
168
+ must be provided.
169
+ :param str study: Study [[organization@]project:]study where study and
170
+ project can be either the ID or UUID.
171
+ :param bool include_result: Flag indicating to include the created or
172
+ updated document result in the response.
173
+ :param dict data: body.
174
+ """
175
+
176
+ return self._post(category='tools', resource='update', subcategory='custom', second_query_id=tool_id, data=data, **options)
177
+
178
+ def distinct(self, field, **options):
179
+ """
180
+ User tool distinct method.
181
+ PATH: /{apiVersion}/tools/distinct
182
+
183
+ :param str field: Comma separated list of fields for which to obtain
184
+ the distinct values. (REQUIRED)
185
+ :param str study: Study [[organization@]project:]study where study and
186
+ project can be either the ID or UUID.
187
+ :param str id: Comma separated list of external tool IDs up to a
188
+ maximum of 100. Also admits basic regular expressions using the
189
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
190
+ sensitive, '~/value/i' for case insensitive search.
191
+ :param str name: Comma separated list of external tool names up to a
192
+ maximum of 100. Also admits basic regular expressions using the
193
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
194
+ sensitive, '~/value/i' for case insensitive search.
195
+ :param str uuid: Comma separated list of external tool UUIDs up to a
196
+ maximum of 100.
197
+ :param str tags: Comma separated list of tags.
198
+ :param bool draft: Boolean field indicating whether the workflow is a
199
+ draft or not.
200
+ :param str internal.registration_user_id: UserId that created the
201
+ workflow.
202
+ :param str type: External tool type. Allowed types: [CUSTOM_TOOL,
203
+ VARIANT_WALKER or WORKFLOW].
204
+ :param str scope: External tool scope. Allowed types:
205
+ [CLINICAL_INTERPRETATION, SECONDARY_ANALYSIS, RESEARCH or OTHER].
206
+ :param str workflow_repository_name: Workflow repository name.
207
+ :param str container_name: Container name.
208
+ :param str creation_date: Creation date. Format: yyyyMMddHHmmss.
209
+ Examples: >2018, 2017-2018, <201805.
210
+ :param str modification_date: Modification date. Format:
211
+ yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
212
+ :param str acl: Filter entries for which a user has the provided
213
+ permissions. Format: acl={user}:{permissions}. Example:
214
+ acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
215
+ user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
216
+ study owners or administrators can query by this field. .
217
+ :param str release: Release when it was created.
218
+ :param int snapshot: Snapshot value (Latest version of the entry in
219
+ the specified release).
220
+ :param bool deleted: Boolean to retrieve deleted entries.
221
+ """
222
+
223
+ options['field'] = field
224
+ return self._get(category='tools', resource='distinct', **options)
225
+
226
+ def search(self, **options):
227
+ """
228
+ User tool search method.
229
+ PATH: /{apiVersion}/tools/search
230
+
231
+ :param str include: Fields included in the response, whole JSON path
232
+ must be provided.
233
+ :param str exclude: Fields excluded in the response, whole JSON path
234
+ must be provided.
235
+ :param int limit: Number of results to be returned.
236
+ :param int skip: Number of results to skip.
237
+ :param bool count: Get the total number of results matching the query.
238
+ Deactivated by default.
239
+ :param str study: Study [[organization@]project:]study where study and
240
+ project can be either the ID or UUID.
241
+ :param str id: Comma separated list of external tool IDs up to a
242
+ maximum of 100. Also admits basic regular expressions using the
243
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
244
+ sensitive, '~/value/i' for case insensitive search.
245
+ :param str name: Comma separated list of external tool names up to a
246
+ maximum of 100. Also admits basic regular expressions using the
247
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
248
+ sensitive, '~/value/i' for case insensitive search.
249
+ :param str uuid: Comma separated list of external tool UUIDs up to a
250
+ maximum of 100.
251
+ :param str tags: Comma separated list of tags.
252
+ :param bool draft: Boolean field indicating whether the workflow is a
253
+ draft or not.
254
+ :param str internal.registration_user_id: UserId that created the
255
+ workflow.
256
+ :param str type: External tool type. Allowed types: [CUSTOM_TOOL,
257
+ VARIANT_WALKER or WORKFLOW].
258
+ :param str scope: External tool scope. Allowed types:
259
+ [CLINICAL_INTERPRETATION, SECONDARY_ANALYSIS, RESEARCH or OTHER].
260
+ :param str workflow_repository_name: Workflow repository name.
261
+ :param str container_name: Container name.
262
+ :param str creation_date: Creation date. Format: yyyyMMddHHmmss.
263
+ Examples: >2018, 2017-2018, <201805.
264
+ :param str modification_date: Modification date. Format:
265
+ yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
266
+ :param str acl: Filter entries for which a user has the provided
267
+ permissions. Format: acl={user}:{permissions}. Example:
268
+ acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
269
+ user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
270
+ study owners or administrators can query by this field. .
271
+ :param str release: Release when it was created.
272
+ :param int snapshot: Snapshot value (Latest version of the entry in
273
+ the specified release).
274
+ :param bool deleted: Boolean to retrieve deleted entries.
275
+ """
276
+
277
+ return self._get(category='tools', resource='search', **options)
278
+
279
+ def create_walker(self, data=None, **options):
280
+ """
281
+ Register a new user tool of type VARIANT_WALKER.
282
+ PATH: /{apiVersion}/tools/walker/create
283
+
284
+ :param dict data: JSON containing workflow information. (REQUIRED)
285
+ :param str include: Fields included in the response, whole JSON path
286
+ must be provided.
287
+ :param str exclude: Fields excluded in the response, whole JSON path
288
+ must be provided.
289
+ :param str study: Study [[organization@]project:]study where study and
290
+ project can be either the ID or UUID.
291
+ :param bool include_result: Flag indicating to include the created or
292
+ updated document result in the response.
293
+ """
294
+
295
+ return self._post(category='tools', resource='create', subcategory='walker', data=data, **options)
296
+
297
+ def run_walker(self, data=None, **options):
298
+ """
299
+ Execute an analysis from a custom binary.
300
+ PATH: /{apiVersion}/tools/walker/run
301
+
302
+ :param dict data: Variant walker params. (REQUIRED)
303
+ :param str project: Project [organization@]project where project can
304
+ be either the ID or the alias.
305
+ :param str study: Study [[organization@]project:]study where study and
306
+ project can be either the ID or UUID.
307
+ :param str job_id: Job ID. It must be a unique string within the
308
+ study. An ID will be autogenerated automatically if not provided.
309
+ :param str job_description: Job description.
310
+ :param str job_depends_on: Comma separated list of existing job IDs
311
+ the job will depend on.
312
+ :param str job_tags: Job tags.
313
+ :param str job_scheduled_start_time: Time when the job is scheduled to
314
+ start.
315
+ :param str job_priority: Priority of the job.
316
+ :param bool job_dry_run: Flag indicating that the job will be executed
317
+ in dry-run mode. In this mode, OpenCGA will validate that all
318
+ parameters and prerequisites are correctly set for successful
319
+ execution, but the job will not actually run.
320
+ """
321
+
322
+ return self._post(category='tools', resource='run', subcategory='walker', data=data, **options)
323
+
324
+ def update_walker(self, tool_id, data=None, **options):
325
+ """
326
+ Update some variant walker tool attributes.
327
+ PATH: /{apiVersion}/tools/walker/{toolId}/update
328
+
329
+ :param str tool_id: Comma separated list of external tool IDs up to a
330
+ maximum of 100. Also admits basic regular expressions using the
331
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
332
+ sensitive, '~/value/i' for case insensitive search. (REQUIRED)
333
+ :param str include: Fields included in the response, whole JSON path
334
+ must be provided.
335
+ :param str exclude: Fields excluded in the response, whole JSON path
336
+ must be provided.
337
+ :param str study: Study [[organization@]project:]study where study and
338
+ project can be either the ID or UUID.
339
+ :param bool include_result: Flag indicating to include the created or
340
+ updated document result in the response.
341
+ :param dict data: body.
342
+ """
343
+
344
+ return self._post(category='tools', resource='update', subcategory='walker', second_query_id=tool_id, data=data, **options)
345
+
346
+ def create_workflow(self, data=None, **options):
347
+ """
348
+ Register a new user tool of type WORKFLOW.
349
+ PATH: /{apiVersion}/tools/workflow/create
350
+
351
+ :param dict data: JSON containing workflow information. (REQUIRED)
352
+ :param str include: Fields included in the response, whole JSON path
353
+ must be provided.
354
+ :param str exclude: Fields excluded in the response, whole JSON path
355
+ must be provided.
356
+ :param str study: Study [[organization@]project:]study where study and
357
+ project can be either the ID or UUID.
358
+ :param bool include_result: Flag indicating to include the created or
359
+ updated document result in the response.
360
+ """
361
+
362
+ return self._post(category='tools', resource='create', subcategory='workflow', data=data, **options)
363
+
364
+ def import_workflow(self, data=None, **options):
365
+ """
366
+ Import a user tool of type WORKFLOW.
367
+ PATH: /{apiVersion}/tools/workflow/import
368
+
369
+ :param dict data: Repository parameters. (REQUIRED)
370
+ :param str study: Study [[organization@]project:]study where study and
371
+ project can be either the ID or UUID.
372
+ """
373
+
374
+ return self._post(category='tools', resource='import', subcategory='workflow', data=data, **options)
375
+
376
+ def run_workflow(self, data=None, **options):
377
+ """
378
+ Run a user tool of type WORKFLOW.
379
+ PATH: /{apiVersion}/tools/workflow/run
380
+
381
+ :param dict data: Workflow tool run parameters. (REQUIRED)
382
+ :param str study: Study [[organization@]project:]study where study and
383
+ project can be either the ID or UUID.
384
+ :param str job_id: Job ID. It must be a unique string within the
385
+ study. An ID will be autogenerated automatically if not provided.
386
+ :param str job_description: Job description.
387
+ :param str job_depends_on: Comma separated list of existing job IDs
388
+ the job will depend on.
389
+ :param str job_tags: Job tags.
390
+ :param str job_scheduled_start_time: Time when the job is scheduled to
391
+ start.
392
+ :param str job_priority: Priority of the job.
393
+ :param bool job_dry_run: Flag indicating that the job will be executed
394
+ in dry-run mode. In this mode, OpenCGA will validate that all
395
+ parameters and prerequisites are correctly set for successful
396
+ execution, but the job will not actually run.
397
+ """
398
+
399
+ return self._post(category='tools', resource='run', subcategory='workflow', data=data, **options)
400
+
401
+ def update_workflow(self, tool_id, data=None, **options):
402
+ """
403
+ Update some user tool attributes.
404
+ PATH: /{apiVersion}/tools/workflow/{toolId}/update
405
+
406
+ :param str tool_id: Comma separated list of external tool IDs up to a
407
+ maximum of 100. Also admits basic regular expressions using the
408
+ operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
409
+ sensitive, '~/value/i' for case insensitive search. (REQUIRED)
410
+ :param str include: Fields included in the response, whole JSON path
411
+ must be provided.
412
+ :param str exclude: Fields excluded in the response, whole JSON path
413
+ must be provided.
414
+ :param str study: Study [[organization@]project:]study where study and
415
+ project can be either the ID or UUID.
416
+ :param bool include_result: Flag indicating to include the created or
417
+ updated document result in the response.
418
+ :param dict data: body.
419
+ """
420
+
421
+ return self._post(category='tools', resource='update', subcategory='workflow', second_query_id=tool_id, data=data, **options)
422
+
423
+ def acl(self, tools, **options):
424
+ """
425
+ Returns the acl of the user tools. If member is provided, it will only
426
+ return the acl for the member.
427
+ PATH: /{apiVersion}/tools/{tools}/acl
428
+
429
+ :param str tools: Comma separated of external tool ids. (REQUIRED)
430
+ :param str study: Study [[organization@]project:]study where study and
431
+ project can be either the ID or UUID.
432
+ :param str member: User or group id.
433
+ :param bool silent: Boolean to retrieve all possible entries that are
434
+ queried for, false to raise an exception whenever one of the
435
+ entries looked for cannot be shown for whichever reason.
436
+ """
437
+
438
+ return self._get(category='tools', resource='acl', query_id=tools, **options)
439
+
440
+ def delete(self, tools, **options):
441
+ """
442
+ Delete user tools.
443
+ PATH: /{apiVersion}/tools/{tools}/delete
444
+
445
+ :param str tools: Comma separated of external tool ids. (REQUIRED)
446
+ :param str study: Study [[organization@]project:]study where study and
447
+ project can be either the ID or UUID.
448
+ """
449
+
450
+ return self._delete(category='tools', resource='delete', query_id=tools, **options)
451
+
452
+ def info(self, tools, **options):
453
+ """
454
+ Get user tool information.
455
+ PATH: /{apiVersion}/tools/{tools}/info
456
+
457
+ :param str tools: Comma separated of external tool ids. (REQUIRED)
458
+ :param str include: Fields included in the response, whole JSON path
459
+ must be provided.
460
+ :param str exclude: Fields excluded in the response, whole JSON path
461
+ must be provided.
462
+ :param str study: Study [[organization@]project:]study where study and
463
+ project can be either the ID or UUID.
464
+ :param str version: Comma separated list of external tool versions.
465
+ 'all' to get all the external tool versions. Not supported if
466
+ multiple external tool ids are provided.
467
+ :param bool deleted: Boolean to retrieve deleted entries.
468
+ """
469
+
470
+ return self._get(category='tools', resource='info', query_id=tools, **options)
471
+
@@ -627,33 +627,6 @@ class VariantOperation(_ParentRestClient):
627
627
 
628
628
  return self._post(category='operation', resource='secondaryIndex', subcategory='variant', data=data, **options)
629
629
 
630
- def delete_variant_secondary_index(self, **options):
631
- """
632
- Remove a secondary index from the search engine for a specific set of
633
- samples.
634
- PATH: /{apiVersion}/operation/variant/secondaryIndex/delete
635
-
636
- :param str job_id: Job ID. It must be a unique string within the
637
- study. An ID will be autogenerated automatically if not provided.
638
- :param str job_description: Job description.
639
- :param str job_depends_on: Comma separated list of existing job IDs
640
- the job will depend on.
641
- :param str job_tags: Job tags.
642
- :param str job_scheduled_start_time: Time when the job is scheduled to
643
- start.
644
- :param str job_priority: Priority of the job.
645
- :param bool job_dry_run: Flag indicating that the job will be executed
646
- in dry-run mode. In this mode, OpenCGA will validate that all
647
- parameters and prerequisites are correctly set for successful
648
- execution, but the job will not actually run.
649
- :param str study: Study [[organization@]project:]study where study and
650
- project can be either the ID or UUID.
651
- :param str samples: Samples to remove. Needs to provide all the
652
- samples in the secondary index.
653
- """
654
-
655
- return self._delete(category='operation', resource='delete', subcategory='variant/secondaryIndex', **options)
656
-
657
630
  def setup_variant(self, data=None, **options):
658
631
  """
659
632
  Execute Variant Setup to allow using the variant engine. This setup is
@@ -118,7 +118,7 @@ class Workflow(_ParentRestClient):
118
118
  Execute a workflow analysis.
119
119
  PATH: /{apiVersion}/workflows/run
120
120
 
121
- :param dict data: NextFlow run parameters. (REQUIRED)
121
+ :param dict data: Workflow tool run parameters. (REQUIRED)
122
122
  :param str study: Study [[organization@]project:]study where study and
123
123
  project can be either the ID or UUID.
124
124
  :param str job_id: Job ID. It must be a unique string within the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyxetabase
3
- Version: 4.0.0.dev35
3
+ Version: 4.0.0.dev62
4
4
  Summary: A REST client for OpenCGA enterprise REST web services
5
5
  Author: Daniel Perez-Gil
6
6
  Author-email: daniel.perez@zettagenomics.com
@@ -6,30 +6,31 @@ pyxetabase/opencga_config.py,sha256=RK23fextK79S5wq4FaQygwuPnE4p4J9GbjY6hJ0Krxc,
6
6
  pyxetabase/rest_response.py,sha256=TgwTI2LZFF_jV9-HSawGkF_qZ88n-dxEtIKiFcfPyDk,8635
7
7
  pyxetabase/retry.py,sha256=LjViQOaa_GkpDFkcRq9jIS183mE9t4Rq0uls9PV_mfI,2297
8
8
  pyxetabase/rest_clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- pyxetabase/rest_clients/_parent_rest_clients.py,sha256=ZL9VxTxS1cRcg-ofrE9QJXYL8mlVkbXpvFvwhofo-uI,4280
10
- pyxetabase/rest_clients/admin_client.py,sha256=WebfbQVa7CjiaNcp5MqwAkgDTqCfW-v5AgTaxmL5EF0,6927
9
+ pyxetabase/rest_clients/_parent_rest_clients.py,sha256=OuCnmaziUCENpmpA3CzKJGEhMY_Z-7Q_rlkH75QDi7I,5854
10
+ pyxetabase/rest_clients/admin_client.py,sha256=SzUuUBw1WNaCEOaS15UsHhn0OPgJ0WTEEoR043Z2zwM,7206
11
11
  pyxetabase/rest_clients/alignment_client.py,sha256=srY1fmjMZCPWlbqhrD2gYVhS2zu7fgPx61tZOqQi4Wc,18509
12
- pyxetabase/rest_clients/clinical_analysis_client.py,sha256=7JN6mg0QoKaC4yGVr5ujXymh6Dn4Ua4g-9ptb66Fi7A,65708
13
- pyxetabase/rest_clients/cohort_client.py,sha256=D-su-AFOziztVMI-oAcr5G2Uq_psbLV8Wt0bqZ7zZgI,16324
12
+ pyxetabase/rest_clients/clinical_analysis_client.py,sha256=jtEciqNiloadVxKmrq7UW-hYQlv9rHBR7G28IVTeXBM,65945
13
+ pyxetabase/rest_clients/cohort_client.py,sha256=_OIKohOlZcz3kRfP-FEneLkdCDVewlbG75YrhMT0aTg,17104
14
14
  pyxetabase/rest_clients/cvdb_client.py,sha256=V7ny5nQEeJqsbALAe7JLyoV6b0XyYF7c9lsn-qK-i8o,143102
15
- pyxetabase/rest_clients/disease_panel_client.py,sha256=WhYn08O4CjfZN-kDZjZgiJge1cfzlGvGL2OO8zUhW_A,17721
15
+ pyxetabase/rest_clients/disease_panel_client.py,sha256=YQIykUElEUGtOKGivnl9vNyHIrrZ_tXMnA1cvK8eE1A,18066
16
16
  pyxetabase/rest_clients/family_client.py,sha256=n-kyjnrV09R50JxyiHjFs8rCQkOKFU0Z1O7oVYuaKxg,18586
17
17
  pyxetabase/rest_clients/federation_client.py,sha256=p5B8dRq9gj-fdgIfIPhmkT7mNU65cRFtH06kaGtmbWE,5066
18
- pyxetabase/rest_clients/file_client.py,sha256=fwTWnZtprYNDUBvRetLLe6PTBxW_M8LxN6OlAMGWXC4,33730
18
+ pyxetabase/rest_clients/file_client.py,sha256=xOndKo1z5pTUySKLn9dQK10tIdopwH4Fe0Sp2-wwJeU,34210
19
19
  pyxetabase/rest_clients/ga4gh_client.py,sha256=fPnmiblnfpz_zcZPJblGqOFksrdiF3MUer3fv2nwQwk,3506
20
20
  pyxetabase/rest_clients/individual_client.py,sha256=C59zr_t7tTxNR7ZBeAPY6fyYl59fE7KY05MaLyXWmXw,23225
21
- pyxetabase/rest_clients/job_client.py,sha256=amoBW3SL56l6sAPCUB55rZhLR8DcdIIfb5ymOZ9NkLQ,19811
21
+ pyxetabase/rest_clients/job_client.py,sha256=ROODPyg0prlJ1rZb7rvy3A-LK5dXVs7hzXoKek-c9gc,19851
22
22
  pyxetabase/rest_clients/meta_client.py,sha256=uExVRfdSKiXteLYe7R3q9x3zCp9mMWWMyPDU56TtoDo,2308
23
23
  pyxetabase/rest_clients/organization_client.py,sha256=tnwUTCqJoGiKXMQLMv4ymHA16JxnR5iL2SMLaJDBRs8,9465
24
24
  pyxetabase/rest_clients/project_client.py,sha256=M8naPsj47z2ylTrJNU_JyHReKzXrB038PoEtKKrtxmc,5212
25
25
  pyxetabase/rest_clients/sample_client.py,sha256=VOsPAhw9HwaEHzzw_5gcVQ1v2xSesvzN3TO4z2opaNo,23621
26
- pyxetabase/rest_clients/study_client.py,sha256=STtboEiGP-lQ1UptjHxk-ANd3uG6cA6U3srvOO4UQIE,21491
26
+ pyxetabase/rest_clients/study_client.py,sha256=LSm6larpU5X6ceqVRmTP6yx4YMvRkNRiWZsFPs0l8Xk,21508
27
27
  pyxetabase/rest_clients/user_client.py,sha256=frA7-rMii-yoRyca_Orkj1T80OeEe-zCdWZCHKn1sio,7683
28
+ pyxetabase/rest_clients/user_tool_client.py,sha256=QCqFpwB0B6w0likPj8y_lhQ3VXBMEgPcDlPCOui3cbI,23522
28
29
  pyxetabase/rest_clients/variant_client.py,sha256=mmBuVE0JBThJr5zsLGci5nykNcCKyfZXRKl-h3HT9PA,75436
29
- pyxetabase/rest_clients/variant_operation_client.py,sha256=z_9qEpZEoHF8lLfBq-i3wROnoiNjPjBavqPBepiTIyk,38246
30
- pyxetabase/rest_clients/workflow_client.py,sha256=QYnyI17aNCjq-uXlguaSj78F0xupeWwmf8uYK1Y5tf4,12482
31
- pyxetabase-4.0.0.dev35.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
32
- pyxetabase-4.0.0.dev35.dist-info/METADATA,sha256=JZ5oFXMccuHKeBA7TwyQqRD4nPcUQhFXJOgfmaKJPpE,5540
33
- pyxetabase-4.0.0.dev35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- pyxetabase-4.0.0.dev35.dist-info/top_level.txt,sha256=0m5pDpBX-lM8QpPl7bTpTQAm4kgu2-nr-pcaEu4Tn_8,11
35
- pyxetabase-4.0.0.dev35.dist-info/RECORD,,
30
+ pyxetabase/rest_clients/variant_operation_client.py,sha256=ceZ2-ii0D1oCDMRz_EURwUf_VjtsV5lzJuY-ZwG1b6Q,36840
31
+ pyxetabase/rest_clients/workflow_client.py,sha256=HYu4YInpzQvDRDNtFkT8LmxUHuMaPdPP59wSvHkBZtc,12487
32
+ pyxetabase-4.0.0.dev62.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
33
+ pyxetabase-4.0.0.dev62.dist-info/METADATA,sha256=oxyOqvlJ16jGd0QlDxM44U3K-CcxKWILwrI-jPHzOSM,5540
34
+ pyxetabase-4.0.0.dev62.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
+ pyxetabase-4.0.0.dev62.dist-info/top_level.txt,sha256=0m5pDpBX-lM8QpPl7bTpTQAm4kgu2-nr-pcaEu4Tn_8,11
36
+ pyxetabase-4.0.0.dev62.dist-info/RECORD,,