pyxetabase 4.0.0.dev0__py3-none-any.whl → 4.0.0.dev1__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-4.0.0.dev0.dist-info → pyxetabase-4.0.0.dev1.dist-info}/METADATA +1 -1
- {pyxetabase-4.0.0.dev0.dist-info → pyxetabase-4.0.0.dev1.dist-info}/RECORD +5 -33
- 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-4.0.0.dev0.dist-info → pyxetabase-4.0.0.dev1.dist-info}/WHEEL +0 -0
- {pyxetabase-4.0.0.dev0.dist-info → pyxetabase-4.0.0.dev1.dist-info}/licenses/LICENSE +0 -0
- {pyxetabase-4.0.0.dev0.dist-info → pyxetabase-4.0.0.dev1.dist-info}/top_level.txt +0 -0
|
@@ -1,446 +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 Sample(_ParentRestClient):
|
|
14
|
-
"""
|
|
15
|
-
This class contains methods for the 'Samples' webservices
|
|
16
|
-
PATH: /{apiVersion}/samples
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
def __init__(self, configuration, token=None, login_handler=None, *args, **kwargs):
|
|
20
|
-
super(Sample, 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}/samples/acl/{members}/update
|
|
26
|
-
|
|
27
|
-
:param dict data: JSON containing the parameters to update the
|
|
28
|
-
permissions. If propagate flag is set to true, it will propagate
|
|
29
|
-
the permissions defined to the individuals that are associated to
|
|
30
|
-
the matching samples. (REQUIRED)
|
|
31
|
-
:param str action: Action to be performed [ADD, SET, REMOVE or RESET].
|
|
32
|
-
Allowed values: ['SET ADD REMOVE RESET'] (REQUIRED)
|
|
33
|
-
:param str members: Comma separated list of user or group ids.
|
|
34
|
-
(REQUIRED)
|
|
35
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
36
|
-
project can be either the ID or UUID.
|
|
37
|
-
"""
|
|
38
|
-
|
|
39
|
-
options['action'] = action
|
|
40
|
-
return self._post(category='samples', resource='update', subcategory='acl', second_query_id=members, data=data, **options)
|
|
41
|
-
|
|
42
|
-
def aggregation_stats(self, **options):
|
|
43
|
-
"""
|
|
44
|
-
Fetch catalog sample stats.
|
|
45
|
-
PATH: /{apiVersion}/samples/aggregationStats
|
|
46
|
-
|
|
47
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
48
|
-
project can be either the ID or UUID.
|
|
49
|
-
:param str id: Comma separated list sample IDs up to a maximum of 100.
|
|
50
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
51
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
52
|
-
case insensitive search.
|
|
53
|
-
:param str uuid: Comma separated list sample UUIDs up to a maximum of
|
|
54
|
-
100.
|
|
55
|
-
:param bool somatic: Somatic sample.
|
|
56
|
-
:param str individual_id: Individual ID or UUID.
|
|
57
|
-
:param str file_ids: Comma separated list of file IDs, paths or UUIDs.
|
|
58
|
-
:param str cohort_ids: Comma separated list of cohort IDs.
|
|
59
|
-
:param str creation_date: Creation date. Format: yyyyMMddHHmmss.
|
|
60
|
-
Examples: >2018, 2017-2018, <201805.
|
|
61
|
-
:param str modification_date: Modification date. Format:
|
|
62
|
-
yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
63
|
-
:param str internal_status: Filter by internal status.
|
|
64
|
-
:param str status: Filter by status.
|
|
65
|
-
:param str processing_product: Processing product.
|
|
66
|
-
:param str processing_preparation_method: Processing preparation
|
|
67
|
-
method.
|
|
68
|
-
:param str processing_extraction_method: Processing extraction method.
|
|
69
|
-
:param str processing_lab_sample_id: Processing lab sample id.
|
|
70
|
-
:param str collection_from: Collection from.
|
|
71
|
-
:param str collection_type: Collection type.
|
|
72
|
-
:param str collection_method: Collection method.
|
|
73
|
-
:param str phenotypes: Comma separated list of phenotype ids or names.
|
|
74
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
75
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
76
|
-
case insensitive search.
|
|
77
|
-
:param str annotation: Annotation filters. Example:
|
|
78
|
-
age>30;gender=FEMALE. For more information, please visit
|
|
79
|
-
http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
|
|
80
|
-
:param str acl: Filter entries for which a user has the provided
|
|
81
|
-
permissions. Format: acl={user}:{permissions}. Example:
|
|
82
|
-
acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
|
|
83
|
-
user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
|
|
84
|
-
study owners or administrators can query by this field. .
|
|
85
|
-
:param str internal_rga_status: Index status of the sample for the
|
|
86
|
-
Recessive Gene Analysis. Allowed values: ['NOT_INDEXED INDEXED
|
|
87
|
-
INVALID_PERMISSIONS INVALID_METADATA INVALID']
|
|
88
|
-
:param str release: Release when it was created.
|
|
89
|
-
:param int snapshot: Snapshot value (Latest version of the entry in
|
|
90
|
-
the specified release).
|
|
91
|
-
:param bool deleted: Boolean to retrieve deleted entries.
|
|
92
|
-
:param str stats_id: Sample variant stats Id. If this field is not
|
|
93
|
-
provided and the user filters by other stats fields, it will
|
|
94
|
-
automatically be set to ALL.
|
|
95
|
-
:param str stats_variant_count: Sample variant stats VariantCount.
|
|
96
|
-
:param str stats_chromosome_count: Sample variant stats
|
|
97
|
-
ChromosomeCount.
|
|
98
|
-
:param str stats_type_count: Sample variant stats TypeCount.
|
|
99
|
-
:param str stats_genotype_count: Sample variant stats GenotypeCount.
|
|
100
|
-
:param str stats_ti_tv_ratio: Sample variant stats TiTvRatio.
|
|
101
|
-
:param str stats_quality_avg: Sample variant stats QualityAvg.
|
|
102
|
-
:param str stats_quality_std_dev: Sample variant stats QualityStdDev.
|
|
103
|
-
:param str stats_heterozygosity_rate: Sample variant stats
|
|
104
|
-
HeterozygosityRate.
|
|
105
|
-
:param str stats_depth_count: Sample variant stats DepthCount.
|
|
106
|
-
:param str stats_biotype_count: Sample variant stats BiotypeCount.
|
|
107
|
-
:param str stats_clinical_significance_count: Sample variant stats
|
|
108
|
-
ClinicalSignificanceCount.
|
|
109
|
-
:param str stats_consequence_type_count: Sample variant stats
|
|
110
|
-
ConsequenceTypeCount.
|
|
111
|
-
:param str field: Field to apply aggregation statistics to (or a list
|
|
112
|
-
of fields separated by semicolons), e.g.:
|
|
113
|
-
studies;type;numSamples[0..10]:1;format:sum(size).
|
|
114
|
-
"""
|
|
115
|
-
|
|
116
|
-
return self._get(category='samples', resource='aggregationStats', **options)
|
|
117
|
-
|
|
118
|
-
def load_annotation_sets(self, variable_set_id, path, data=None, **options):
|
|
119
|
-
"""
|
|
120
|
-
Load annotation sets from a TSV file.
|
|
121
|
-
PATH: /{apiVersion}/samples/annotationSets/load
|
|
122
|
-
|
|
123
|
-
:param str path: Path where the TSV file is located in OpenCGA or
|
|
124
|
-
where it should be located. (REQUIRED)
|
|
125
|
-
:param str variable_set_id: Variable set ID or name. (REQUIRED)
|
|
126
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
127
|
-
project can be either the ID or UUID.
|
|
128
|
-
:param bool parents: Flag indicating whether to create parent
|
|
129
|
-
directories if they don't exist (only when TSV file was not
|
|
130
|
-
previously associated).
|
|
131
|
-
:param str annotation_set_id: Annotation set id. If not provided,
|
|
132
|
-
variableSetId will be used.
|
|
133
|
-
:param dict data: JSON containing the 'content' of the TSV file if
|
|
134
|
-
this has not yet been registered into OpenCGA.
|
|
135
|
-
"""
|
|
136
|
-
|
|
137
|
-
options['variableSetId'] = variable_set_id
|
|
138
|
-
options['path'] = path
|
|
139
|
-
return self._post(category='samples', resource='load', subcategory='annotationSets', data=data, **options)
|
|
140
|
-
|
|
141
|
-
def create(self, data=None, **options):
|
|
142
|
-
"""
|
|
143
|
-
Create sample.
|
|
144
|
-
PATH: /{apiVersion}/samples/create
|
|
145
|
-
|
|
146
|
-
:param dict data: JSON containing sample information. (REQUIRED)
|
|
147
|
-
:param str include: Fields included in the response, whole JSON path
|
|
148
|
-
must be provided.
|
|
149
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
150
|
-
must be provided.
|
|
151
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
152
|
-
project can be either the ID or UUID.
|
|
153
|
-
:param bool include_result: Flag indicating to include the created or
|
|
154
|
-
updated document result in the response.
|
|
155
|
-
"""
|
|
156
|
-
|
|
157
|
-
return self._post(category='samples', resource='create', data=data, **options)
|
|
158
|
-
|
|
159
|
-
def distinct(self, field, **options):
|
|
160
|
-
"""
|
|
161
|
-
Sample distinct method.
|
|
162
|
-
PATH: /{apiVersion}/samples/distinct
|
|
163
|
-
|
|
164
|
-
:param str field: Comma separated list of fields for which to obtain
|
|
165
|
-
the distinct values. (REQUIRED)
|
|
166
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
167
|
-
project can be either the ID or UUID.
|
|
168
|
-
:param str id: Comma separated list sample IDs up to a maximum of 100.
|
|
169
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
170
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
171
|
-
case insensitive search.
|
|
172
|
-
:param str uuid: Comma separated list sample UUIDs up to a maximum of
|
|
173
|
-
100.
|
|
174
|
-
:param bool somatic: Somatic sample.
|
|
175
|
-
:param str individual_id: Individual ID or UUID.
|
|
176
|
-
:param str file_ids: Comma separated list of file IDs, paths or UUIDs.
|
|
177
|
-
:param str cohort_ids: Comma separated list of cohort IDs.
|
|
178
|
-
:param str creation_date: Creation date. Format: yyyyMMddHHmmss.
|
|
179
|
-
Examples: >2018, 2017-2018, <201805.
|
|
180
|
-
:param str modification_date: Modification date. Format:
|
|
181
|
-
yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
182
|
-
:param str internal_status: Filter by internal status.
|
|
183
|
-
:param str status: Filter by status.
|
|
184
|
-
:param str processing_product: Processing product.
|
|
185
|
-
:param str processing_preparation_method: Processing preparation
|
|
186
|
-
method.
|
|
187
|
-
:param str processing_extraction_method: Processing extraction method.
|
|
188
|
-
:param str processing_lab_sample_id: Processing lab sample id.
|
|
189
|
-
:param str collection_from: Collection from.
|
|
190
|
-
:param str collection_type: Collection type.
|
|
191
|
-
:param str collection_method: Collection method.
|
|
192
|
-
:param str phenotypes: Comma separated list of phenotype ids or names.
|
|
193
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
194
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
195
|
-
case insensitive search.
|
|
196
|
-
:param str annotation: Annotation filters. Example:
|
|
197
|
-
age>30;gender=FEMALE. For more information, please visit
|
|
198
|
-
http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
|
|
199
|
-
:param str acl: Filter entries for which a user has the provided
|
|
200
|
-
permissions. Format: acl={user}:{permissions}. Example:
|
|
201
|
-
acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
|
|
202
|
-
user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
|
|
203
|
-
study owners or administrators can query by this field. .
|
|
204
|
-
:param str internal_rga_status: Index status of the sample for the
|
|
205
|
-
Recessive Gene Analysis. Allowed values: ['NOT_INDEXED INDEXED
|
|
206
|
-
INVALID_PERMISSIONS INVALID_METADATA INVALID']
|
|
207
|
-
:param str release: Release when it was created.
|
|
208
|
-
:param int snapshot: Snapshot value (Latest version of the entry in
|
|
209
|
-
the specified release).
|
|
210
|
-
:param bool deleted: Boolean to retrieve deleted entries.
|
|
211
|
-
:param str stats_id: Sample variant stats Id. If this field is not
|
|
212
|
-
provided and the user filters by other stats fields, it will
|
|
213
|
-
automatically be set to ALL.
|
|
214
|
-
:param str stats_variant_count: Sample variant stats VariantCount.
|
|
215
|
-
:param str stats_chromosome_count: Sample variant stats
|
|
216
|
-
ChromosomeCount.
|
|
217
|
-
:param str stats_type_count: Sample variant stats TypeCount.
|
|
218
|
-
:param str stats_genotype_count: Sample variant stats GenotypeCount.
|
|
219
|
-
:param str stats_ti_tv_ratio: Sample variant stats TiTvRatio.
|
|
220
|
-
:param str stats_quality_avg: Sample variant stats QualityAvg.
|
|
221
|
-
:param str stats_quality_std_dev: Sample variant stats QualityStdDev.
|
|
222
|
-
:param str stats_heterozygosity_rate: Sample variant stats
|
|
223
|
-
HeterozygosityRate.
|
|
224
|
-
:param str stats_depth_count: Sample variant stats DepthCount.
|
|
225
|
-
:param str stats_biotype_count: Sample variant stats BiotypeCount.
|
|
226
|
-
:param str stats_clinical_significance_count: Sample variant stats
|
|
227
|
-
ClinicalSignificanceCount.
|
|
228
|
-
:param str stats_consequence_type_count: Sample variant stats
|
|
229
|
-
ConsequenceTypeCount.
|
|
230
|
-
"""
|
|
231
|
-
|
|
232
|
-
options['field'] = field
|
|
233
|
-
return self._get(category='samples', resource='distinct', **options)
|
|
234
|
-
|
|
235
|
-
def load(self, file, **options):
|
|
236
|
-
"""
|
|
237
|
-
Load samples from a ped file [EXPERIMENTAL].
|
|
238
|
-
PATH: /{apiVersion}/samples/load
|
|
239
|
-
|
|
240
|
-
:param str file: file. (REQUIRED)
|
|
241
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
242
|
-
project can be either the ID or UUID.
|
|
243
|
-
:param str variable_set: variableSet.
|
|
244
|
-
"""
|
|
245
|
-
|
|
246
|
-
options['file'] = file
|
|
247
|
-
return self._get(category='samples', resource='load', **options)
|
|
248
|
-
|
|
249
|
-
def search(self, **options):
|
|
250
|
-
"""
|
|
251
|
-
Sample search method.
|
|
252
|
-
PATH: /{apiVersion}/samples/search
|
|
253
|
-
|
|
254
|
-
:param str include: Fields included in the response, whole JSON path
|
|
255
|
-
must be provided.
|
|
256
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
257
|
-
must be provided.
|
|
258
|
-
:param int limit: Number of results to be returned.
|
|
259
|
-
:param int skip: Number of results to skip.
|
|
260
|
-
:param bool count: Get the total number of results matching the query.
|
|
261
|
-
Deactivated by default.
|
|
262
|
-
:param bool include_individual: Include Individual object as an
|
|
263
|
-
attribute.
|
|
264
|
-
:param bool flatten_annotations: Flatten the annotations?.
|
|
265
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
266
|
-
project can be either the ID or UUID.
|
|
267
|
-
:param str id: Comma separated list sample IDs up to a maximum of 100.
|
|
268
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
269
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
270
|
-
case insensitive search.
|
|
271
|
-
:param str uuid: Comma separated list sample UUIDs up to a maximum of
|
|
272
|
-
100.
|
|
273
|
-
:param bool somatic: Somatic sample.
|
|
274
|
-
:param str individual_id: Individual ID or UUID.
|
|
275
|
-
:param str file_ids: Comma separated list of file IDs, paths or UUIDs.
|
|
276
|
-
:param str cohort_ids: Comma separated list of cohort IDs.
|
|
277
|
-
:param str creation_date: Creation date. Format: yyyyMMddHHmmss.
|
|
278
|
-
Examples: >2018, 2017-2018, <201805.
|
|
279
|
-
:param str modification_date: Modification date. Format:
|
|
280
|
-
yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
281
|
-
:param str internal_status: Filter by internal status.
|
|
282
|
-
:param str status: Filter by status.
|
|
283
|
-
:param str processing_product: Processing product.
|
|
284
|
-
:param str processing_preparation_method: Processing preparation
|
|
285
|
-
method.
|
|
286
|
-
:param str processing_extraction_method: Processing extraction method.
|
|
287
|
-
:param str processing_lab_sample_id: Processing lab sample id.
|
|
288
|
-
:param str collection_from: Collection from.
|
|
289
|
-
:param str collection_type: Collection type.
|
|
290
|
-
:param str collection_method: Collection method.
|
|
291
|
-
:param str phenotypes: Comma separated list of phenotype ids or names.
|
|
292
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
293
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
294
|
-
case insensitive search.
|
|
295
|
-
:param str annotation: Annotation filters. Example:
|
|
296
|
-
age>30;gender=FEMALE. For more information, please visit
|
|
297
|
-
http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
|
|
298
|
-
:param str acl: Filter entries for which a user has the provided
|
|
299
|
-
permissions. Format: acl={user}:{permissions}. Example:
|
|
300
|
-
acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
|
|
301
|
-
user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
|
|
302
|
-
study owners or administrators can query by this field. .
|
|
303
|
-
:param str internal_rga_status: Index status of the sample for the
|
|
304
|
-
Recessive Gene Analysis. Allowed values: ['NOT_INDEXED INDEXED
|
|
305
|
-
INVALID_PERMISSIONS INVALID_METADATA INVALID']
|
|
306
|
-
:param str release: Release when it was created.
|
|
307
|
-
:param int snapshot: Snapshot value (Latest version of the entry in
|
|
308
|
-
the specified release).
|
|
309
|
-
:param bool deleted: Boolean to retrieve deleted entries.
|
|
310
|
-
:param str stats_id: Sample variant stats Id. If this field is not
|
|
311
|
-
provided and the user filters by other stats fields, it will
|
|
312
|
-
automatically be set to ALL.
|
|
313
|
-
:param str stats_variant_count: Sample variant stats VariantCount.
|
|
314
|
-
:param str stats_chromosome_count: Sample variant stats
|
|
315
|
-
ChromosomeCount.
|
|
316
|
-
:param str stats_type_count: Sample variant stats TypeCount.
|
|
317
|
-
:param str stats_genotype_count: Sample variant stats GenotypeCount.
|
|
318
|
-
:param str stats_ti_tv_ratio: Sample variant stats TiTvRatio.
|
|
319
|
-
:param str stats_quality_avg: Sample variant stats QualityAvg.
|
|
320
|
-
:param str stats_quality_std_dev: Sample variant stats QualityStdDev.
|
|
321
|
-
:param str stats_heterozygosity_rate: Sample variant stats
|
|
322
|
-
HeterozygosityRate.
|
|
323
|
-
:param str stats_depth_count: Sample variant stats DepthCount.
|
|
324
|
-
:param str stats_biotype_count: Sample variant stats BiotypeCount.
|
|
325
|
-
:param str stats_clinical_significance_count: Sample variant stats
|
|
326
|
-
ClinicalSignificanceCount.
|
|
327
|
-
:param str stats_consequence_type_count: Sample variant stats
|
|
328
|
-
ConsequenceTypeCount.
|
|
329
|
-
"""
|
|
330
|
-
|
|
331
|
-
return self._get(category='samples', resource='search', **options)
|
|
332
|
-
|
|
333
|
-
def acl(self, samples, **options):
|
|
334
|
-
"""
|
|
335
|
-
Returns the acl of the samples. If member is provided, it will only
|
|
336
|
-
return the acl for the member.
|
|
337
|
-
PATH: /{apiVersion}/samples/{samples}/acl
|
|
338
|
-
|
|
339
|
-
:param str samples: Comma separated list sample IDs or UUIDs up to a
|
|
340
|
-
maximum of 100. (REQUIRED)
|
|
341
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
342
|
-
project can be either the ID or UUID.
|
|
343
|
-
:param str member: User or group id.
|
|
344
|
-
:param bool silent: Boolean to retrieve all possible entries that are
|
|
345
|
-
queried for, false to raise an exception whenever one of the
|
|
346
|
-
entries looked for cannot be shown for whichever reason.
|
|
347
|
-
"""
|
|
348
|
-
|
|
349
|
-
return self._get(category='samples', resource='acl', query_id=samples, **options)
|
|
350
|
-
|
|
351
|
-
def delete(self, samples, **options):
|
|
352
|
-
"""
|
|
353
|
-
Delete samples.
|
|
354
|
-
PATH: /{apiVersion}/samples/{samples}/delete
|
|
355
|
-
|
|
356
|
-
:param str samples: Comma separated list sample IDs or UUIDs up to a
|
|
357
|
-
maximum of 100. (REQUIRED)
|
|
358
|
-
:param bool force: Force the deletion of samples even if they are
|
|
359
|
-
associated to files, individuals or cohorts.
|
|
360
|
-
:param str empty_files_action: Action to be performed over files that
|
|
361
|
-
were associated only to the sample to be deleted. Possible actions
|
|
362
|
-
are NONE, TRASH, DELETE.
|
|
363
|
-
:param bool delete_empty_cohorts: Boolean indicating if the cohorts
|
|
364
|
-
associated only to the sample to be deleted should be also deleted.
|
|
365
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
366
|
-
project can be either the ID or UUID.
|
|
367
|
-
"""
|
|
368
|
-
|
|
369
|
-
return self._delete(category='samples', resource='delete', query_id=samples, **options)
|
|
370
|
-
|
|
371
|
-
def info(self, samples, **options):
|
|
372
|
-
"""
|
|
373
|
-
Get sample information.
|
|
374
|
-
PATH: /{apiVersion}/samples/{samples}/info
|
|
375
|
-
|
|
376
|
-
:param str samples: Comma separated list sample IDs or UUIDs up to a
|
|
377
|
-
maximum of 100. (REQUIRED)
|
|
378
|
-
:param str include: Fields included in the response, whole JSON path
|
|
379
|
-
must be provided.
|
|
380
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
381
|
-
must be provided.
|
|
382
|
-
:param bool include_individual: Include Individual object as an
|
|
383
|
-
attribute.
|
|
384
|
-
:param bool flatten_annotations: Flatten the annotations?.
|
|
385
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
386
|
-
project can be either the ID or UUID.
|
|
387
|
-
:param str version: Comma separated list of sample versions. 'all' to
|
|
388
|
-
get all the sample versions. Not supported if multiple sample ids
|
|
389
|
-
are provided.
|
|
390
|
-
:param bool deleted: Boolean to retrieve deleted entries.
|
|
391
|
-
"""
|
|
392
|
-
|
|
393
|
-
return self._get(category='samples', resource='info', query_id=samples, **options)
|
|
394
|
-
|
|
395
|
-
def update(self, samples, data=None, **options):
|
|
396
|
-
"""
|
|
397
|
-
Update some sample attributes.
|
|
398
|
-
PATH: /{apiVersion}/samples/{samples}/update
|
|
399
|
-
|
|
400
|
-
:param str samples: Comma separated list sample IDs or UUIDs up to a
|
|
401
|
-
maximum of 100. (REQUIRED)
|
|
402
|
-
:param str include: Fields included in the response, whole JSON path
|
|
403
|
-
must be provided.
|
|
404
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
405
|
-
must be provided.
|
|
406
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
407
|
-
project can be either the ID or UUID.
|
|
408
|
-
:param str annotation_sets_action: Action to be performed if the array
|
|
409
|
-
of annotationSets is being updated. Allowed values: ['ADD SET
|
|
410
|
-
REMOVE']
|
|
411
|
-
:param str phenotypes_action: Action to be performed if the array of
|
|
412
|
-
phenotypes is being updated [SET, ADD, REMOVE]. Allowed values:
|
|
413
|
-
['ADD SET REMOVE']
|
|
414
|
-
:param bool include_result: Flag indicating to include the created or
|
|
415
|
-
updated document result in the response.
|
|
416
|
-
:param dict data: body.
|
|
417
|
-
"""
|
|
418
|
-
|
|
419
|
-
return self._post(category='samples', resource='update', query_id=samples, data=data, **options)
|
|
420
|
-
|
|
421
|
-
def update_annotation_sets_annotations(self, sample, annotation_set, data=None, **options):
|
|
422
|
-
"""
|
|
423
|
-
Update annotations from an annotationSet.
|
|
424
|
-
PATH: /{apiVersion}/samples/{sample}/annotationSets/{annotationSet}/annotations/update
|
|
425
|
-
|
|
426
|
-
:param str annotation_set: AnnotationSet ID to be updated. (REQUIRED)
|
|
427
|
-
:param str sample: Sample ID. (REQUIRED)
|
|
428
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
429
|
-
project can be either the ID or UUID.
|
|
430
|
-
:param str action: Action to be performed: ADD to add new annotations;
|
|
431
|
-
REPLACE to replace the value of an already existing annotation; SET
|
|
432
|
-
to set the new list of annotations removing any possible old
|
|
433
|
-
annotations; REMOVE to remove some annotations; RESET to set some
|
|
434
|
-
annotations to the default value configured in the corresponding
|
|
435
|
-
variables of the VariableSet if any. Allowed values: ['ADD SET
|
|
436
|
-
REMOVE RESET REPLACE']
|
|
437
|
-
:param dict data: Json containing the map of annotations when the
|
|
438
|
-
action is ADD, SET or REPLACE, a json with only the key 'remove'
|
|
439
|
-
containing the comma separated variables to be removed as a value
|
|
440
|
-
when the action is REMOVE or a json with only the key 'reset'
|
|
441
|
-
containing the comma separated variables that will be set to the
|
|
442
|
-
default value when the action is RESET.
|
|
443
|
-
"""
|
|
444
|
-
|
|
445
|
-
return self._post(category='samples', resource='annotations/update', query_id=sample, subcategory='annotationSets', second_query_id=annotation_set, data=data, **options)
|
|
446
|
-
|