pyopencga 5.0.0.dev1__tar.gz → 6.0.0__tar.gz
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.
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/PKG-INFO +1 -1
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/admin_client.py +17 -6
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/alignment_client.py +10 -1
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/clinical_analysis_client.py +89 -45
- pyopencga-6.0.0/pyopencga/rest_clients/cvdb_client.py +2404 -0
- pyopencga-6.0.0/pyopencga/rest_clients/ehds_client.py +101 -0
- pyopencga-6.0.0/pyopencga/rest_clients/federation_client.py +133 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/file_client.py +6 -12
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/individual_client.py +27 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/job_client.py +35 -27
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/meta_client.py +9 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/study_client.py +148 -2
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/user_client.py +54 -1
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/user_tool_client.py +0 -25
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/variant_client.py +686 -13
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/variant_operation_client.py +37 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga.egg-info/PKG-INFO +1 -1
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga.egg-info/SOURCES.txt +3 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/setup.py +1 -1
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/LICENSE +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/README.rst +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/__init__.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/commons.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/exceptions.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/opencga_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/opencga_config.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/__init__.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/_parent_rest_clients.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/cohort_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/disease_panel_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/family_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/ga4gh_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/organization_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/project_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/sample_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_clients/workflow_client.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/rest_response.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga/retry.py +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga.egg-info/dependency_links.txt +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga.egg-info/requires.txt +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/pyopencga.egg-info/top_level.txt +0 -0
- {pyopencga-5.0.0.dev1 → pyopencga-6.0.0}/setup.cfg +0 -0
|
@@ -27,8 +27,8 @@ class Admin(_ParentRestClient):
|
|
|
27
27
|
:param str entity: Entity to be grouped by. Allowed values: ['AUDIT
|
|
28
28
|
NOTE ORGANIZATION USER PROJECT STUDY FILE SAMPLE JOB INDIVIDUAL
|
|
29
29
|
COHORT DISEASE_PANEL FAMILY CLINICAL_ANALYSIS INTERPRETATION
|
|
30
|
-
VARIANT ALIGNMENT CLINICAL EXPRESSION RGA FUNCTIONAL
|
|
31
|
-
RESOURCE'] (REQUIRED)
|
|
30
|
+
VARIANT ALIGNMENT CLINICAL EXPRESSION RGA FUNCTIONAL EHDS
|
|
31
|
+
EXTERNAL_TOOL BATCH RESOURCE'] (REQUIRED)
|
|
32
32
|
:param str fields: Comma separated list of fields by which to group
|
|
33
33
|
by. (REQUIRED)
|
|
34
34
|
:param bool count: Count the number of elements matching the group.
|
|
@@ -72,13 +72,13 @@ class Admin(_ParentRestClient):
|
|
|
72
72
|
|
|
73
73
|
return self._get(category='admin', resource='list', subcategory='organizations', **options)
|
|
74
74
|
|
|
75
|
-
def
|
|
75
|
+
def fetch_resources(self, data=None, **options):
|
|
76
76
|
"""
|
|
77
77
|
Fetch resources from the public server and save them into the OpenCGA
|
|
78
78
|
local installation.
|
|
79
|
-
PATH: /{apiVersion}/admin/
|
|
79
|
+
PATH: /{apiVersion}/admin/resources/fetch
|
|
80
80
|
|
|
81
|
-
:param dict data:
|
|
81
|
+
:param dict data: Fetch-resources tool parameters. (REQUIRED)
|
|
82
82
|
:param str job_id: Job ID. It must be a unique string within the
|
|
83
83
|
study. An ID will be autogenerated automatically if not provided.
|
|
84
84
|
:param str job_description: Job description.
|
|
@@ -94,7 +94,18 @@ class Admin(_ParentRestClient):
|
|
|
94
94
|
execution, but the job will not actually run.
|
|
95
95
|
"""
|
|
96
96
|
|
|
97
|
-
return self._post(category='admin', resource='fetch', subcategory='
|
|
97
|
+
return self._post(category='admin', resource='fetch', subcategory='resources', data=data, **options)
|
|
98
|
+
|
|
99
|
+
def tree_resources(self, **options):
|
|
100
|
+
"""
|
|
101
|
+
Obtain a tree view of the on-disk installation resources folder.
|
|
102
|
+
PATH: /{apiVersion}/admin/resources/tree
|
|
103
|
+
|
|
104
|
+
:param int max_depth: Maximum depth to descend into the resources
|
|
105
|
+
folder, capped at 10.
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
return self._get(category='admin', resource='tree', subcategory='resources', **options)
|
|
98
109
|
|
|
99
110
|
def create_users(self, data=None, **options):
|
|
100
111
|
"""
|
|
@@ -154,16 +154,25 @@ class Alignment(_ParentRestClient):
|
|
|
154
154
|
|
|
155
155
|
def stats_coverage(self, file, gene, **options):
|
|
156
156
|
"""
|
|
157
|
-
Compute coverage stats per transcript for a list of genes.
|
|
157
|
+
Compute coverage stats per transcript for a list of genes. Only the
|
|
158
|
+
MANE and canonical transcripts of each gene are reported, or all of
|
|
159
|
+
them when the gene has none. Coverage is measured over the coding
|
|
160
|
+
part of each exon plus a flank, or over whole exons plus the flank
|
|
161
|
+
for a non-coding transcript.
|
|
158
162
|
PATH: /{apiVersion}/analysis/alignment/coverage/stats
|
|
159
163
|
|
|
160
164
|
:param str gene: Comma separated list of genes, e.g.: BCRA2,TP53.
|
|
161
165
|
(REQUIRED)
|
|
162
166
|
:param str file: File ID. (REQUIRED)
|
|
167
|
+
:param str coverage_file: Coverage file (BIGWIG) to read the depths
|
|
168
|
+
from. By default, the coverage file registered for the alignment
|
|
169
|
+
file, or the alignment file itself when it has none.
|
|
163
170
|
:param str study: Study [[organization@]project:]study where study and
|
|
164
171
|
project can be either the ID or UUID.
|
|
165
172
|
:param int threshold: Only regions whose coverage depth is under this
|
|
166
173
|
threshold will be reported.
|
|
174
|
+
:param int flank: Bases added either side of each measured exon, e.g.
|
|
175
|
+
to cover the splice sites.
|
|
167
176
|
"""
|
|
168
177
|
|
|
169
178
|
options['file'] = file
|
|
@@ -211,6 +211,19 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
211
211
|
options['field'] = field
|
|
212
212
|
return self._get(category='analysis', resource='distinct', subcategory='clinical', **options)
|
|
213
213
|
|
|
214
|
+
def import_emedgene(self, data=None, **options):
|
|
215
|
+
"""
|
|
216
|
+
Import a clinical analysis from an Emedgene HL7 v2 JSON file.
|
|
217
|
+
PATH: /{apiVersion}/analysis/clinical/emedgene/import
|
|
218
|
+
|
|
219
|
+
:param dict data: Parameters to import a clinical analysis from an
|
|
220
|
+
Emedgene HL7 v2 JSON file. (REQUIRED)
|
|
221
|
+
:param str study: Study [[organization@]project:]study where study and
|
|
222
|
+
project can be either the ID or UUID.
|
|
223
|
+
"""
|
|
224
|
+
|
|
225
|
+
return self._post(category='analysis', resource='import', subcategory='clinical/emedgene', data=data, **options)
|
|
226
|
+
|
|
214
227
|
def aggregation_stats_interpretation(self, **options):
|
|
215
228
|
"""
|
|
216
229
|
Fetch catalog interpretation aggregation stats.
|
|
@@ -281,12 +294,38 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
281
294
|
Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
282
295
|
:param str status: Filter by status.
|
|
283
296
|
:param str internal_status: Filter by internal status.
|
|
297
|
+
:param str internal_annotation_review_status: Filter by internal
|
|
298
|
+
annotation review status.
|
|
299
|
+
:param str internal_annotation_external_status: Filter by internal
|
|
300
|
+
annotation external phenopacket review status.
|
|
284
301
|
:param str release: Release when it was created.
|
|
285
302
|
"""
|
|
286
303
|
|
|
287
304
|
options['field'] = field
|
|
288
305
|
return self._get(category='analysis', resource='distinct', subcategory='clinical/interpretation', **options)
|
|
289
306
|
|
|
307
|
+
def report_interpretation(self, **options):
|
|
308
|
+
"""
|
|
309
|
+
Generate a tabular report (one row per ClinicalAnalysis) with reported
|
|
310
|
+
variants grouped by tier. Provide either a 'batchId' or a list of
|
|
311
|
+
'clinicalAnalysisId'.
|
|
312
|
+
PATH: /{apiVersion}/analysis/clinical/interpretation/report
|
|
313
|
+
|
|
314
|
+
:param str study: [[organization@]project:]study id.
|
|
315
|
+
:param str batch_id: Batch ID. The batch's samples are resolved to
|
|
316
|
+
proband case IDs.
|
|
317
|
+
:param str clinical_analysis_id: Comma-separated list of
|
|
318
|
+
ClinicalAnalysis IDs (maximum 100).
|
|
319
|
+
:param str format: Output format: TSV (default) or JSON. Allowed
|
|
320
|
+
values: ['TSV', 'JSON']
|
|
321
|
+
:param str additional_columns: Optional comma-separated list of
|
|
322
|
+
ClinicalAnalysis data-model paths to add as extra columns, each
|
|
323
|
+
optionally suffixed with ':alias' for the header. Example:
|
|
324
|
+
proband.samples[0].attributes.OPENCGA_CARRIER_AFFY_SMN_STATUS:SMN.
|
|
325
|
+
"""
|
|
326
|
+
|
|
327
|
+
return self._get(category='analysis', resource='report', subcategory='clinical/interpretation', **options)
|
|
328
|
+
|
|
290
329
|
def search_interpretation(self, **options):
|
|
291
330
|
"""
|
|
292
331
|
Search clinical interpretations.
|
|
@@ -324,6 +363,10 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
324
363
|
Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
|
|
325
364
|
:param str status: Filter by status.
|
|
326
365
|
:param str internal_status: Filter by internal status.
|
|
366
|
+
:param str internal_annotation_review_status: Filter by internal
|
|
367
|
+
annotation review status.
|
|
368
|
+
:param str internal_annotation_external_status: Filter by internal
|
|
369
|
+
annotation external phenopacket review status.
|
|
327
370
|
:param str release: Release when it was created.
|
|
328
371
|
"""
|
|
329
372
|
|
|
@@ -445,15 +488,14 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
445
488
|
|
|
446
489
|
return self._post(category='analysis', resource='load', subcategory='clinical', data=data, **options)
|
|
447
490
|
|
|
448
|
-
def
|
|
491
|
+
def run_pharmacogenomics_ngs(self, data=None, **options):
|
|
449
492
|
"""
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
PATH: /{apiVersion}/analysis/clinical/pipeline/affy/run
|
|
493
|
+
NGS pharmacogenomics analysis: run PharmCAT on a VCF and optionally
|
|
494
|
+
annotate with CPIC. Produces one result per sample.
|
|
495
|
+
PATH: /{apiVersion}/analysis/clinical/pharmacogenomics/ngs/run
|
|
454
496
|
|
|
455
|
-
:param dict data:
|
|
456
|
-
|
|
497
|
+
:param dict data: NGS pharmacogenomics analysis params (PharmCAT from
|
|
498
|
+
a VCF). (REQUIRED)
|
|
457
499
|
:param str study: Study [[organization@]project:]study where study and
|
|
458
500
|
project can be either the ID or UUID.
|
|
459
501
|
:param str job_id: Job ID. It must be a unique string within the
|
|
@@ -471,43 +513,17 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
471
513
|
execution, but the job will not actually run.
|
|
472
514
|
"""
|
|
473
515
|
|
|
474
|
-
return self._post(category='analysis', resource='run', subcategory='clinical/
|
|
516
|
+
return self._post(category='analysis', resource='run', subcategory='clinical/pharmacogenomics/ngs', data=data, **options)
|
|
475
517
|
|
|
476
|
-
def
|
|
518
|
+
def run_pharmacogenomics_openarray(self, data=None, **options):
|
|
477
519
|
"""
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
PATH: /{apiVersion}/analysis/clinical/
|
|
520
|
+
OpenArray pharmacogenomics analysis: infer star alleles from
|
|
521
|
+
ThermoFisher OpenArray genotyping data and optionally annotate with
|
|
522
|
+
CPIC.
|
|
523
|
+
PATH: /{apiVersion}/analysis/clinical/pharmacogenomics/openarray/run
|
|
482
524
|
|
|
483
|
-
:param dict data:
|
|
484
|
-
|
|
485
|
-
:param str study: Study [[organization@]project:]study where study and
|
|
486
|
-
project can be either the ID or UUID.
|
|
487
|
-
:param str job_id: Job ID. It must be a unique string within the
|
|
488
|
-
study. An ID will be autogenerated automatically if not provided.
|
|
489
|
-
:param str job_description: Job description.
|
|
490
|
-
:param str job_depends_on: Comma separated list of existing job IDs
|
|
491
|
-
the job will depend on.
|
|
492
|
-
:param str job_tags: Job tags.
|
|
493
|
-
:param str job_scheduled_start_time: Time when the job is scheduled to
|
|
494
|
-
start.
|
|
495
|
-
:param str job_priority: Priority of the job.
|
|
496
|
-
:param bool job_dry_run: Flag indicating that the job will be executed
|
|
497
|
-
in dry-run mode. In this mode, OpenCGA will validate that all
|
|
498
|
-
parameters and prerequisites are correctly set for successful
|
|
499
|
-
execution, but the job will not actually run.
|
|
500
|
-
"""
|
|
501
|
-
|
|
502
|
-
return self._post(category='analysis', resource='run', subcategory='clinical/pipeline/genomics', data=data, **options)
|
|
503
|
-
|
|
504
|
-
def run_pipeline_prepare(self, data=None, **options):
|
|
505
|
-
"""
|
|
506
|
-
Prepare the clinical pipeline.
|
|
507
|
-
PATH: /{apiVersion}/analysis/clinical/pipeline/prepare/run
|
|
508
|
-
|
|
509
|
-
:param dict data: JSON with parameters to execute the command
|
|
510
|
-
ngs-pipeline-prepare. (REQUIRED)
|
|
525
|
+
:param dict data: OpenArray pharmacogenomics analysis params.
|
|
526
|
+
(REQUIRED)
|
|
511
527
|
:param str study: Study [[organization@]project:]study where study and
|
|
512
528
|
project can be either the ID or UUID.
|
|
513
529
|
:param str job_id: Job ID. It must be a unique string within the
|
|
@@ -525,7 +541,7 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
525
541
|
execution, but the job will not actually run.
|
|
526
542
|
"""
|
|
527
543
|
|
|
528
|
-
return self._post(category='analysis', resource='run', subcategory='clinical/
|
|
544
|
+
return self._post(category='analysis', resource='run', subcategory='clinical/pharmacogenomics/openarray', data=data, **options)
|
|
529
545
|
|
|
530
546
|
def aggregation_stats_rga(self, field, **options):
|
|
531
547
|
"""
|
|
@@ -886,6 +902,20 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
886
902
|
|
|
887
903
|
return self._get(category='analysis', resource='search', subcategory='clinical', **options)
|
|
888
904
|
|
|
905
|
+
def import_sophia_genetics(self, data=None, **options):
|
|
906
|
+
"""
|
|
907
|
+
Import a clinical analysis from a Sophia Genetics clinical report JSON
|
|
908
|
+
file.
|
|
909
|
+
PATH: /{apiVersion}/analysis/clinical/sophiaGenetics/import
|
|
910
|
+
|
|
911
|
+
:param dict data: Parameters to import a clinical analysis from a
|
|
912
|
+
Sophia Genetics clinical report JSON file. (REQUIRED)
|
|
913
|
+
:param str study: Study [[organization@]project:]study where study and
|
|
914
|
+
project can be either the ID or UUID.
|
|
915
|
+
"""
|
|
916
|
+
|
|
917
|
+
return self._post(category='analysis', resource='import', subcategory='clinical/sophiaGenetics', data=data, **options)
|
|
918
|
+
|
|
889
919
|
def query_variant(self, **options):
|
|
890
920
|
"""
|
|
891
921
|
Fetch clinical variants.
|
|
@@ -1023,9 +1053,21 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
1023
1053
|
:param str functional_score: Functional score:
|
|
1024
1054
|
{functional_score}[<|>|<=|>=]{number} e.g. cadd_scaled>5.2 ,
|
|
1025
1055
|
cadd_raw<=0.3.
|
|
1026
|
-
:param str clinical: Clinical source
|
|
1056
|
+
:param str clinical: Clinical source filter (e.g. clinvar, cosmic,
|
|
1057
|
+
acmg). Forms: bare source ('clinvar' = any significance);
|
|
1058
|
+
per-source significance ('clinvar:pathogenic'); a significance set
|
|
1059
|
+
joined with ',' (OR) or ';' (AND, for conflicting interpretations),
|
|
1060
|
+
e.g. 'clinvar:pathogenic,likely_pathogenic'; 'source:any' (present,
|
|
1061
|
+
synonym of bare source and 'source:') and 'source:none' (absent,
|
|
1062
|
+
equivalent to '!source'); negation '!source' /
|
|
1063
|
+
'!source:significance'. Sources are combined with ',' (OR) or ';'
|
|
1064
|
+
(AND). Excluded sources must be combined with ';' (e.g.
|
|
1065
|
+
'!clinvar;!cosmic') — ',' between excluded sources is rejected. The
|
|
1066
|
+
merged 'source:significance' form cannot be combined with the
|
|
1067
|
+
'clinicalSignificance' parameter.
|
|
1027
1068
|
:param str clinical_significance: Clinical significance: benign,
|
|
1028
|
-
likely_benign, likely_pathogenic,
|
|
1069
|
+
likely_benign, uncertain_significance, likely_pathogenic,
|
|
1070
|
+
pathogenic.
|
|
1029
1071
|
:param bool clinical_confirmed_status: Clinical confirmed status.
|
|
1030
1072
|
:param str custom_annotation: Custom annotation:
|
|
1031
1073
|
{key}[<|>|<=|>=]{number} or {key}[~=|=]{text}.
|
|
@@ -1295,9 +1337,11 @@ class ClinicalAnalysis(_ParentRestClient):
|
|
|
1295
1337
|
:param str comments_action: Action to be performed if the array of
|
|
1296
1338
|
comments is being updated. Allowed values: ['ADD REMOVE REPLACE']
|
|
1297
1339
|
:param str signatures_action: Action to be performed if the array of
|
|
1298
|
-
signatures is being updated. Allowed values: ['ADD
|
|
1340
|
+
signatures is being updated. Allowed values: ['ADD REMOVE REPLACE']
|
|
1299
1341
|
:param str references_action: Action to be performed if the array of
|
|
1300
1342
|
references is being updated. Allowed values: ['ADD SET REMOVE']
|
|
1343
|
+
:param str images_action: Action to be performed if the array of
|
|
1344
|
+
images is being updated. Allowed values: ['ADD SET REMOVE']
|
|
1301
1345
|
:param bool include_result: Flag indicating to include the created or
|
|
1302
1346
|
updated document result in the response.
|
|
1303
1347
|
"""
|