pyxetabase 4.0.0.dev56__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyxetabase might be problematic. Click here for more details.

Files changed (36) hide show
  1. pyxetabase/__init__.py +0 -0
  2. pyxetabase/commons.py +347 -0
  3. pyxetabase/exceptions.py +8 -0
  4. pyxetabase/opencga_client.py +344 -0
  5. pyxetabase/opencga_config.py +211 -0
  6. pyxetabase/rest_clients/__init__.py +0 -0
  7. pyxetabase/rest_clients/_parent_rest_clients.py +144 -0
  8. pyxetabase/rest_clients/admin_client.py +179 -0
  9. pyxetabase/rest_clients/alignment_client.py +373 -0
  10. pyxetabase/rest_clients/clinical_analysis_client.py +1216 -0
  11. pyxetabase/rest_clients/cohort_client.py +349 -0
  12. pyxetabase/rest_clients/cvdb_client.py +2285 -0
  13. pyxetabase/rest_clients/disease_panel_client.py +345 -0
  14. pyxetabase/rest_clients/family_client.py +355 -0
  15. pyxetabase/rest_clients/federation_client.py +133 -0
  16. pyxetabase/rest_clients/file_client.py +710 -0
  17. pyxetabase/rest_clients/ga4gh_client.py +86 -0
  18. pyxetabase/rest_clients/individual_client.py +435 -0
  19. pyxetabase/rest_clients/job_client.py +416 -0
  20. pyxetabase/rest_clients/meta_client.py +85 -0
  21. pyxetabase/rest_clients/organization_client.py +216 -0
  22. pyxetabase/rest_clients/project_client.py +128 -0
  23. pyxetabase/rest_clients/sample_client.py +446 -0
  24. pyxetabase/rest_clients/study_client.py +462 -0
  25. pyxetabase/rest_clients/user_client.py +212 -0
  26. pyxetabase/rest_clients/user_tool_client.py +471 -0
  27. pyxetabase/rest_clients/variant_client.py +1378 -0
  28. pyxetabase/rest_clients/variant_operation_client.py +718 -0
  29. pyxetabase/rest_clients/workflow_client.py +263 -0
  30. pyxetabase/rest_response.py +220 -0
  31. pyxetabase/retry.py +57 -0
  32. pyxetabase-4.0.0.dev56.dist-info/METADATA +159 -0
  33. pyxetabase-4.0.0.dev56.dist-info/RECORD +36 -0
  34. pyxetabase-4.0.0.dev56.dist-info/WHEEL +5 -0
  35. pyxetabase-4.0.0.dev56.dist-info/licenses/LICENSE +202 -0
  36. pyxetabase-4.0.0.dev56.dist-info/top_level.txt +1 -0
