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.
- pyxetabase/rest_clients/file_client.py +1 -1
- pyxetabase/rest_clients/variant_operation_client.py +1 -2
- {pyxetabase-3.1.0.dev25.dist-info → pyxetabase-3.1.1.dist-info}/METADATA +1 -1
- pyxetabase-3.1.1.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 -746
- pyopencga/rest_clients/workflow_client.py +0 -263
- pyopencga/rest_response.py +0 -220
- pyopencga/retry.py +0 -57
- pyxetabase-3.1.0.dev25.dist-info/RECORD +0 -63
- {pyxetabase-3.1.0.dev25.dist-info → pyxetabase-3.1.1.dist-info}/WHEEL +0 -0
- {pyxetabase-3.1.0.dev25.dist-info → pyxetabase-3.1.1.dist-info}/licenses/LICENSE +0 -0
- {pyxetabase-3.1.0.dev25.dist-info → pyxetabase-3.1.1.dist-info}/top_level.txt +0 -0
|
@@ -1,86 +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 GA4GH(_ParentRestClient):
|
|
14
|
-
"""
|
|
15
|
-
This class contains methods for the 'GA4GH' webservices
|
|
16
|
-
PATH: /{apiVersion}/ga4gh
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
def __init__(self, configuration, token=None, login_handler=None, *args, **kwargs):
|
|
20
|
-
super(GA4GH, self).__init__(configuration, token, login_handler, *args, **kwargs)
|
|
21
|
-
|
|
22
|
-
def search_reads(self, **options):
|
|
23
|
-
"""
|
|
24
|
-
Description.
|
|
25
|
-
PATH: /{apiVersion}/ga4gh/reads/search
|
|
26
|
-
"""
|
|
27
|
-
|
|
28
|
-
return self._post(category='ga4gh', resource='search', subcategory='reads', **options)
|
|
29
|
-
|
|
30
|
-
def fetch_reads(self, study, file, **options):
|
|
31
|
-
"""
|
|
32
|
-
Fetch alignment files using HTSget protocol.
|
|
33
|
-
PATH: /{apiVersion}/ga4gh/reads/{study}/{file}
|
|
34
|
-
|
|
35
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
36
|
-
project can be either the ID or UUID. (REQUIRED)
|
|
37
|
-
:param str file: File id, name or path. (REQUIRED)
|
|
38
|
-
:param str reference_name: Reference sequence name (Example: 'chr1',
|
|
39
|
-
'1' or 'chrX'.
|
|
40
|
-
:param int start: The start position of the range on the reference,
|
|
41
|
-
0-based, inclusive.
|
|
42
|
-
:param int end: The end position of the range on the reference,
|
|
43
|
-
0-based, exclusive.
|
|
44
|
-
:param str reference_genome: Reference genome.
|
|
45
|
-
"""
|
|
46
|
-
|
|
47
|
-
return self._get(category='ga4gh/reads', query_id=study, second_query_id=file, **options)
|
|
48
|
-
|
|
49
|
-
def responses(self, chrom, pos, allele, beacon, **options):
|
|
50
|
-
"""
|
|
51
|
-
Beacon webservice.
|
|
52
|
-
PATH: /{apiVersion}/ga4gh/responses
|
|
53
|
-
|
|
54
|
-
:param str beacon: Beacon IDs. If specified, only beacons with the
|
|
55
|
-
given IDs are queried. Responses from all the supported beacons are
|
|
56
|
-
obtained otherwise. Format: [id1,id2]. (REQUIRED)
|
|
57
|
-
:param str allele: Any string of nucleotides A,C,T,G or D, I for
|
|
58
|
-
deletion and insertion, respectively. Note: For compatibility with
|
|
59
|
-
conventions set by some of the existing beacons, DEL and INS
|
|
60
|
-
identifiers are also accepted. (REQUIRED)
|
|
61
|
-
:param int pos: Coordinate within a chromosome. Position is a number
|
|
62
|
-
and is 0-based. (REQUIRED)
|
|
63
|
-
:param str chrom: Chromosome ID. Accepted values: 1-22, X, Y, MT.
|
|
64
|
-
Note: For compatibility with conventions set by some of the
|
|
65
|
-
existing beacons, an arbitrary prefix is accepted as well (e.g.
|
|
66
|
-
chr1 is equivalent to chrom1 and 1). (REQUIRED)
|
|
67
|
-
:param str ref: Genome ID. If not specified, all the genomes supported
|
|
68
|
-
by the given beacons are queried. Note: For compatibility with
|
|
69
|
-
conventions set by some of the existing beacons, both GRC or HG
|
|
70
|
-
notation are accepted, case insensitive.
|
|
71
|
-
"""
|
|
72
|
-
|
|
73
|
-
options['chrom'] = chrom
|
|
74
|
-
options['pos'] = pos
|
|
75
|
-
options['allele'] = allele
|
|
76
|
-
options['beacon'] = beacon
|
|
77
|
-
return self._get(category='ga4gh', resource='responses', **options)
|
|
78
|
-
|
|
79
|
-
def search_variants(self, **options):
|
|
80
|
-
"""
|
|
81
|
-
Description.
|
|
82
|
-
PATH: /{apiVersion}/ga4gh/variants/search
|
|
83
|
-
"""
|
|
84
|
-
|
|
85
|
-
return self._post(category='ga4gh', resource='search', subcategory='variants', **options)
|
|
86
|
-
|
|
@@ -1,435 +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 Individual(_ParentRestClient):
|
|
14
|
-
"""
|
|
15
|
-
This class contains methods for the 'Individuals' webservices
|
|
16
|
-
PATH: /{apiVersion}/individuals
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
def __init__(self, configuration, token=None, login_handler=None, *args, **kwargs):
|
|
20
|
-
super(Individual, 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}/individuals/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 samples that are associated to the
|
|
30
|
-
matching individuals. (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
|
-
:param bool propagate: Propagate individual permissions to related
|
|
38
|
-
samples.
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
options['action'] = action
|
|
42
|
-
return self._post(category='individuals', resource='update', subcategory='acl', second_query_id=members, data=data, **options)
|
|
43
|
-
|
|
44
|
-
def aggregation_stats(self, **options):
|
|
45
|
-
"""
|
|
46
|
-
Fetch catalog individual stats.
|
|
47
|
-
PATH: /{apiVersion}/individuals/aggregationStats
|
|
48
|
-
|
|
49
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
50
|
-
project can be either the ID or UUID.
|
|
51
|
-
:param str id: Comma separated list individual IDs up to a maximum of
|
|
52
|
-
100. Also admits basic regular expressions using the operator '~',
|
|
53
|
-
i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i'
|
|
54
|
-
for case insensitive search.
|
|
55
|
-
:param str uuid: Comma separated list individual UUIDs up to a maximum
|
|
56
|
-
of 100.
|
|
57
|
-
:param str name: Comma separated list individual names up to a maximum
|
|
58
|
-
of 100. Also admits basic regular expressions using the operator
|
|
59
|
-
'~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive,
|
|
60
|
-
'~/value/i' for case insensitive search.
|
|
61
|
-
:param str father: Father ID, name or UUID.
|
|
62
|
-
:param str mother: Mother ID, name or UUID.
|
|
63
|
-
:param str samples: Sample ID, name or UUID.
|
|
64
|
-
:param str family_ids: Comma separated list of family ids the
|
|
65
|
-
individuals may belong to.
|
|
66
|
-
:param str sex: Individual sex.
|
|
67
|
-
:param str date_of_birth: Individual date of birth.
|
|
68
|
-
:param str ethnicity: Individual ethnicity. Also admits basic regular
|
|
69
|
-
expressions using the operator '~', i.e. '~{perl-regex}' e.g.
|
|
70
|
-
'~value' for case sensitive, '~/value/i' for case insensitive
|
|
71
|
-
search.
|
|
72
|
-
:param str disorders: Comma separated list of disorder ids or names.
|
|
73
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
74
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
75
|
-
case insensitive search.
|
|
76
|
-
:param str phenotypes: Comma separated list of phenotype ids or names.
|
|
77
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
78
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
79
|
-
case insensitive search.
|
|
80
|
-
:param str population_name: Population name. Also admits basic regular
|
|
81
|
-
expressions using the operator '~', i.e. '~{perl-regex}' e.g.
|
|
82
|
-
'~value' for case sensitive, '~/value/i' for case insensitive
|
|
83
|
-
search.
|
|
84
|
-
:param str population_subpopulation: Subpopulation name. Also admits
|
|
85
|
-
basic regular expressions using the operator '~', i.e.
|
|
86
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
87
|
-
case insensitive search.
|
|
88
|
-
:param str karyotypic_sex: Individual karyotypic sex.
|
|
89
|
-
:param str life_status: Individual life status.
|
|
90
|
-
:param str internal_status: Filter by internal status.
|
|
91
|
-
:param str status: Filter by status.
|
|
92
|
-
:param bool deleted: Boolean to retrieve deleted entries.
|
|
93
|
-
:param str creation_date: Creation date. Format: yyyyMMddHHmmss.
|
|
94
|
-
Examples: >2018, 2017-2018, <201805.
|
|
95
|
-
:param str modification_date: Modification date. Format:
|
|
96
|
-
yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
97
|
-
:param str annotation: Annotation filters. Example:
|
|
98
|
-
age>30;gender=FEMALE. For more information, please visit
|
|
99
|
-
http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
|
|
100
|
-
:param str acl: Filter entries for which a user has the provided
|
|
101
|
-
permissions. Format: acl={user}:{permissions}. Example:
|
|
102
|
-
acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
|
|
103
|
-
user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
|
|
104
|
-
study owners or administrators can query by this field. .
|
|
105
|
-
:param str release: Release when it was created.
|
|
106
|
-
:param int snapshot: Snapshot value (Latest version of the entry in
|
|
107
|
-
the specified release).
|
|
108
|
-
:param str field: Field to apply aggregation statistics to (or a list
|
|
109
|
-
of fields separated by semicolons), e.g.:
|
|
110
|
-
studies;type;numSamples[0..10]:1;format:sum(size).
|
|
111
|
-
"""
|
|
112
|
-
|
|
113
|
-
return self._get(category='individuals', resource='aggregationStats', **options)
|
|
114
|
-
|
|
115
|
-
def load_annotation_sets(self, variable_set_id, path, data=None, **options):
|
|
116
|
-
"""
|
|
117
|
-
Load annotation sets from a TSV file.
|
|
118
|
-
PATH: /{apiVersion}/individuals/annotationSets/load
|
|
119
|
-
|
|
120
|
-
:param str path: Path where the TSV file is located in OpenCGA or
|
|
121
|
-
where it should be located. (REQUIRED)
|
|
122
|
-
:param str variable_set_id: Variable set ID or name. (REQUIRED)
|
|
123
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
124
|
-
project can be either the ID or UUID.
|
|
125
|
-
:param bool parents: Flag indicating whether to create parent
|
|
126
|
-
directories if they don't exist (only when TSV file was not
|
|
127
|
-
previously associated).
|
|
128
|
-
:param str annotation_set_id: Annotation set id. If not provided,
|
|
129
|
-
variableSetId will be used.
|
|
130
|
-
:param dict data: JSON containing the 'content' of the TSV file if
|
|
131
|
-
this has not yet been registered into OpenCGA.
|
|
132
|
-
"""
|
|
133
|
-
|
|
134
|
-
options['variableSetId'] = variable_set_id
|
|
135
|
-
options['path'] = path
|
|
136
|
-
return self._post(category='individuals', resource='load', subcategory='annotationSets', data=data, **options)
|
|
137
|
-
|
|
138
|
-
def create(self, data=None, **options):
|
|
139
|
-
"""
|
|
140
|
-
Create individual.
|
|
141
|
-
PATH: /{apiVersion}/individuals/create
|
|
142
|
-
|
|
143
|
-
:param dict data: JSON containing individual information. (REQUIRED)
|
|
144
|
-
:param str include: Fields included in the response, whole JSON path
|
|
145
|
-
must be provided.
|
|
146
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
147
|
-
must be provided.
|
|
148
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
149
|
-
project can be either the ID or UUID.
|
|
150
|
-
:param str samples: Comma separated list of sample ids to be
|
|
151
|
-
associated to the created individual.
|
|
152
|
-
:param bool include_result: Flag indicating to include the created or
|
|
153
|
-
updated document result in the response.
|
|
154
|
-
"""
|
|
155
|
-
|
|
156
|
-
return self._post(category='individuals', resource='create', data=data, **options)
|
|
157
|
-
|
|
158
|
-
def distinct(self, field, **options):
|
|
159
|
-
"""
|
|
160
|
-
Individual distinct method.
|
|
161
|
-
PATH: /{apiVersion}/individuals/distinct
|
|
162
|
-
|
|
163
|
-
:param str field: Comma separated list of fields for which to obtain
|
|
164
|
-
the distinct values. (REQUIRED)
|
|
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 individual IDs up to a maximum of
|
|
168
|
-
100. Also admits basic regular expressions using the operator '~',
|
|
169
|
-
i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i'
|
|
170
|
-
for case insensitive search.
|
|
171
|
-
:param str uuid: Comma separated list individual UUIDs up to a maximum
|
|
172
|
-
of 100.
|
|
173
|
-
:param str name: Comma separated list individual names up to a maximum
|
|
174
|
-
of 100. Also admits basic regular expressions using the operator
|
|
175
|
-
'~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive,
|
|
176
|
-
'~/value/i' for case insensitive search.
|
|
177
|
-
:param str family_ids: Comma separated list of family ids the
|
|
178
|
-
individuals may belong to.
|
|
179
|
-
:param str father: Father ID, name or UUID.
|
|
180
|
-
:param str mother: Mother ID, name or UUID.
|
|
181
|
-
:param str samples: Sample ID, name or UUID.
|
|
182
|
-
:param str sex: Individual sex.
|
|
183
|
-
:param str ethnicity: Individual ethnicity. Also admits basic regular
|
|
184
|
-
expressions using the operator '~', i.e. '~{perl-regex}' e.g.
|
|
185
|
-
'~value' for case sensitive, '~/value/i' for case insensitive
|
|
186
|
-
search.
|
|
187
|
-
:param str date_of_birth: Individual date of birth.
|
|
188
|
-
:param str disorders: Comma separated list of disorder ids or names.
|
|
189
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
190
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
191
|
-
case insensitive search.
|
|
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 population_name: Population name. Also admits basic regular
|
|
197
|
-
expressions using the operator '~', i.e. '~{perl-regex}' e.g.
|
|
198
|
-
'~value' for case sensitive, '~/value/i' for case insensitive
|
|
199
|
-
search.
|
|
200
|
-
:param str population_subpopulation: Subpopulation name. Also admits
|
|
201
|
-
basic regular expressions using the operator '~', i.e.
|
|
202
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
203
|
-
case insensitive search.
|
|
204
|
-
:param str karyotypic_sex: Individual karyotypic sex.
|
|
205
|
-
:param str life_status: Individual life status.
|
|
206
|
-
:param str internal_status: Filter by internal status.
|
|
207
|
-
:param str status: Filter by status.
|
|
208
|
-
:param bool deleted: Boolean to retrieve deleted entries.
|
|
209
|
-
:param str creation_date: Creation date. Format: yyyyMMddHHmmss.
|
|
210
|
-
Examples: >2018, 2017-2018, <201805.
|
|
211
|
-
:param str modification_date: Modification date. Format:
|
|
212
|
-
yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
213
|
-
:param str annotation: Annotation filters. Example:
|
|
214
|
-
age>30;gender=FEMALE. For more information, please visit
|
|
215
|
-
http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
|
|
216
|
-
:param str acl: Filter entries for which a user has the provided
|
|
217
|
-
permissions. Format: acl={user}:{permissions}. Example:
|
|
218
|
-
acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
|
|
219
|
-
user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
|
|
220
|
-
study owners or administrators can query by this field. .
|
|
221
|
-
:param str release: Release when it was created.
|
|
222
|
-
:param int snapshot: Snapshot value (Latest version of the entry in
|
|
223
|
-
the specified release).
|
|
224
|
-
"""
|
|
225
|
-
|
|
226
|
-
options['field'] = field
|
|
227
|
-
return self._get(category='individuals', resource='distinct', **options)
|
|
228
|
-
|
|
229
|
-
def search(self, **options):
|
|
230
|
-
"""
|
|
231
|
-
Search for individuals.
|
|
232
|
-
PATH: /{apiVersion}/individuals/search
|
|
233
|
-
|
|
234
|
-
:param str include: Fields included in the response, whole JSON path
|
|
235
|
-
must be provided.
|
|
236
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
237
|
-
must be provided.
|
|
238
|
-
:param int limit: Number of results to be returned.
|
|
239
|
-
:param int skip: Number of results to skip.
|
|
240
|
-
:param bool count: Get the total number of results matching the query.
|
|
241
|
-
Deactivated by default.
|
|
242
|
-
:param bool flatten_annotations: Flatten the annotations?.
|
|
243
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
244
|
-
project can be either the ID or UUID.
|
|
245
|
-
:param str id: Comma separated list individual IDs up to a maximum of
|
|
246
|
-
100. Also admits basic regular expressions using the operator '~',
|
|
247
|
-
i.e. '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i'
|
|
248
|
-
for case insensitive search.
|
|
249
|
-
:param str uuid: Comma separated list individual UUIDs up to a maximum
|
|
250
|
-
of 100.
|
|
251
|
-
:param str name: Comma separated list individual names up to a maximum
|
|
252
|
-
of 100. Also admits basic regular expressions using the operator
|
|
253
|
-
'~', i.e. '~{perl-regex}' e.g. '~value' for case sensitive,
|
|
254
|
-
'~/value/i' for case insensitive search.
|
|
255
|
-
:param str father: Father ID, name or UUID.
|
|
256
|
-
:param str mother: Mother ID, name or UUID.
|
|
257
|
-
:param str samples: Sample ID, name or UUID.
|
|
258
|
-
:param str family_ids: Comma separated list of family ids the
|
|
259
|
-
individuals may belong to.
|
|
260
|
-
:param str sex: Individual sex.
|
|
261
|
-
:param str date_of_birth: Individual date of birth.
|
|
262
|
-
:param str ethnicity: Individual ethnicity. Also admits basic regular
|
|
263
|
-
expressions using the operator '~', i.e. '~{perl-regex}' e.g.
|
|
264
|
-
'~value' for case sensitive, '~/value/i' for case insensitive
|
|
265
|
-
search.
|
|
266
|
-
:param str disorders: Comma separated list of disorder ids or names.
|
|
267
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
268
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
269
|
-
case insensitive search.
|
|
270
|
-
:param str phenotypes: Comma separated list of phenotype ids or names.
|
|
271
|
-
Also admits basic regular expressions using the operator '~', i.e.
|
|
272
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
273
|
-
case insensitive search.
|
|
274
|
-
:param str population_name: Population name. Also admits basic regular
|
|
275
|
-
expressions using the operator '~', i.e. '~{perl-regex}' e.g.
|
|
276
|
-
'~value' for case sensitive, '~/value/i' for case insensitive
|
|
277
|
-
search.
|
|
278
|
-
:param str population_subpopulation: Subpopulation name. Also admits
|
|
279
|
-
basic regular expressions using the operator '~', i.e.
|
|
280
|
-
'~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for
|
|
281
|
-
case insensitive search.
|
|
282
|
-
:param str karyotypic_sex: Individual karyotypic sex.
|
|
283
|
-
:param str life_status: Individual life status.
|
|
284
|
-
:param str internal_status: Filter by internal status.
|
|
285
|
-
:param str status: Filter by status.
|
|
286
|
-
:param bool deleted: Boolean to retrieve deleted entries.
|
|
287
|
-
:param str creation_date: Creation date. Format: yyyyMMddHHmmss.
|
|
288
|
-
Examples: >2018, 2017-2018, <201805.
|
|
289
|
-
:param str modification_date: Modification date. Format:
|
|
290
|
-
yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
291
|
-
:param str annotation: Annotation filters. Example:
|
|
292
|
-
age>30;gender=FEMALE. For more information, please visit
|
|
293
|
-
http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
|
|
294
|
-
:param str acl: Filter entries for which a user has the provided
|
|
295
|
-
permissions. Format: acl={user}:{permissions}. Example:
|
|
296
|
-
acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which
|
|
297
|
-
user john has both WRITE and WRITE_ANNOTATIONS permissions. Only
|
|
298
|
-
study owners or administrators can query by this field. .
|
|
299
|
-
:param str release: Release when it was created.
|
|
300
|
-
:param int snapshot: Snapshot value (Latest version of the entry in
|
|
301
|
-
the specified release).
|
|
302
|
-
"""
|
|
303
|
-
|
|
304
|
-
return self._get(category='individuals', resource='search', **options)
|
|
305
|
-
|
|
306
|
-
def acl(self, individuals, **options):
|
|
307
|
-
"""
|
|
308
|
-
Return the acl of the individual. If member is provided, it will only
|
|
309
|
-
return the acl for the member.
|
|
310
|
-
PATH: /{apiVersion}/individuals/{individuals}/acl
|
|
311
|
-
|
|
312
|
-
:param str individuals: Comma separated list of individual IDs, names
|
|
313
|
-
or UUIDs up to a maximum of 100. (REQUIRED)
|
|
314
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
315
|
-
project can be either the ID or UUID.
|
|
316
|
-
:param str member: User or group id.
|
|
317
|
-
:param bool silent: Boolean to retrieve all possible entries that are
|
|
318
|
-
queried for, false to raise an exception whenever one of the
|
|
319
|
-
entries looked for cannot be shown for whichever reason.
|
|
320
|
-
"""
|
|
321
|
-
|
|
322
|
-
return self._get(category='individuals', resource='acl', query_id=individuals, **options)
|
|
323
|
-
|
|
324
|
-
def delete(self, individuals, **options):
|
|
325
|
-
"""
|
|
326
|
-
Delete existing individuals.
|
|
327
|
-
PATH: /{apiVersion}/individuals/{individuals}/delete
|
|
328
|
-
|
|
329
|
-
:param str individuals: Comma separated list of individual ids.
|
|
330
|
-
(REQUIRED)
|
|
331
|
-
:param bool force: Force the deletion of individuals that already
|
|
332
|
-
belong to families.
|
|
333
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
334
|
-
project can be either the ID or UUID.
|
|
335
|
-
"""
|
|
336
|
-
|
|
337
|
-
return self._delete(category='individuals', resource='delete', query_id=individuals, **options)
|
|
338
|
-
|
|
339
|
-
def info(self, individuals, **options):
|
|
340
|
-
"""
|
|
341
|
-
Get individual information.
|
|
342
|
-
PATH: /{apiVersion}/individuals/{individuals}/info
|
|
343
|
-
|
|
344
|
-
:param str individuals: Comma separated list of individual IDs, names
|
|
345
|
-
or UUIDs up to a maximum of 100. (REQUIRED)
|
|
346
|
-
:param str include: Fields included in the response, whole JSON path
|
|
347
|
-
must be provided.
|
|
348
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
349
|
-
must be provided.
|
|
350
|
-
:param bool flatten_annotations: Flatten the annotations?.
|
|
351
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
352
|
-
project can be either the ID or UUID.
|
|
353
|
-
:param str version: Comma separated list of individual versions. 'all'
|
|
354
|
-
to get all the individual versions. Not supported if multiple
|
|
355
|
-
individual ids are provided.
|
|
356
|
-
:param bool deleted: Boolean to retrieve deleted individuals.
|
|
357
|
-
"""
|
|
358
|
-
|
|
359
|
-
return self._get(category='individuals', resource='info', query_id=individuals, **options)
|
|
360
|
-
|
|
361
|
-
def update(self, individuals, data=None, **options):
|
|
362
|
-
"""
|
|
363
|
-
Update some individual attributes.
|
|
364
|
-
PATH: /{apiVersion}/individuals/{individuals}/update
|
|
365
|
-
|
|
366
|
-
:param str individuals: Comma separated list of individual ids.
|
|
367
|
-
(REQUIRED)
|
|
368
|
-
:param str include: Fields included in the response, whole JSON path
|
|
369
|
-
must be provided.
|
|
370
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
371
|
-
must be provided.
|
|
372
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
373
|
-
project can be either the ID or UUID.
|
|
374
|
-
:param str samples_action: Action to be performed if the array of
|
|
375
|
-
samples is being updated. Allowed values: ['ADD SET REMOVE']
|
|
376
|
-
:param str phenotypes_action: Action to be performed if the array of
|
|
377
|
-
phenotypes is being updated [SET, ADD, REMOVE]. Allowed values:
|
|
378
|
-
['ADD SET REMOVE']
|
|
379
|
-
:param str disorders_action: Action to be performed if the array of
|
|
380
|
-
disorders is being updated [SET, ADD, REMOVE]. Allowed values:
|
|
381
|
-
['ADD SET REMOVE']
|
|
382
|
-
:param str annotation_sets_action: Action to be performed if the array
|
|
383
|
-
of annotationSets is being updated. Allowed values: ['ADD SET
|
|
384
|
-
REMOVE']
|
|
385
|
-
:param bool include_result: Flag indicating to include the created or
|
|
386
|
-
updated document result in the response.
|
|
387
|
-
:param dict data: body.
|
|
388
|
-
"""
|
|
389
|
-
|
|
390
|
-
return self._post(category='individuals', resource='update', query_id=individuals, data=data, **options)
|
|
391
|
-
|
|
392
|
-
def update_annotation_sets_annotations(self, individual, annotation_set, data=None, **options):
|
|
393
|
-
"""
|
|
394
|
-
Update annotations from an annotationSet.
|
|
395
|
-
PATH: /{apiVersion}/individuals/{individual}/annotationSets/{annotationSet}/annotations/update
|
|
396
|
-
|
|
397
|
-
:param str annotation_set: AnnotationSet ID to be updated. (REQUIRED)
|
|
398
|
-
:param str individual: Individual ID, name or UUID. (REQUIRED)
|
|
399
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
400
|
-
project can be either the ID or UUID.
|
|
401
|
-
:param str action: Action to be performed: ADD to add new annotations;
|
|
402
|
-
REPLACE to replace the value of an already existing annotation; SET
|
|
403
|
-
to set the new list of annotations removing any possible old
|
|
404
|
-
annotations; REMOVE to remove some annotations; RESET to set some
|
|
405
|
-
annotations to the default value configured in the corresponding
|
|
406
|
-
variables of the VariableSet if any. Allowed values: ['ADD SET
|
|
407
|
-
REMOVE RESET REPLACE']
|
|
408
|
-
:param dict data: Json containing the map of annotations when the
|
|
409
|
-
action is ADD, SET or REPLACE, a json with only the key 'remove'
|
|
410
|
-
containing the comma separated variables to be removed as a value
|
|
411
|
-
when the action is REMOVE or a json with only the key 'reset'
|
|
412
|
-
containing the comma separated variables that will be set to the
|
|
413
|
-
default value when the action is RESET.
|
|
414
|
-
"""
|
|
415
|
-
|
|
416
|
-
return self._post(category='individuals', resource='annotations/update', query_id=individual, subcategory='annotationSets', second_query_id=annotation_set, data=data, **options)
|
|
417
|
-
|
|
418
|
-
def relatives(self, individual, **options):
|
|
419
|
-
"""
|
|
420
|
-
Get individual relatives.
|
|
421
|
-
PATH: /{apiVersion}/individuals/{individual}/relatives
|
|
422
|
-
|
|
423
|
-
:param str individual: Individual ID, name or UUID. (REQUIRED)
|
|
424
|
-
:param str include: Fields included in the response, whole JSON path
|
|
425
|
-
must be provided.
|
|
426
|
-
:param str exclude: Fields excluded in the response, whole JSON path
|
|
427
|
-
must be provided.
|
|
428
|
-
:param bool flatten_annotations: Flatten the annotations?.
|
|
429
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
430
|
-
project can be either the ID or UUID.
|
|
431
|
-
:param int degree: Pedigree degree.
|
|
432
|
-
"""
|
|
433
|
-
|
|
434
|
-
return self._get(category='individuals', resource='relatives', query_id=individual, **options)
|
|
435
|
-
|