pyxetabase 3.1.1.dev1__py3-none-any.whl → 3.1.2__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-3.1.1.dev1.dist-info → pyxetabase-3.1.2.dist-info}/METADATA +1 -1
- pyxetabase-3.1.2.dist-info/RECORD +35 -0
- pyopencga/__init__.py +0 -0
- pyopencga/commons.py +0 -347
- pyopencga/exceptions.py +0 -8
- pyopencga/opencga_client.py +0 -334
- pyopencga/opencga_config.py +0 -211
- pyopencga/rest_clients/__init__.py +0 -0
- pyopencga/rest_clients/_parent_rest_clients.py +0 -110
- pyopencga/rest_clients/admin_client.py +0 -172
- pyopencga/rest_clients/alignment_client.py +0 -373
- pyopencga/rest_clients/clinical_analysis_client.py +0 -1279
- pyopencga/rest_clients/cohort_client.py +0 -338
- pyopencga/rest_clients/disease_panel_client.py +0 -352
- pyopencga/rest_clients/family_client.py +0 -355
- pyopencga/rest_clients/file_client.py +0 -698
- pyopencga/rest_clients/ga4gh_client.py +0 -86
- pyopencga/rest_clients/individual_client.py +0 -435
- pyopencga/rest_clients/job_client.py +0 -415
- pyopencga/rest_clients/meta_client.py +0 -85
- pyopencga/rest_clients/organization_client.py +0 -216
- pyopencga/rest_clients/project_client.py +0 -128
- pyopencga/rest_clients/sample_client.py +0 -446
- pyopencga/rest_clients/study_client.py +0 -461
- pyopencga/rest_clients/user_client.py +0 -192
- pyopencga/rest_clients/variant_client.py +0 -1378
- pyopencga/rest_clients/variant_operation_client.py +0 -745
- pyopencga/rest_clients/workflow_client.py +0 -263
- pyopencga/rest_response.py +0 -220
- pyopencga/retry.py +0 -57
- pyxetabase-3.1.1.dev1.dist-info/RECORD +0 -63
- {pyxetabase-3.1.1.dev1.dist-info → pyxetabase-3.1.2.dist-info}/WHEEL +0 -0
- {pyxetabase-3.1.1.dev1.dist-info → pyxetabase-3.1.2.dist-info}/licenses/LICENSE +0 -0
- {pyxetabase-3.1.1.dev1.dist-info → pyxetabase-3.1.2.dist-info}/top_level.txt +0 -0
|
@@ -1,338 +0,0 @@
|
|
|
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 pyopencga.rest_clients._parent_rest_clients import _ParentRestClient
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class Cohort(_ParentRestClient):
|
|
14
|
-
"""
|
|
15
|
-
This class contains methods for the 'Cohorts' webservices
|
|
16
|
-
PATH: /{apiVersion}/cohorts
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
def __init__(self, configuration, token=None, login_handler=None, *args, **kwargs):
|
|
20
|
-
super(Cohort, 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 permissions granted for the member.
|
|
25
|
-
PATH: /{apiVersion}/cohorts/acl/{members}/update
|
|
26
|
-
|
|
27
|
-
:param dict data: JSON containing the parameters to add ACLs.
|
|
28
|
-
(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='cohorts', resource='update', subcategory='acl', second_query_id=members, data=data, **options)
|
|
39
|
-
|
|
40
|
-
def aggregation_stats(self, **options):
|
|
41
|
-
"""
|
|
42
|
-
Fetch catalog cohort stats.
|
|
43
|
-
PATH: /{apiVersion}/cohorts/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 cohort IDs up to a maximum of
|
|
48
|
-
100. Also admits basic regular expressions using the operator '~',
|
|
49
|
-
i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i'
|
|
50
|
-
for case insensitive search.
|
|
51
|
-
:param str name: Comma separated list of cohort names up to a maximum
|
|
52
|
-
of 100. Also admits basic regular expressions using the operator
|
|
53
|
-
'~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive,
|
|
54
|
-
'~/value/i' for case insensitive search.
|
|
55
|
-
:param str uuid: Comma separated list of cohort IDs up to a maximum of
|
|
56
|
-
100.
|
|
57
|
-
:param str type: Cohort type.
|
|
58
|
-
:param str creation_date: creationDate.
|
|
59
|
-
:param str modification_date: modificationDate.
|
|
60
|
-
:param bool deleted: deleted.
|
|
61
|
-
:param str status: status.
|
|
62
|
-
:param str internal_status: internalStatus.
|
|
63
|
-
:param str annotation: Cohort annotation.
|
|
64
|
-
:param str acl: acl.
|
|
65
|
-
:param str samples: Cohort sample IDs.
|
|
66
|
-
:param str num_samples: Number of samples.
|
|
67
|
-
:param str release: release.
|
|
68
|
-
:param str field: Field to apply aggregation statistics to (or a list
|
|
69
|
-
of fields separated by semicolons), e.g.:
|
|
70
|
-
studies;type;numSamples[0..10]:1;format:sum(size).
|
|
71
|
-
"""
|
|
72
|
-
|
|
73
|
-
return self._get(category='cohorts', resource='aggregationStats', **options)
|
|
74
|
-
|
|
75
|
-
def load_annotation_sets(self, variable_set_id, path, data=None, **options):
|
|
76
|
-
"""
|
|
77
|
-
Load annotation sets from a TSV file.
|
|
78
|
-
PATH: /{apiVersion}/cohorts/annotationSets/load
|
|
79
|
-
|
|
80
|
-
:param str path: Path where the TSV file is located in OpenCGA or
|
|
81
|
-
where it should be located. (REQUIRED)
|
|
82
|
-
:param str variable_set_id: Variable set ID or name. (REQUIRED)
|
|
83
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
84
|
-
project can be either the ID or UUID.
|
|
85
|
-
:param bool parents: Flag indicating whether to create parent
|
|
86
|
-
directories if they don't exist (only when TSV file was not
|
|
87
|
-
previously associated).
|
|
88
|
-
:param str annotation_set_id: Annotation set id. If not provided,
|
|
89
|
-
variableSetId will be used.
|
|
90
|
-
:param dict data: JSON containing the 'content' of the TSV file if
|
|
91
|
-
this has not yet been registered into OpenCGA.
|
|
92
|
-
"""
|
|
93
|
-
|
|
94
|
-
options['variableSetId'] = variable_set_id
|
|
95
|
-
options['path'] = path
|
|
96
|
-
return self._post(category='cohorts', resource='load', subcategory='annotationSets', data=data, **options)
|
|
97
|
-
|
|
98
|
-
def create(self, data=None, **options):
|
|
99
|
-
"""
|
|
100
|
-
Create a cohort.
|
|
101
|
-
PATH: /{apiVersion}/cohorts/create
|
|
102
|
-
|
|
103
|
-
:param dict data: JSON containing cohort information. (REQUIRED)
|
|
104
|
-
:param str include: Fields included in the response, whole JSON path
|
|
105
|
-
must be provided.
|
|
106
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
107
|
-
must be provided.
|
|
108
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
109
|
-
project can be either the ID or UUID.
|
|
110
|
-
:param str variable_set: Deprecated: Use /generate web service and
|
|
111
|
-
filter by annotation.
|
|
112
|
-
:param str variable: Deprecated: Use /generate web service and filter
|
|
113
|
-
by annotation.
|
|
114
|
-
:param bool include_result: Flag indicating to include the created or
|
|
115
|
-
updated document result in the response.
|
|
116
|
-
"""
|
|
117
|
-
|
|
118
|
-
return self._post(category='cohorts', resource='create', data=data, **options)
|
|
119
|
-
|
|
120
|
-
def distinct(self, field, **options):
|
|
121
|
-
"""
|
|
122
|
-
Cohort distinct method.
|
|
123
|
-
PATH: /{apiVersion}/cohorts/distinct
|
|
124
|
-
|
|
125
|
-
:param str field: Comma separated list of fields for which to obtain
|
|
126
|
-
the distinct values. (REQUIRED)
|
|
127
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
128
|
-
project can be either the ID or UUID.
|
|
129
|
-
:param str id: Comma separated list of cohort IDs up to a maximum of
|
|
130
|
-
100. Also admits basic regular expressions using the operator '~',
|
|
131
|
-
i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i'
|
|
132
|
-
for case insensitive search.
|
|
133
|
-
:param str name: Comma separated list of cohort names up to a maximum
|
|
134
|
-
of 100. Also admits basic regular expressions using the operator
|
|
135
|
-
'~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive,
|
|
136
|
-
'~/value/i' for case insensitive search.
|
|
137
|
-
:param str uuid: Comma separated list of cohort IDs up to a maximum of
|
|
138
|
-
100.
|
|
139
|
-
:param str type: Cohort type.
|
|
140
|
-
:param str creation_date: creationDate.
|
|
141
|
-
:param str modification_date: modificationDate.
|
|
142
|
-
:param bool deleted: deleted.
|
|
143
|
-
:param str status: status.
|
|
144
|
-
:param str internal_status: internalStatus.
|
|
145
|
-
:param str annotation: Cohort annotation.
|
|
146
|
-
:param str acl: acl.
|
|
147
|
-
:param str samples: Cohort sample IDs.
|
|
148
|
-
:param str num_samples: Number of samples.
|
|
149
|
-
:param str release: release.
|
|
150
|
-
"""
|
|
151
|
-
|
|
152
|
-
options['field'] = field
|
|
153
|
-
return self._get(category='cohorts', resource='distinct', **options)
|
|
154
|
-
|
|
155
|
-
def generate(self, data=None, **options):
|
|
156
|
-
"""
|
|
157
|
-
Create a cohort based on a sample query.
|
|
158
|
-
PATH: /{apiVersion}/cohorts/generate
|
|
159
|
-
|
|
160
|
-
:param dict data: JSON containing cohort information. (REQUIRED)
|
|
161
|
-
:param str include: Fields included in the response, whole JSON path
|
|
162
|
-
must be provided.
|
|
163
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
164
|
-
must be provided.
|
|
165
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
166
|
-
project can be either the ID or UUID.
|
|
167
|
-
:param str id: Comma separated list sample IDs or UUIDs up to a
|
|
168
|
-
maximum of 100.
|
|
169
|
-
:param bool somatic: Somatic sample.
|
|
170
|
-
:param str individual_id: Individual ID or UUID.
|
|
171
|
-
:param str file_ids: Comma separated list of file IDs, paths or UUIDs.
|
|
172
|
-
:param str creation_date: Creation date. Format: yyyyMMddHHmmss.
|
|
173
|
-
Examples: >2018, 2017-2018, <201805.
|
|
174
|
-
:param str modification_date: Modification date. Format:
|
|
175
|
-
yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
176
|
-
:param str internal_status: Filter by internal status.
|
|
177
|
-
:param str status: Filter by status.
|
|
178
|
-
:param str phenotypes: Comma separated list of phenotype ids or names.
|
|
179
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
180
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
181
|
-
case insensitive search.
|
|
182
|
-
:param str annotation: Annotation filters. Example:
|
|
183
|
-
age>30;gender=FEMALE. For more information, please visit
|
|
184
|
-
http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
|
|
185
|
-
:param str acl: Filter entries for which a user has the provided
|
|
186
|
-
permissions. Format: acl={user}:{permissions}. Example:
|
|
187
|
-
acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
|
|
188
|
-
user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
|
|
189
|
-
study owners or administrators can query by this field. .
|
|
190
|
-
:param str release: Release when it was created.
|
|
191
|
-
:param int snapshot: Snapshot value (Latest version of the entry in
|
|
192
|
-
the specified release).
|
|
193
|
-
:param bool include_result: Flag indicating to include the created or
|
|
194
|
-
updated document result in the response.
|
|
195
|
-
"""
|
|
196
|
-
|
|
197
|
-
return self._post(category='cohorts', resource='generate', data=data, **options)
|
|
198
|
-
|
|
199
|
-
def search(self, **options):
|
|
200
|
-
"""
|
|
201
|
-
Search cohorts.
|
|
202
|
-
PATH: /{apiVersion}/cohorts/search
|
|
203
|
-
|
|
204
|
-
:param str include: Fields included in the response, whole JSON path
|
|
205
|
-
must be provided.
|
|
206
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
207
|
-
must be provided.
|
|
208
|
-
:param int limit: Number of results to be returned.
|
|
209
|
-
:param int skip: Number of results to skip.
|
|
210
|
-
:param bool count: Get the total number of results matching the query.
|
|
211
|
-
Deactivated by default.
|
|
212
|
-
:param bool flatten_annotations: Flatten the annotations?.
|
|
213
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
214
|
-
project can be either the ID or UUID.
|
|
215
|
-
:param str id: Comma separated list of cohort IDs up to a maximum of
|
|
216
|
-
100. Also admits basic regular expressions using the operator '~',
|
|
217
|
-
i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i'
|
|
218
|
-
for case insensitive search.
|
|
219
|
-
:param str name: Comma separated list of cohort names up to a maximum
|
|
220
|
-
of 100. Also admits basic regular expressions using the operator
|
|
221
|
-
'~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive,
|
|
222
|
-
'~/value/i' for case insensitive search.
|
|
223
|
-
:param str uuid: Comma separated list of cohort IDs up to a maximum of
|
|
224
|
-
100.
|
|
225
|
-
:param str type: Cohort type.
|
|
226
|
-
:param str creation_date: creationDate.
|
|
227
|
-
:param str modification_date: modificationDate.
|
|
228
|
-
:param bool deleted: deleted.
|
|
229
|
-
:param str status: status.
|
|
230
|
-
:param str internal_status: internalStatus.
|
|
231
|
-
:param str annotation: Cohort annotation.
|
|
232
|
-
:param str acl: acl.
|
|
233
|
-
:param str samples: Cohort sample IDs.
|
|
234
|
-
:param str num_samples: Number of samples.
|
|
235
|
-
:param str release: release.
|
|
236
|
-
"""
|
|
237
|
-
|
|
238
|
-
return self._get(category='cohorts', resource='search', **options)
|
|
239
|
-
|
|
240
|
-
def acl(self, cohorts, **options):
|
|
241
|
-
"""
|
|
242
|
-
Return the acl of the cohort. If member is provided, it will only
|
|
243
|
-
return the acl for the member.
|
|
244
|
-
PATH: /{apiVersion}/cohorts/{cohorts}/acl
|
|
245
|
-
|
|
246
|
-
:param str cohorts: Comma separated list of cohort IDs or UUIDs up to
|
|
247
|
-
a maximum of 100. (REQUIRED)
|
|
248
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
249
|
-
project can be either the ID or UUID.
|
|
250
|
-
:param str member: User or group id.
|
|
251
|
-
:param bool silent: Boolean to retrieve all possible entries that are
|
|
252
|
-
queried for, false to raise an exception whenever one of the
|
|
253
|
-
entries looked for cannot be shown for whichever reason.
|
|
254
|
-
"""
|
|
255
|
-
|
|
256
|
-
return self._get(category='cohorts', resource='acl', query_id=cohorts, **options)
|
|
257
|
-
|
|
258
|
-
def delete(self, cohorts, **options):
|
|
259
|
-
"""
|
|
260
|
-
Delete cohorts.
|
|
261
|
-
PATH: /{apiVersion}/cohorts/{cohorts}/delete
|
|
262
|
-
|
|
263
|
-
:param str cohorts: Comma separated list of cohort ids. (REQUIRED)
|
|
264
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
265
|
-
project can be either the ID or UUID.
|
|
266
|
-
"""
|
|
267
|
-
|
|
268
|
-
return self._delete(category='cohorts', resource='delete', query_id=cohorts, **options)
|
|
269
|
-
|
|
270
|
-
def info(self, cohorts, **options):
|
|
271
|
-
"""
|
|
272
|
-
Get cohort information.
|
|
273
|
-
PATH: /{apiVersion}/cohorts/{cohorts}/info
|
|
274
|
-
|
|
275
|
-
:param str cohorts: Comma separated list of cohort IDs or UUIDs up to
|
|
276
|
-
a maximum of 100. (REQUIRED)
|
|
277
|
-
:param str include: Fields included in the response, whole JSON path
|
|
278
|
-
must be provided.
|
|
279
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
280
|
-
must be provided.
|
|
281
|
-
:param bool flatten_annotations: Flatten the annotations?.
|
|
282
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
283
|
-
project can be either the ID or UUID.
|
|
284
|
-
:param bool deleted: Boolean to retrieve deleted cohorts.
|
|
285
|
-
"""
|
|
286
|
-
|
|
287
|
-
return self._get(category='cohorts', resource='info', query_id=cohorts, **options)
|
|
288
|
-
|
|
289
|
-
def update(self, cohorts, data=None, **options):
|
|
290
|
-
"""
|
|
291
|
-
Update some cohort attributes.
|
|
292
|
-
PATH: /{apiVersion}/cohorts/{cohorts}/update
|
|
293
|
-
|
|
294
|
-
:param str cohorts: Comma separated list of cohort ids. (REQUIRED)
|
|
295
|
-
:param str include: Fields included in the response, whole JSON path
|
|
296
|
-
must be provided.
|
|
297
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
298
|
-
must be provided.
|
|
299
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
300
|
-
project can be either the ID or UUID.
|
|
301
|
-
:param str samples_action: Action to be performed if the array of
|
|
302
|
-
samples is being updated. Allowed values: ['ADD SET REMOVE']
|
|
303
|
-
:param str annotation_sets_action: Action to be performed if the array
|
|
304
|
-
of annotationSets is being updated. Allowed values: ['ADD SET
|
|
305
|
-
REMOVE']
|
|
306
|
-
:param bool include_result: Flag indicating to include the created or
|
|
307
|
-
updated document result in the response.
|
|
308
|
-
:param dict data: body.
|
|
309
|
-
"""
|
|
310
|
-
|
|
311
|
-
return self._post(category='cohorts', resource='update', query_id=cohorts, data=data, **options)
|
|
312
|
-
|
|
313
|
-
def update_annotation_sets_annotations(self, cohort, annotation_set, data=None, **options):
|
|
314
|
-
"""
|
|
315
|
-
Update annotations from an annotationSet.
|
|
316
|
-
PATH: /{apiVersion}/cohorts/{cohort}/annotationSets/{annotationSet}/annotations/update
|
|
317
|
-
|
|
318
|
-
:param str annotation_set: AnnotationSet ID to be updated. (REQUIRED)
|
|
319
|
-
:param str cohort: Cohort ID. (REQUIRED)
|
|
320
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
321
|
-
project can be either the ID or UUID.
|
|
322
|
-
:param str action: Action to be performed: ADD to add new annotations;
|
|
323
|
-
REPLACE to replace the value of an already existing annotation; SET
|
|
324
|
-
to set the new list of annotations removing any possible old
|
|
325
|
-
annotations; REMOVE to remove some annotations; RESET to set some
|
|
326
|
-
annotations to the default value configured in the corresponding
|
|
327
|
-
variables of the VariableSet if any. Allowed values: ['ADD SET
|
|
328
|
-
REMOVE RESET REPLACE']
|
|
329
|
-
:param dict data: Json containing the map of annotations when the
|
|
330
|
-
action is ADD, SET or REPLACE, a json with only the key 'remove'
|
|
331
|
-
containing the comma separated variables to be removed as a value
|
|
332
|
-
when the action is REMOVE or a json with only the key 'reset'
|
|
333
|
-
containing the comma separated variables that will be set to the
|
|
334
|
-
default value when the action is RESET.
|
|
335
|
-
"""
|
|
336
|
-
|
|
337
|
-
return self._post(category='cohorts', resource='annotations/update', query_id=cohort, subcategory='annotationSets', second_query_id=annotation_set, data=data, **options)
|
|
338
|
-
|