@@ -0,0 +1,373 @@
1
+ """
2
+ WARNING: AUTOGENERATED CODE
3
+
4
+ This code was generated by a tool.
5
+
6
+ Manual changes to this file may cause unexpected behavior in your application.
7
+ Manual changes to this file will be overwritten if the code is regenerated.
8
+ """
9
+
10
+ from pyxetabase.rest_clients._parent_rest_clients import _ParentRestClient
11
+
12
+
13
+ class Alignment(_ParentRestClient):
14
+ """
15
+ This class contains methods for the 'Analysis - Alignment' webservices
16
+ PATH: /{apiVersion}/analysis/alignment
17
+ """
18
+
19
+ def __init__(self, configuration, token=None, login_handler=None, *args, **kwargs):
20
+ super(Alignment, self).__init__(configuration, token, login_handler, *args, **kwargs)
21
+
22
+ def run_bwa(self, data=None, **options):
23
+ """
24
+ BWA is a software package for mapping low-divergent sequences against
25
+ a large reference genome.
26
+ PATH: /{apiVersion}/analysis/alignment/bwa/run
27
+
28
+ :param dict data: BWA parameters. (REQUIRED)
29
+ :param str study: study.
30
+ :param str job_id: Job ID. It must be a unique string within the
31
+ study. An ID will be autogenerated automatically if not provided.
32
+ :param str job_depends_on: Comma separated list of existing job IDs
33
+ the job will depend on.
34
+ :param str job_description: Job description.
35
+ :param str job_tags: Job tags.
36
+ :param str job_scheduled_start_time: Time when the job is scheduled to
37
+ start.
38
+ :param str job_priority: Priority of the job.
39
+ :param bool job_dry_run: Flag indicating that the job will be executed
40
+ in dry-run mode. In this mode, OpenCGA will validate that all
41
+ parameters and prerequisites are correctly set for successful
42
+ execution, but the job will not actually run.
43
+ """
44
+
45
+ return self._post(category='analysis', resource='run', subcategory='alignment/bwa', data=data, **options)
46
+
47
+ def run_coverage_index(self, data=None, **options):
48
+ """
49
+ Compute the coverage from a given BAM alignment file, e.g., create a
50
+ .bw file from a .bam file.
51
+ PATH: /{apiVersion}/analysis/alignment/coverage/index/run
52
+
53
+ :param dict data: Coverage computation parameters. (REQUIRED)
54
+ :param str study: study.
55
+ :param str job_id: Job ID. It must be a unique string within the
56
+ study. An ID will be autogenerated automatically if not provided.
57
+ :param str job_depends_on: Comma separated list of existing job IDs
58
+ the job will depend on.
59
+ :param str job_description: Job description.
60
+ :param str job_tags: Job tags.
61
+ :param str job_scheduled_start_time: Time when the job is scheduled to
62
+ start.
63
+ :param str job_priority: Priority of the job.
64
+ :param bool job_dry_run: Flag indicating that the job will be executed
65
+ in dry-run mode. In this mode, OpenCGA will validate that all
66
+ parameters and prerequisites are correctly set for successful
67
+ execution, but the job will not actually run.
68
+ """
69
+
70
+ return self._post(category='analysis', resource='run', subcategory='alignment/coverage/index', data=data, **options)
71
+
72
+ def coverage_qc_gene_coverage_stats_run(self, data=None, **options):
73
+ """
74
+ Compute gene coverage stats for a given alignment file and a list of
75
+ genes.
76
+ PATH: /{apiVersion}/analysis/alignment/coverage/qc/geneCoverageStats/run
77
+
78
+ :param dict data: Gene coverage stats parameters for a given BAM file
79
+ and a list of genes. (REQUIRED)
80
+ :param str study: study.
81
+ :param str job_id: Job ID. It must be a unique string within the
82
+ study. An ID will be autogenerated automatically if not provided.
83
+ :param str job_depends_on: Comma separated list of existing job IDs
84
+ the job will depend on.
85
+ :param str job_description: Job description.
86
+ :param str job_tags: Job tags.
87
+ :param str job_scheduled_start_time: Time when the job is scheduled to
88
+ start.
89
+ :param str job_priority: Priority of the job.
90
+ :param bool job_dry_run: Flag indicating that the job will be executed
91
+ in dry-run mode. In this mode, OpenCGA will validate that all
92
+ parameters and prerequisites are correctly set for successful
93
+ execution, but the job will not actually run.
94
+ """
95
+
96
+ return self._post(category='analysis', resource='run', subcategory='alignment/coverage/qc/geneCoverageStats', data=data, **options)
97
+
98
+ def query_coverage(self, file, **options):
99
+ """
100
+ Query the coverage of an alignment file for regions or genes.
101
+ PATH: /{apiVersion}/analysis/alignment/coverage/query
102
+
103
+ :param str file: File ID. (REQUIRED)
104
+ :param str study: Study [[organization@]project:]study where study and
105
+ project can be either the ID or UUID.
106
+ :param str region: Comma separated list of regions 'chr:start-end,
107
+ e.g.: 2,3:63500-65000.
108
+ :param str gene: Comma separated list of genes, e.g.: BCRA2,TP53.
109
+ :param int offset: Offset to extend the region, gene or exon at up and
110
+ downstream.
111
+ :param bool only_exons: Only exons are taking into account when genes
112
+ are specified.
113
+ :param str range: Range of coverage values to be reported. Minimum and
114
+ maximum values are separated by '-', e.g.: 20-40 (for coverage
115
+ values greater or equal to 20 and less or equal to 40). A single
116
+ value means to report coverage values less or equal to that value.
117
+ :param int window_size: Window size for the region coverage (if a
118
+ coverage range is provided, window size must be 1).
119
+ :param bool split_results: Split results into regions (or gene/exon
120
+ regions).
121
+ """
122
+
123
+ options['file'] = file
124
+ return self._get(category='analysis', resource='query', subcategory='alignment/coverage', **options)
125
+
126
+ def ratio_coverage(self, file1, file2, **options):
127
+ """
128
+ Compute coverage ratio from file #1 vs file #2, (e.g. somatic vs
129
+ germline).
130
+ PATH: /{apiVersion}/analysis/alignment/coverage/ratio
131
+
132
+ :param str file2: Input file #2 (e.g. germline file). (REQUIRED)
133
+ :param str file1: Input file #1 (e.g. somatic file). (REQUIRED)
134
+ :param str study: Study [[organization@]project:]study where study and
135
+ project can be either the ID or UUID.
136
+ :param bool skip_log2: Do not apply Log2 to normalise the coverage
137
+ ratio.
138
+ :param str region: Comma separated list of regions 'chr:start-end,
139
+ e.g.: 2,3:63500-65000.
140
+ :param str gene: Comma separated list of genes, e.g.: BCRA2,TP53.
141
+ :param int offset: Offset to extend the region, gene or exon at up and
142
+ downstream.
143
+ :param bool only_exons: Only exons are taking into account when genes
144
+ are specified.
145
+ :param int window_size: Window size for the region coverage (if a
146
+ coverage range is provided, window size must be 1).
147
+ :param bool split_results: Split results into regions (or gene/exon
148
+ regions).
149
+ """
150
+
151
+ options['file1'] = file1
152
+ options['file2'] = file2
153
+ return self._get(category='analysis', resource='ratio', subcategory='alignment/coverage', **options)
154
+
155
+ def stats_coverage(self, file, gene, **options):
156
+ """
157
+ Compute coverage stats per transcript for a list of genes.
158
+ PATH: /{apiVersion}/analysis/alignment/coverage/stats
159
+
160
+ :param str gene: Comma separated list of genes, e.g.: BCRA2,TP53.
161
+ (REQUIRED)
162
+ :param str file: File ID. (REQUIRED)
163
+ :param str study: Study [[organization@]project:]study where study and
164
+ project can be either the ID or UUID.
165
+ :param int threshold: Only regions whose coverage depth is under this
166
+ threshold will be reported.
167
+ """
168
+
169
+ options['file'] = file
170
+ options['gene'] = gene
171
+ return self._get(category='analysis', resource='stats', subcategory='alignment/coverage', **options)
172
+
173
+ def run_deeptools(self, data=None, **options):
174
+ """
175
+ Deeptools is a suite of python tools particularly developed for the
176
+ efficient analysis of high-throughput sequencing data, such as
177
+ ChIP-seq, RNA-seq or MNase-seq.
178
+ PATH: /{apiVersion}/analysis/alignment/deeptools/run
179
+
180
+ :param dict data: Deeptools parameters. Supported Deeptools commands:
181
+ bamCoverage, bamCompare. (REQUIRED)
182
+ :param str study: study.
183
+ :param str job_id: Job ID. It must be a unique string within the
184
+ study. An ID will be autogenerated automatically if not provided.
185
+ :param str job_depends_on: Comma separated list of existing job IDs
186
+ the job will depend on.
187
+ :param str job_description: Job description.
188
+ :param str job_tags: Job tags.
189
+ :param str job_scheduled_start_time: Time when the job is scheduled to
190
+ start.
191
+ :param str job_priority: Priority of the job.
192
+ :param bool job_dry_run: Flag indicating that the job will be executed
193
+ in dry-run mode. In this mode, OpenCGA will validate that all
194
+ parameters and prerequisites are correctly set for successful
195
+ execution, but the job will not actually run.
196
+ """
197
+
198
+ return self._post(category='analysis', resource='run', subcategory='alignment/deeptools', data=data, **options)
199
+
200
+ def run_fastqc(self, data=None, **options):
201
+ """
202
+ A high throughput sequence QC analysis tool.
203
+ PATH: /{apiVersion}/analysis/alignment/fastqc/run
204
+
205
+ :param dict data: FastQC parameters. (REQUIRED)
206
+ :param str study: study.
207
+ :param str job_id: Job ID. It must be a unique string within the
208
+ study. An ID will be autogenerated automatically if not provided.
209
+ :param str job_depends_on: Comma separated list of existing job IDs
210
+ the job will depend on.
211
+ :param str job_description: Job description.
212
+ :param str job_tags: Job tags.
213
+ :param str job_scheduled_start_time: Time when the job is scheduled to
214
+ start.
215
+ :param str job_priority: Priority of the job.
216
+ :param bool job_dry_run: Flag indicating that the job will be executed
217
+ in dry-run mode. In this mode, OpenCGA will validate that all
218
+ parameters and prerequisites are correctly set for successful
219
+ execution, but the job will not actually run.
220
+ """
221
+
222
+ return self._post(category='analysis', resource='run', subcategory='alignment/fastqc', data=data, **options)
223
+
224
+ def run_index(self, data=None, **options):
225
+ """
226
+ Index a given alignment file BAM/CRAM, e.g., create a .bai file from a
227
+ .bam file.
228
+ PATH: /{apiVersion}/analysis/alignment/index/run
229
+
230
+ :param dict data: Alignment index params. (REQUIRED)
231
+ :param str study: study.
232
+ :param str job_id: Job ID. It must be a unique string within the
233
+ study. An ID will be autogenerated automatically if not provided.
234
+ :param str job_depends_on: Comma separated list of existing job IDs
235
+ the job will depend on.
236
+ :param str job_description: Job description.
237
+ :param str job_tags: Job tags.
238
+ :param str job_scheduled_start_time: Time when the job is scheduled to
239
+ start.
240
+ :param str job_priority: Priority of the job.
241
+ :param bool job_dry_run: Flag indicating that the job will be executed
242
+ in dry-run mode. In this mode, OpenCGA will validate that all
243
+ parameters and prerequisites are correctly set for successful
244
+ execution, but the job will not actually run.
245
+ """
246
+
247
+ return self._post(category='analysis', resource='run', subcategory='alignment/index', data=data, **options)
248
+
249
+ def run_picard(self, data=None, **options):
250
+ """
251
+ Picard is a set of command line tools (in Java) for manipulating
252
+ high-throughput sequencing (HTS) data and formats such as
253
+ SAM/BAM/CRAM and VCF. Supported Picard commands: CollectHsMetrics,
254
+ CollectWgsMetrics, BedToIntervalList.
255
+ PATH: /{apiVersion}/analysis/alignment/picard/run
256
+
257
+ :param dict data: Picard parameters. Supported Picard commands:
258
+ CollectHsMetrics, CollectWgsMetrics, BedToIntervalList. (REQUIRED)
259
+ :param str study: study.
260
+ :param str job_id: Job ID. It must be a unique string within the
261
+ study. An ID will be autogenerated automatically if not provided.
262
+ :param str job_depends_on: Comma separated list of existing job IDs
263
+ the job will depend on.
264
+ :param str job_description: Job description.
265
+ :param str job_tags: Job tags.
266
+ :param str job_scheduled_start_time: Time when the job is scheduled to
267
+ start.
268
+ :param str job_priority: Priority of the job.
269
+ :param bool job_dry_run: Flag indicating that the job will be executed
270
+ in dry-run mode. In this mode, OpenCGA will validate that all
271
+ parameters and prerequisites are correctly set for successful
272
+ execution, but the job will not actually run.
273
+ """
274
+
275
+ return self._post(category='analysis', resource='run', subcategory='alignment/picard', data=data, **options)
276
+
277
+ def run_qc(self, data=None, **options):
278
+ """
279
+ Compute quality control (QC) metrics for a given alignment file:
280
+ samtools stats, samtools flag stats and FastQC metrics.
281
+ PATH: /{apiVersion}/analysis/alignment/qc/run
282
+
283
+ :param dict data: Alignment quality control (QC) parameters. It
284
+ computes: stats, flag stats and fastqc metrics. The BAM file ID is
285
+ mandatory and in order to skip some metrics, use the following
286
+ keywords (separated by commas): stats, flagstats, fastqc.
287
+ (REQUIRED)
288
+ :param str study: study.
289
+ :param str job_id: Job ID. It must be a unique string within the
290
+ study. An ID will be autogenerated automatically if not provided.
291
+ :param str job_depends_on: Comma separated list of existing job IDs
292
+ the job will depend on.
293
+ :param str job_description: Job description.
294
+ :param str job_tags: Job tags.
295
+ :param str job_scheduled_start_time: Time when the job is scheduled to
296
+ start.
297
+ :param str job_priority: Priority of the job.
298
+ :param bool job_dry_run: Flag indicating that the job will be executed
299
+ in dry-run mode. In this mode, OpenCGA will validate that all
300
+ parameters and prerequisites are correctly set for successful
301
+ execution, but the job will not actually run.
302
+ """
303
+
304
+ return self._post(category='analysis', resource='run', subcategory='alignment/qc', data=data, **options)
305
+
306
+ def query(self, file, **options):
307
+ """
308
+ Search over indexed alignments.
309
+ PATH: /{apiVersion}/analysis/alignment/query
310
+
311
+ :param str file: File ID. (REQUIRED)
312
+ :param int limit: Number of results to be returned.
313
+ :param int skip: Number of results to skip.
314
+ :param bool count: Get the total number of results matching the query.
315
+ Deactivated by default.
316
+ :param str study: Study [[organization@]project:]study where study and
317
+ project can be either the ID or UUID.
318
+ :param str region: Comma separated list of regions 'chr:start-end,
319
+ e.g.: 2,3:63500-65000.
320
+ :param str gene: Comma separated list of genes, e.g.: BCRA2,TP53.
321
+ :param int offset: Offset to extend the region, gene or exon at up and
322
+ downstream.
323
+ :param bool only_exons: Only exons are taking into account when genes
324
+ are specified.
325
+ :param int min_mapping_quality: Minimum mapping quality.
326
+ :param int max_num_mismatches: Maximum number of mismatches.
327
+ :param int max_num_hits: Maximum number of hits.
328
+ :param bool properly_paired: Return only properly paired alignments.
329
+ :param int max_insert_size: Maximum insert size.
330
+ :param bool skip_unmapped: Skip unmapped alignments.
331
+ :param bool skip_duplicated: Skip duplicated alignments.
332
+ :param bool region_contained: Return alignments contained within
333
+ boundaries of region.
334
+ :param bool force_m_d_field: Force SAM MD optional field to be set
335
+ with the alignments.
336
+ :param bool bin_qualities: Compress the nucleotide qualities by using
337
+ 8 quality levels.
338
+ :param bool split_results: Split results into regions (or gene/exon
339
+ regions).
340
+ """
341
+
342
+ options['file'] = file
343
+ return self._get(category='analysis', resource='query', subcategory='alignment', **options)
344
+
345
+ def run_samtools(self, data=None, **options):
346
+ """
347
+ Samtools is a program for interacting with high-throughput sequencing
348
+ data in SAM, BAM and CRAM formats. Supported Samtools commands:
349
+ sort, index, view, stats, flagstat, dict, faidx, depth,
350
+ plot-bamstats.
351
+ PATH: /{apiVersion}/analysis/alignment/samtools/run
352
+
353
+ :param dict data: Samtools parameters. Supported Samtools commands:
354
+ sort, index, view, stats, flagstat, dict, faidx, depth,
355
+ plot-bamstats. (REQUIRED)
356
+ :param str study: study.
357
+ :param str job_id: Job ID. It must be a unique string within the
358
+ study. An ID will be autogenerated automatically if not provided.
359
+ :param str job_depends_on: Comma separated list of existing job IDs
360
+ the job will depend on.
361
+ :param str job_description: Job description.
362
+ :param str job_tags: Job tags.
363
+ :param str job_scheduled_start_time: Time when the job is scheduled to
364
+ start.
365
+ :param str job_priority: Priority of the job.
366
+ :param bool job_dry_run: Flag indicating that the job will be executed
367
+ in dry-run mode. In this mode, OpenCGA will validate that all
368
+ parameters and prerequisites are correctly set for successful
369
+ execution, but the job will not actually run.
370
+ """
371
+
372
+ return self._post(category='analysis', resource='run', subcategory='alignment/samtools', data=data, **options)
373
+