pyxetabase 3.1.0.dev25__py3-none-any.whl → 3.1.1__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.

Files changed (36) hide show
  1. pyxetabase/rest_clients/file_client.py +1 -1
  2. pyxetabase/rest_clients/variant_operation_client.py +1 -2
  3. {pyxetabase-3.1.0.dev25.dist-info → pyxetabase-3.1.1.dist-info}/METADATA +1 -1
  4. pyxetabase-3.1.1.dist-info/RECORD +35 -0
  5. pyopencga/__init__.py +0 -0
  6. pyopencga/commons.py +0 -347
  7. pyopencga/exceptions.py +0 -8
  8. pyopencga/opencga_client.py +0 -334
  9. pyopencga/opencga_config.py +0 -211
  10. pyopencga/rest_clients/__init__.py +0 -0
  11. pyopencga/rest_clients/_parent_rest_clients.py +0 -110
  12. pyopencga/rest_clients/admin_client.py +0 -172
  13. pyopencga/rest_clients/alignment_client.py +0 -373
  14. pyopencga/rest_clients/clinical_analysis_client.py +0 -1279
  15. pyopencga/rest_clients/cohort_client.py +0 -338
  16. pyopencga/rest_clients/disease_panel_client.py +0 -352
  17. pyopencga/rest_clients/family_client.py +0 -355
  18. pyopencga/rest_clients/file_client.py +0 -698
  19. pyopencga/rest_clients/ga4gh_client.py +0 -86
  20. pyopencga/rest_clients/individual_client.py +0 -435
  21. pyopencga/rest_clients/job_client.py +0 -415
  22. pyopencga/rest_clients/meta_client.py +0 -85
  23. pyopencga/rest_clients/organization_client.py +0 -216
  24. pyopencga/rest_clients/project_client.py +0 -128
  25. pyopencga/rest_clients/sample_client.py +0 -446
  26. pyopencga/rest_clients/study_client.py +0 -461
  27. pyopencga/rest_clients/user_client.py +0 -192
  28. pyopencga/rest_clients/variant_client.py +0 -1378
  29. pyopencga/rest_clients/variant_operation_client.py +0 -746
  30. pyopencga/rest_clients/workflow_client.py +0 -263
  31. pyopencga/rest_response.py +0 -220
  32. pyopencga/retry.py +0 -57
  33. pyxetabase-3.1.0.dev25.dist-info/RECORD +0 -63
  34. {pyxetabase-3.1.0.dev25.dist-info → pyxetabase-3.1.1.dist-info}/WHEEL +0 -0
  35. {pyxetabase-3.1.0.dev25.dist-info → pyxetabase-3.1.1.dist-info}/licenses/LICENSE +0 -0
  36. {pyxetabase-3.1.0.dev25.dist-info → pyxetabase-3.1.1.dist-info}/top_level.txt +0 -0
