pyxetabase 4.0.0.dev56__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.
Potentially problematic release.
This version of pyxetabase might be problematic. Click here for more details.
- pyxetabase/__init__.py +0 -0
- pyxetabase/commons.py +347 -0
- pyxetabase/exceptions.py +8 -0
- pyxetabase/opencga_client.py +344 -0
- pyxetabase/opencga_config.py +211 -0
- pyxetabase/rest_clients/__init__.py +0 -0
- pyxetabase/rest_clients/_parent_rest_clients.py +144 -0
- pyxetabase/rest_clients/admin_client.py +179 -0
- pyxetabase/rest_clients/alignment_client.py +373 -0
- pyxetabase/rest_clients/clinical_analysis_client.py +1216 -0
- pyxetabase/rest_clients/cohort_client.py +349 -0
- pyxetabase/rest_clients/cvdb_client.py +2285 -0
- pyxetabase/rest_clients/disease_panel_client.py +345 -0
- pyxetabase/rest_clients/family_client.py +355 -0
- pyxetabase/rest_clients/federation_client.py +133 -0
- pyxetabase/rest_clients/file_client.py +710 -0
- pyxetabase/rest_clients/ga4gh_client.py +86 -0
- pyxetabase/rest_clients/individual_client.py +435 -0
- pyxetabase/rest_clients/job_client.py +416 -0
- pyxetabase/rest_clients/meta_client.py +85 -0
- pyxetabase/rest_clients/organization_client.py +216 -0
- pyxetabase/rest_clients/project_client.py +128 -0
- pyxetabase/rest_clients/sample_client.py +446 -0
- pyxetabase/rest_clients/study_client.py +462 -0
- pyxetabase/rest_clients/user_client.py +212 -0
- pyxetabase/rest_clients/user_tool_client.py +471 -0
- pyxetabase/rest_clients/variant_client.py +1378 -0
- pyxetabase/rest_clients/variant_operation_client.py +718 -0
- pyxetabase/rest_clients/workflow_client.py +263 -0
- pyxetabase/rest_response.py +220 -0
- pyxetabase/retry.py +57 -0
- pyxetabase-4.0.0.dev56.dist-info/METADATA +159 -0
- pyxetabase-4.0.0.dev56.dist-info/RECORD +36 -0
- pyxetabase-4.0.0.dev56.dist-info/WHEEL +5 -0
- pyxetabase-4.0.0.dev56.dist-info/licenses/LICENSE +202 -0
- pyxetabase-4.0.0.dev56.dist-info/top_level.txt +1 -0
|
@@ -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
|
+
|