@@ -1,698 +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 File(_ParentRestClient):
14
- """
15
- This class contains methods for the 'Files' webservices
16
- PATH: /{apiVersion}/files
17
- """
18
-
19
- def __init__(self, configuration, token=None, login_handler=None, *args, **kwargs):
20
- super(File, 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}/files/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='files', resource='update', subcategory='acl', second_query_id=members, data=data, **options)
39
-
40
- def aggregation_stats(self, **options):
41
- """
42
- Fetch catalog file stats.
43
- PATH: /{apiVersion}/files/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 file 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 uuid: Comma separated list file UUIDs up to a maximum of
52
- 100.
53
- :param str name: Comma separated list of file names. Also admits basic
54
- regular expressions using the operator '~', i.e. '~{perl-regex}'
55
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
56
- search.
57
- :param str path: Comma separated list of paths. Also admits basic
58
- regular expressions using the operator '~', i.e. '~{perl-regex}'
59
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
60
- search.
61
- :param str uri: Comma separated list of uris. Also admits basic
62
- regular expressions using the operator '~', i.e. '~{perl-regex}'
63
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
64
- search.
65
- :param str type: File type, either FILE or DIRECTORY.
66
- :param str bioformat: Comma separated Bioformat values. For existing
67
- Bioformats see files/bioformats.
68
- :param str format: Comma separated Format values. For existing Formats
69
- see files/formats.
70
- :param bool external: Boolean field indicating whether to filter by
71
- external or non external files.
72
- :param str status: Filter by status.
73
- :param str internal_status: Filter by internal status.
74
- :param str internal_variant_index_status: Filter by internal variant
75
- index status.
76
- :param str software_name: Software name.
77
- :param str directory: Directory under which we want to look for files
78
- or folders.
79
- :param str creation_date: Creation date. Format: yyyyMMddHHmmss.
80
- Examples: >2018, 2017-2018, <201805.
81
- :param str modification_date: Modification date. Format:
82
- yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
83
- :param str description: Description.
84
- :param str tags: Tags. Also admits basic regular expressions using the
85
- operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
86
- sensitive, '~/value/i' for case insensitive search.
87
- :param str size: File size.
88
- :param str sample_ids: Comma separated list sample IDs or UUIDs up to
89
- a maximum of 100.
90
- :param str job_id: Job ID that created the file(s) or folder(s).
91
- :param str annotation: Annotation filters. Example:
92
- age>30;gender=FEMALE. For more information, please visit
93
- http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
94
- :param str acl: Filter entries for which a user has the provided
95
- permissions. Format: acl={user}:{permissions}. Example:
96
- acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
97
- user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
98
- study owners or administrators can query by this field. .
99
- :param bool deleted: Boolean to retrieve deleted entries.
100
- :param str release: Release when it was created.
101
- :param str field: Field to apply aggregation statistics to (or a list
102
- of fields separated by semicolons), e.g.:
103
- studies;type;numSamples[0..10]:1;format:sum(size).
104
- """
105
-
106
- return self._get(category='files', resource='aggregationStats', **options)
107
-
108
- def load_annotation_sets(self, variable_set_id, path, data=None, **options):
109
- """
110
- Load annotation sets from a TSV file.
111
- PATH: /{apiVersion}/files/annotationSets/load
112
-
113
- :param str path: Path where the TSV file is located in OpenCGA or
114
- where it should be located. (REQUIRED)
115
- :param str variable_set_id: Variable set ID or name. (REQUIRED)
116
- :param str study: Study [[organization@]project:]study where study and
117
- project can be either the ID or UUID.
118
- :param bool parents: Flag indicating whether to create parent
119
- directories if they don't exist (only when TSV file was not
120
- previously associated).
121
- :param str annotation_set_id: Annotation set id. If not provided,
122
- variableSetId will be used.
123
- :param dict data: JSON containing the 'content' of the TSV file if
124
- this has not yet been registered into OpenCGA.
125
- """
126
-
127
- options['variableSetId'] = variable_set_id
128
- options['path'] = path
129
- return self._post(category='files', resource='load', subcategory='annotationSets', data=data, **options)
130
-
131
- def bioformats(self, **options):
132
- """
133
- List of accepted file bioformats.
134
- PATH: /{apiVersion}/files/bioformats
135
- """
136
-
137
- return self._get(category='files', resource='bioformats', **options)
138
-
139
- def create(self, data=None, **options):
140
- """
141
- Create file or folder.
142
- PATH: /{apiVersion}/files/create
143
-
144
- :param dict data: File parameters. (REQUIRED)
145
- :param str study: Study [[organization@]project:]study where study and
146
- project can be either the ID or UUID.
147
- :param bool parents: Create the parent directories if they do not
148
- exist.
149
- """
150
-
151
- return self._post(category='files', resource='create', data=data, **options)
152
-
153
- def distinct(self, field, **options):
154
- """
155
- File distinct method.
156
- PATH: /{apiVersion}/files/distinct
157
-
158
- :param str field: Comma separated list of fields for which to obtain
159
- the distinct values. (REQUIRED)
160
- :param str study: Study [[organization@]project:]study where study and
161
- project can be either the ID or UUID.
162
- :param str id: Comma separated list of file IDs up to a maximum of
163
- 100. Also admits basic regular expressions using the operator '~',
164
- i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i'
165
- for case insensitive search.
166
- :param str uuid: Comma separated list file UUIDs up to a maximum of
167
- 100.
168
- :param str name: Comma separated list of file names. Also admits basic
169
- regular expressions using the operator '~', i.e. '~{perl-regex}'
170
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
171
- search.
172
- :param str path: Comma separated list of paths. Also admits basic
173
- regular expressions using the operator '~', i.e. '~{perl-regex}'
174
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
175
- search.
176
- :param str uri: Comma separated list of uris. Also admits basic
177
- regular expressions using the operator '~', i.e. '~{perl-regex}'
178
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
179
- search.
180
- :param str type: File type, either FILE or DIRECTORY.
181
- :param str bioformat: Comma separated Bioformat values. For existing
182
- Bioformats see files/bioformats.
183
- :param str format: Comma separated Format values. For existing Formats
184
- see files/formats.
185
- :param bool external: Boolean field indicating whether to filter by
186
- external or non external files.
187
- :param bool resource: Boolean field indicating whether the file is a
188
- resource or not.
189
- :param str status: Filter by status.
190
- :param str internal_status: Filter by internal status.
191
- :param str internal_variant_index_status: Filter by internal variant
192
- index status.
193
- :param str software_name: Software name.
194
- :param str directory: Directory under which we want to look for files
195
- or folders.
196
- :param str creation_date: Creation date. Format: yyyyMMddHHmmss.
197
- Examples: >2018, 2017-2018, <201805.
198
- :param str modification_date: Modification date. Format:
199
- yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
200
- :param str description: Description.
201
- :param str tags: Tags. Also admits basic regular expressions using the
202
- operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
203
- sensitive, '~/value/i' for case insensitive search.
204
- :param str size: File size.
205
- :param str sample_ids: Comma separated list sample IDs or UUIDs up to
206
- a maximum of 100.
207
- :param str job_id: Job ID that created the file(s) or folder(s).
208
- :param str annotation: Annotation filters. Example:
209
- age>30;gender=FEMALE. For more information, please visit
210
- http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
211
- :param str acl: Filter entries for which a user has the provided
212
- permissions. Format: acl={user}:{permissions}. Example:
213
- acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
214
- user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
215
- study owners or administrators can query by this field. .
216
- :param bool deleted: Boolean to retrieve deleted entries.
217
- :param str release: Release when it was created.
218
- """
219
-
220
- options['field'] = field
221
- return self._get(category='files', resource='distinct', **options)
222
-
223
- def fetch(self, data=None, **options):
224
- """
225
- Download an external file to catalog and register it.
226
- PATH: /{apiVersion}/files/fetch
227
-
228
- :param dict data: Fetch parameters. (REQUIRED)
229
- :param str job_id: Job ID. It must be a unique string within the
230
- study. An ID will be autogenerated automatically if not provided.
231
- :param str job_description: Job description.
232
- :param str job_depends_on: Comma separated list of existing job IDs
233
- the job will depend on.
234
- :param str job_tags: Job tags.
235
- :param str job_scheduled_start_time: Time when the job is scheduled to
236
- start.
237
- :param str job_priority: Priority of the job.
238
- :param bool job_dry_run: Flag indicating that the job will be executed
239
- in dry-run mode. In this mode, OpenCGA will validate that all
240
- parameters and prerequisites are correctly set for successful
241
- execution, but the job will not actually run.
242
- :param str study: Study [[organization@]project:]study where study and
243
- project can be either the ID or UUID.
244
- """
245
-
246
- return self._post(category='files', resource='fetch', data=data, **options)
247
-
248
- def formats(self, **options):
249
- """
250
- List of accepted file formats.
251
- PATH: /{apiVersion}/files/formats
252
- """
253
-
254
- return self._get(category='files', resource='formats', **options)
255
-
256
- def link(self, data=None, **options):
257
- """
258
- Link an external file into catalog.
259
- PATH: /{apiVersion}/files/link
260
-
261
- :param dict data: File parameters. (REQUIRED)
262
- :param str study: Study [[organization@]project:]study where study and
263
- project can be either the ID or UUID.
264
- :param bool parents: Create the parent directories if they do not
265
- exist.
266
- """
267
-
268
- return self._post(category='files', resource='link', data=data, **options)
269
-
270
- def run_link(self, data=None, **options):
271
- """
272
- Link an external file into catalog asynchronously.
273
- PATH: /{apiVersion}/files/link/run
274
-
275
- :param dict data: File parameters. (REQUIRED)
276
- :param str study: Study [[organization@]project:]study where study and
277
- project can be either the ID or UUID.
278
- :param str job_id: Job ID. It must be a unique string within the
279
- study. An ID will be autogenerated automatically if not provided.
280
- :param str job_depends_on: Comma separated list of existing job IDs
281
- the job will depend on.
282
- :param str job_description: Job description.
283
- :param str job_tags: Job tags.
284
- :param str job_scheduled_start_time: Time when the job is scheduled to
285
- start.
286
- :param str job_priority: Priority of the job.
287
- :param bool job_dry_run: Flag indicating that the job will be executed
288
- in dry-run mode. In this mode, OpenCGA will validate that all
289
- parameters and prerequisites are correctly set for successful
290
- execution, but the job will not actually run.
291
- """
292
-
293
- return self._post(category='files', resource='run', subcategory='link', data=data, **options)
294
-
295
- def run_postlink(self, data=None, **options):
296
- """
297
- Associate non-registered samples for files with high volumes of
298
- samples.
299
- PATH: /{apiVersion}/files/postlink/run
300
-
301
- :param dict data: File parameters. (REQUIRED)
302
- :param str study: Study [[organization@]project:]study where study and
303
- project can be either the ID or UUID.
304
- :param str job_id: Job ID. It must be a unique string within the
305
- study. An ID will be autogenerated automatically if not provided.
306
- :param str job_depends_on: Comma separated list of existing job IDs
307
- the job will depend on.
308
- :param str job_description: Job description.
309
- :param str job_tags: Job tags.
310
- :param str job_scheduled_start_time: Time when the job is scheduled to
311
- start.
312
- :param str job_priority: Priority of the job.
313
- :param bool job_dry_run: Flag indicating that the job will be executed
314
- in dry-run mode. In this mode, OpenCGA will validate that all
315
- parameters and prerequisites are correctly set for successful
316
- execution, but the job will not actually run.
317
- """
318
-
319
- return self._post(category='files', resource='run', subcategory='postlink', data=data, **options)
320
-
321
- def search(self, **options):
322
- """
323
- File search method.
324
- PATH: /{apiVersion}/files/search
325
-
326
- :param str include: Fields included in the response, whole JSON path
327
- must be provided.
328
- :param str exclude: Fields excluded in the response, whole JSON path
329
- must be provided.
330
- :param int limit: Number of results to be returned.
331
- :param int skip: Number of results to skip.
332
- :param bool count: Get the total number of results matching the query.
333
- Deactivated by default.
334
- :param bool flatten_annotations: Boolean indicating to flatten the
335
- annotations.
336
- :param str study: Study [[organization@]project:]study where study and
337
- project can be either the ID or UUID.
338
- :param str id: Comma separated list of file IDs up to a maximum of
339
- 100. Also admits basic regular expressions using the operator '~',
340
- i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i'
341
- for case insensitive search.
342
- :param str uuid: Comma separated list file UUIDs up to a maximum of
343
- 100.
344
- :param str name: Comma separated list of file names. Also admits basic
345
- regular expressions using the operator '~', i.e. '~{perl-regex}'
346
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
347
- search.
348
- :param str path: Comma separated list of paths. Also admits basic
349
- regular expressions using the operator '~', i.e. '~{perl-regex}'
350
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
351
- search.
352
- :param str uri: Comma separated list of uris. Also admits basic
353
- regular expressions using the operator '~', i.e. '~{perl-regex}'
354
- e.g. '~value' for case sensitive, '~/value/i' for case insensitive
355
- search.
356
- :param str type: File type, either FILE or DIRECTORY.
357
- :param str bioformat: Comma separated Bioformat values. For existing
358
- Bioformats see files/bioformats.
359
- :param str format: Comma separated Format values. For existing Formats
360
- see files/formats.
361
- :param bool external: Boolean field indicating whether to filter by
362
- external or non external files.
363
- :param bool resource: Boolean field indicating whether the file is a
364
- resource or not.
365
- :param str status: Filter by status.
366
- :param str internal_status: Filter by internal status.
367
- :param str internal_variant_index_status: Filter by internal variant
368
- index status.
369
- :param str software_name: Software name.
370
- :param str directory: Directory under which we want to look for files
371
- or folders.
372
- :param str creation_date: Creation date. Format: yyyyMMddHHmmss.
373
- Examples: >2018, 2017-2018, <201805.
374
- :param str modification_date: Modification date. Format:
375
- yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
376
- :param str description: Description.
377
- :param str tags: Tags. Also admits basic regular expressions using the
378
- operator '~', i.e. '~{perl-regex}' e.g. '~value' for case
379
- sensitive, '~/value/i' for case insensitive search.
380
- :param str size: File size.
381
- :param str sample_ids: Comma separated list sample IDs or UUIDs up to
382
- a maximum of 100.
383
- :param str job_id: Job ID that created the file(s) or folder(s).
384
- :param str annotation: Annotation filters. Example:
385
- age>30;gender=FEMALE. For more information, please visit
386
- http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
387
- :param str acl: Filter entries for which a user has the provided
388
- permissions. Format: acl={user}:{permissions}. Example:
389
- acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
390
- user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
391
- study owners or administrators can query by this field. .
392
- :param bool deleted: Boolean to retrieve deleted entries.
393
- :param str release: Release when it was created.
394
- """
395
-
396
- return self._get(category='files', resource='search', **options)
397
-
398
- def upload(self, **options):
399
- """
400
- Resource to upload a file by chunks.
401
- PATH: /{apiVersion}/files/upload
402
-
403
- :param inputstream file: File to upload.
404
- :param str name: File name to overwrite the input fileName.
405
- :param str file_name: [DEPRECATED] File name to overwrite the input
406
- fileName.
407
- :param str format: File format. Allowed values: ['VCF BCF GVCF TBI
408
- BIGWIG SAM BAM BAI CRAM CRAI FASTQ FASTA PED TAB_SEPARATED_VALUES
409
- COMMA_SEPARATED_VALUES XML PROTOCOL_BUFFER JSON AVRO PARQUET PDF
410
- IMAGE PLAIN BINARY NONE UNKNOWN']
411
- :param str file_format: [DEPRECATED] File format. Allowed values:
412
- ['VCF BCF GVCF TBI BIGWIG SAM BAM BAI CRAM CRAI FASTQ FASTA PED
413
- TAB_SEPARATED_VALUES COMMA_SEPARATED_VALUES XML PROTOCOL_BUFFER
414
- JSON AVRO PARQUET PDF IMAGE PLAIN BINARY NONE UNKNOWN']
415
- :param str bioformat: File bioformat. Allowed values:
416
- ['MICROARRAY_EXPRESSION_ONECHANNEL_AGILENT
417
- MICROARRAY_EXPRESSION_ONECHANNEL_AFFYMETRIX
418
- MICROARRAY_EXPRESSION_ONECHANNEL_GENEPIX
419
- MICROARRAY_EXPRESSION_TWOCHANNELS_AGILENT
420
- MICROARRAY_EXPRESSION_TWOCHANNELS_GENEPIX DATAMATRIX_EXPRESSION
421
- IDLIST IDLIST_RANKED ANNOTATION_GENEVSANNOTATION OTHER_NEWICK
422
- OTHER_BLAST OTHER_INTERACTION OTHER_GENOTYPE OTHER_PLINK OTHER_VCF
423
- OTHER_PED VCF4 VARIANT ALIGNMENT COVERAGE SEQUENCE PEDIGREE
424
- REFERENCE_GENOME NONE UNKNOWN']
425
- :param str checksum: Expected MD5 file checksum.
426
- :param bool resource: Boolean field indicating whether the file is a
427
- resource or not.
428
- :param str study: Study [[organization@]project:]study where study and
429
- project can be either the ID or UUID.
430
- :param str relative_file_path: Path within catalog (directory) where
431
- the file will be located (default: root folder).
432
- :param str description: description.
433
- :param bool parents: Create the parent directories if they do not
434
- exist.
435
- """
436
-
437
- return self._post(category='files', resource='upload', **options)
438
-
439
- def acl(self, files, **options):
440
- """
441
- Return the acl defined for the file or folder. If member is provided,
442
- it will only return the acl for the member.
443
- PATH: /{apiVersion}/files/{files}/acl
444
-
445
- :param str files: Comma separated list of file IDs or names up to a
446
- maximum of 100. (REQUIRED)
447
- :param str study: Comma separated list of Studies
448
- [[organization@]project:]study where study and project can be
449
- either the ID or UUID up to a maximum of 100.
450
- :param str member: User or group id.
451
- :param bool silent: Boolean to retrieve all possible entries that are
452
- queried for, false to raise an exception whenever one of the
453
- entries looked for cannot be shown for whichever reason.
454
- """
455
-
456
- return self._get(category='files', resource='acl', query_id=files, **options)
457
-
458
- def delete(self, files, **options):
459
- """
460
- Delete existing files and folders.
461
- PATH: /{apiVersion}/files/{files}/delete
462
-
463
- :param str files: Comma separated list of file ids, names or paths.
464
- (REQUIRED)
465
- :param str study: Study [[organization@]project:]study where study and
466
- project can be either the ID or UUID.
467
- :param bool skip_trash: Skip trash and delete the files/folders from
468
- disk directly (CANNOT BE RECOVERED).
469
- """
470
-
471
- return self._delete(category='files', resource='delete', query_id=files, **options)
472
-
473
- def info(self, files, **options):
474
- """
475
- File info.
476
- PATH: /{apiVersion}/files/{files}/info
477
-
478
- :param str files: Comma separated list of file IDs or names up to a
479
- maximum of 100. (REQUIRED)
480
- :param str include: Fields included in the response, whole JSON path
481
- must be provided.
482
- :param str exclude: Fields excluded in the response, whole JSON path
483
- must be provided.
484
- :param bool flatten_annotations: Flatten the annotations?.
485
- :param str study: Study [[organization@]project:]study where study and
486
- project can be either the ID or UUID.
487
- :param bool deleted: Boolean to retrieve deleted files.
488
- """
489
-
490
- return self._get(category='files', resource='info', query_id=files, **options)
491
-
492
- def unlink(self, files, **options):
493
- """
494
- Unlink linked files and folders.
495
- PATH: /{apiVersion}/files/{files}/unlink
496
-
497
- :param str files: Comma separated list of file ids, names or paths.
498
- (REQUIRED)
499
- :param str study: Study [[organization@]project:]study where study and
500
- project can be either the ID or UUID.
501
- """
502
-
503
- return self._delete(category='files', resource='unlink', query_id=files, **options)
504
-
505
- def update(self, files, data=None, **options):
506
- """
507
- Update some file attributes.
508
- PATH: /{apiVersion}/files/{files}/update
509
-
510
- :param dict data: Parameters to modify. (REQUIRED)
511
- :param str files: Comma separated list of file ids, names or paths.
512
- Paths must be separated by : instead of /. (REQUIRED)
513
- :param str include: Fields included in the response, whole JSON path
514
- must be provided.
515
- :param str exclude: Fields excluded in the response, whole JSON path
516
- must be provided.
517
- :param str study: Study [[organization@]project:]study where study and
518
- project can be either the ID or UUID.
519
- :param str sample_ids_action: Action to be performed if the array of
520
- samples is being updated. Allowed values: ['ADD SET REMOVE']
521
- :param str annotation_sets_action: Action to be performed if the array
522
- of annotationSets is being updated. Allowed values: ['ADD SET
523
- REMOVE']
524
- :param str related_files_action: Action to be performed if the array
525
- of relatedFiles is being updated. Allowed values: ['ADD SET
526
- REMOVE']
527
- :param str tags_action: Action to be performed if the array of tags is
528
- being updated. Allowed values: ['ADD SET REMOVE']
529
- """
530
-
531
- return self._post(category='files', resource='update', query_id=files, data=data, **options)
532
-
533
- def update_annotation_sets_annotations(self, file, annotation_set, data=None, **options):
534
- """
535
- Update annotations from an annotationSet.
536
- PATH: /{apiVersion}/files/{file}/annotationSets/{annotationSet}/annotations/update
537
-
538
- :param str annotation_set: AnnotationSet ID to be updated. (REQUIRED)
539
- :param str file: File id, name or path. Paths must be separated by :
540
- instead of /. (REQUIRED)
541
- :param str study: Study [[organization@]project:]study where study and
542
- project can be either the ID or UUID.
543
- :param str action: Action to be performed: ADD to add new annotations;
544
- REPLACE to replace the value of an already existing annotation; SET
545
- to set the new list of annotations removing any possible old
546
- annotations; REMOVE to remove some annotations; RESET to set some
547
- annotations to the default value configured in the corresponding
548
- variables of the VariableSet if any. Allowed values: ['ADD SET
549
- REMOVE RESET REPLACE']
550
- :param dict data: Json containing the map of annotations when the
551
- action is ADD, SET or REPLACE, a json with only the key 'remove'
552
- containing the comma separated variables to be removed as a value
553
- when the action is REMOVE or a json with only the key 'reset'
554
- containing the comma separated variables that will be set to the
555
- default value when the action is RESET.
556
- """
557
-
558
- return self._post(category='files', resource='annotations/update', query_id=file, subcategory='annotationSets', second_query_id=annotation_set, data=data, **options)
559
-
560
- def download(self, file, **options):
561
- """
562
- Download file.
563
- PATH: /{apiVersion}/files/{file}/download
564
-
565
- :param str file: File id, name or path. Paths must be separated by :
566
- instead of /. (REQUIRED)
567
- :param str study: Study [[organization@]project:]study where study and
568
- project can be either the ID or UUID.
569
- """
570
-
571
- return self._get(category='files', resource='download', query_id=file, **options)
572
-
573
- def grep(self, file, **options):
574
- """
575
- Filter lines of the file containing the pattern.
576
- PATH: /{apiVersion}/files/{file}/grep
577
-
578
- :param str file: File uuid, id, or name. (REQUIRED)
579
- :param str study: Study [[organization@]project:]study where study and
580
- project can be either the ID or UUID.
581
- :param str pattern: String pattern.
582
- :param bool ignore_case: Flag to perform a case insensitive search.
583
- :param int max_count: Stop reading a file after 'n' matching lines. 0
584
- means no limit.
585
- """
586
-
587
- return self._get(category='files', resource='grep', query_id=file, **options)
588
-
589
- def head(self, file, **options):
590
- """
591
- Show the first lines of a file (up to a limit).
592
- PATH: /{apiVersion}/files/{file}/head
593
-
594
- :param str file: File uuid, id, or name. (REQUIRED)
595
- :param str study: Study [[organization@]project:]study where study and
596
- project can be either the ID or UUID.
597
- :param int offset: Starting byte from which the file will be read.
598
- :param int lines: Maximum number of lines to be returned up to a
599
- maximum of 1000.
600
- """
601
-
602
- return self._get(category='files', resource='head', query_id=file, **options)
603
-
604
- def image(self, file, **options):
605
- """
606
- Obtain the base64 content of an image.
607
- PATH: /{apiVersion}/files/{file}/image
608
-
609
- :param str file: File ID. (REQUIRED)
610
- :param str study: Study [[organization@]project:]study where study and
611
- project can be either the ID or UUID.
612
- """
613
-
614
- return self._get(category='files', resource='image', query_id=file, **options)
615
-
616
- def move(self, file, data=None, **options):
617
- """
618
- Move file to a different path.
619
- PATH: /{apiVersion}/files/{file}/move
620
-
621
- :param dict data: Parameters to modify. (REQUIRED)
622
- :param str file: File id, UUID or name. (REQUIRED)
623
- :param str include: Fields included in the response, whole JSON path
624
- must be provided.
625
- :param str exclude: Fields excluded in the response, whole JSON path
626
- must be provided.
627
- :param str study: Study [[organization@]project:]study where study and
628
- project can be either the ID or UUID.
629
- """
630
-
631
- return self._post(category='files', resource='move', query_id=file, data=data, **options)
632
-
633
- def refresh(self, file, **options):
634
- """
635
- Refresh metadata from the selected file or folder. Return updated
636
- files.
637
- PATH: /{apiVersion}/files/{file}/refresh
638
-
639
- :param str file: File id, name or path. Paths must be separated by :
640
- instead of /. (REQUIRED)
641
- :param str study: Study [[organization@]project:]study where study and
642
- project can be either the ID or UUID.
643
- """
644
-
645
- return self._get(category='files', resource='refresh', query_id=file, **options)
646
-
647
- def tail(self, file, **options):
648
- """
649
- Show the last lines of a file (up to a limit).
650
- PATH: /{apiVersion}/files/{file}/tail
651
-
652
- :param str file: File uuid, id, or name. (REQUIRED)
653
- :param str study: Study [[organization@]project:]study where study and
654
- project can be either the ID or UUID.
655
- :param int lines: Maximum number of lines to be returned up to a
656
- maximum of 1000.
657
- """
658
-
659
- return self._get(category='files', resource='tail', query_id=file, **options)
660
-
661
- def list(self, folder, **options):
662
- """
663
- List all the files inside the folder.
664
- PATH: /{apiVersion}/files/{folder}/list
665
-
666
- :param str folder: Folder ID, name or path. (REQUIRED)
667
- :param str include: Fields included in the response, whole JSON path
668
- must be provided.
669
- :param str exclude: Fields excluded in the response, whole JSON path
670
- must be provided.
671
- :param int limit: Number of results to be returned.
672
- :param int skip: Number of results to skip.
673
- :param bool count: Get the total number of results matching the query.
674
- Deactivated by default.
675
- :param str study: Study [[organization@]project:]study where study and
676
- project can be either the ID or UUID.
677
- """
678
-
679
- return self._get(category='files', resource='list', query_id=folder, **options)
680
-
681
- def tree(self, folder, **options):
682
- """
683
- Obtain a tree view of the files and folders within a folder.
684
- PATH: /{apiVersion}/files/{folder}/tree
685
-
686
- :param str folder: Folder id or name. Paths must be separated by :
687
- instead of /. (REQUIRED)
688
- :param str include: Fields included in the response, whole JSON path
689
- must be provided.
690
- :param str exclude: Fields excluded in the response, whole JSON path
691
- must be provided.
692
- :param str study: Study [[organization@]project:]study where study and
693
- project can be either the ID or UUID.
694
- :param int max_depth: Maximum depth to get files from.
695
- """
696
-
697
- return self._get(category='files', resource='tree', query_id=folder, **options)
698
-