genelastic 0.8.0__py3-none-any.whl → 0.10.0__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.
Files changed (85) hide show
  1. genelastic/api/.env +4 -0
  2. genelastic/api/cli_start_api.py +2 -2
  3. genelastic/api/errors.py +52 -0
  4. genelastic/api/extends/example.py +0 -6
  5. genelastic/api/extends/example.yml +0 -20
  6. genelastic/api/routes.py +313 -181
  7. genelastic/api/server.py +8 -3
  8. genelastic/api/specification.yml +343 -181
  9. genelastic/common/__init__.py +0 -44
  10. genelastic/common/cli.py +52 -11
  11. genelastic/common/elastic.py +374 -46
  12. genelastic/common/exceptions.py +34 -2
  13. genelastic/common/server.py +9 -1
  14. genelastic/common/types.py +1 -14
  15. genelastic/import_data/__init__.py +0 -27
  16. genelastic/import_data/checker.py +99 -0
  17. genelastic/import_data/checker_observer.py +13 -0
  18. genelastic/import_data/cli/__init__.py +0 -0
  19. genelastic/import_data/cli/cli_check.py +135 -0
  20. genelastic/import_data/{cli_gen_data.py → cli/gen_data.py} +4 -4
  21. genelastic/import_data/cli/import_data.py +345 -0
  22. genelastic/import_data/cli/info.py +246 -0
  23. genelastic/import_data/{cli_integrity.py → cli/integrity.py} +29 -8
  24. genelastic/import_data/cli/validate.py +146 -0
  25. genelastic/import_data/collect.py +185 -0
  26. genelastic/import_data/constants.py +136 -11
  27. genelastic/import_data/import_bundle.py +102 -59
  28. genelastic/import_data/import_bundle_factory.py +70 -149
  29. genelastic/import_data/importers/__init__.py +0 -0
  30. genelastic/import_data/importers/importer_base.py +136 -0
  31. genelastic/import_data/importers/importer_factory.py +85 -0
  32. genelastic/import_data/importers/importer_types.py +234 -0
  33. genelastic/import_data/logger.py +2 -1
  34. genelastic/import_data/models/__init__.py +0 -0
  35. genelastic/import_data/models/analyses.py +178 -0
  36. genelastic/import_data/models/analysis.py +144 -0
  37. genelastic/import_data/models/data_file.py +110 -0
  38. genelastic/import_data/models/process.py +45 -0
  39. genelastic/import_data/models/processes.py +84 -0
  40. genelastic/import_data/models/tags.py +170 -0
  41. genelastic/import_data/models/unique_list.py +109 -0
  42. genelastic/import_data/models/validate.py +26 -0
  43. genelastic/import_data/patterns.py +90 -0
  44. genelastic/import_data/random_bundle.py +10 -8
  45. genelastic/import_data/resolve.py +157 -0
  46. genelastic/ui/.env +1 -0
  47. genelastic/ui/cli_start_ui.py +4 -2
  48. genelastic/ui/routes.py +289 -42
  49. genelastic/ui/static/cea-cnrgh.ico +0 -0
  50. genelastic/ui/static/cea.ico +0 -0
  51. genelastic/ui/static/layout.ico +0 -0
  52. genelastic/ui/static/novaseq6000.png +0 -0
  53. genelastic/ui/static/style.css +430 -0
  54. genelastic/ui/static/ui.js +458 -0
  55. genelastic/ui/templates/analyses.html +96 -9
  56. genelastic/ui/templates/analysis_detail.html +44 -0
  57. genelastic/ui/templates/bi_process_detail.html +129 -0
  58. genelastic/ui/templates/bi_processes.html +114 -9
  59. genelastic/ui/templates/explorer.html +356 -0
  60. genelastic/ui/templates/home.html +205 -2
  61. genelastic/ui/templates/layout.html +148 -29
  62. genelastic/ui/templates/version.html +19 -7
  63. genelastic/ui/templates/wet_process_detail.html +131 -0
  64. genelastic/ui/templates/wet_processes.html +114 -9
  65. genelastic-0.10.0.dist-info/METADATA +686 -0
  66. genelastic-0.10.0.dist-info/RECORD +76 -0
  67. {genelastic-0.8.0.dist-info → genelastic-0.10.0.dist-info}/WHEEL +1 -2
  68. genelastic-0.10.0.dist-info/entry_points.txt +10 -0
  69. genelastic-0.10.0.dist-info/licenses/LICENSE +519 -0
  70. genelastic/import_data/analyses.py +0 -69
  71. genelastic/import_data/analysis.py +0 -205
  72. genelastic/import_data/bi_process.py +0 -27
  73. genelastic/import_data/bi_processes.py +0 -49
  74. genelastic/import_data/cli_import.py +0 -379
  75. genelastic/import_data/cli_info.py +0 -256
  76. genelastic/import_data/cli_validate.py +0 -54
  77. genelastic/import_data/data_file.py +0 -87
  78. genelastic/import_data/filename_pattern.py +0 -57
  79. genelastic/import_data/tags.py +0 -123
  80. genelastic/import_data/wet_process.py +0 -28
  81. genelastic/import_data/wet_processes.py +0 -53
  82. genelastic-0.8.0.dist-info/METADATA +0 -109
  83. genelastic-0.8.0.dist-info/RECORD +0 -52
  84. genelastic-0.8.0.dist-info/entry_points.txt +0 -8
  85. genelastic-0.8.0.dist-info/top_level.txt +0 -1
@@ -1,39 +1,20 @@
1
1
  ---
2
2
  openapi: "3.0.3"
3
3
  info:
4
- description: This is the swagger file for our API
4
+ description: C'est le fichier Swagger de l'API de la Base Expérimentale (genelastic).
5
5
  version: "1.0.1"
6
- title: Swagger for ReST API
6
+ title: API de la Base Expérimentale (genelastic)
7
7
  servers:
8
8
  - url: "/api"
9
9
 
10
10
  paths:
11
- /ping:
12
- get:
13
- operationId: genelastic.api.routes.ping
14
- tags:
15
- - Tests
16
- summary: Server status check
17
- description: Test route to verify that the server is online
18
- responses:
19
- 200:
20
- description: The server is online
21
- content:
22
- application/json:
23
- schema:
24
- type: object
25
- properties:
26
- message:
27
- type: string
28
- example: pong
29
11
 
30
- /indices:
12
+ /indexes:
31
13
  get:
32
- operationId: genelastic.api.routes.list_indices
14
+ operationId: genelastic.api.routes.indexes
33
15
  tags:
34
16
  - Indexes
35
- summary: Listing the indexes present in Elasticsearch
36
- description: Listing the indexes present in Elasticsearch
17
+ summary: Renvoie tous les index présents dans Elasticsearch
37
18
  responses:
38
19
  200:
39
20
  description: Success of the request
@@ -46,26 +27,25 @@ paths:
46
27
  500:
47
28
  description: Internal server error
48
29
 
49
- /indices/{index_id}/documents/{document_id}:
30
+ /documents/{index_id}/{document_id}:
50
31
  get:
51
- operationId: genelastic.api.routes.retrieve_document
32
+ operationId: genelastic.api.routes.retrieve_document_by_index_and_id
52
33
  parameters:
53
34
  - in: path
54
35
  name: index_id
55
36
  schema:
56
37
  type: string
57
38
  required: true
58
- description: The index in which to search for the document
39
+ description: L'index dans lequel rechercher le document
59
40
  - in: path
60
41
  name: document_id
61
42
  schema:
62
43
  type: string
63
44
  required: true
64
- description: The ID of the document to retrieve
45
+ description: L'ID du document à récupérer
65
46
  tags:
66
- - Document
67
- summary: Retrieve a document
68
- description: Retrieve a specific document from Elasticsearch
47
+ - Documents
48
+ summary: Retourne un document selon l'index et l'ID du document
69
49
  responses:
70
50
  200:
71
51
  description: Success in reading the data
@@ -80,8 +60,8 @@ paths:
80
60
 
81
61
  /wet_processes:
82
62
  get:
83
- operationId: genelastic.api.routes.list_wet_processes
84
- summary: Retrieve a list of wet processes
63
+ operationId: genelastic.api.routes.wet_processes
64
+ summary: Renvoie la liste des wet processes
85
65
  tags:
86
66
  - Wet processes
87
67
  responses:
@@ -92,10 +72,55 @@ paths:
92
72
  schema:
93
73
  type: array
94
74
 
75
+ /wet_processes/{proc_id}:
76
+ get:
77
+ operationId: genelastic.api.routes.get_wet_process
78
+ summary: Renvoie la liste des détails d'un wet process spécifique
79
+ tags:
80
+ - Wet processes
81
+ parameters:
82
+ - in: path
83
+ name: proc_id
84
+ schema:
85
+ type: string
86
+ required: true
87
+ description: Wet process ID
88
+ responses:
89
+ 200:
90
+ description: List of wet processes
91
+ content:
92
+ application/json:
93
+ schema:
94
+ type: array
95
+
96
+
97
+ /wet_process/{proc_id}/analyses:
98
+ get:
99
+ operationId: genelastic.api.routes.list_analyses_by_wet_process
100
+ summary: Renvoie les analyses qui contiennent le wet process spécifié
101
+ tags:
102
+ - Analyses
103
+ parameters:
104
+ - in: path
105
+ name: proc_id
106
+ schema:
107
+ type: string
108
+ required: true
109
+ description: Wet process ID
110
+ responses:
111
+ 200:
112
+ description: List of wet processes
113
+ content:
114
+ application/json:
115
+ schema:
116
+ type: array
117
+ items:
118
+ type: string
119
+
95
120
  /bi_processes:
96
121
  get:
97
- operationId: genelastic.api.routes.list_bi_processes
98
- summary: Retrieve a list of bi processes
122
+ operationId: genelastic.api.routes.bi_processes
123
+ summary: Renvoie la liste des bi processes
99
124
  tags:
100
125
  - Bi processes
101
126
  responses:
@@ -106,24 +131,33 @@ paths:
106
131
  schema:
107
132
  type: array
108
133
 
109
- /analyses:
134
+ /bi_processes/{proc_id}:
110
135
  get:
111
- operationId: genelastic.api.routes.list_analyses
112
- summary: Retrieve a list of analyses
136
+ operationId: genelastic.api.routes.get_bi_process
137
+ summary: Renvoie la liste des détails d'un bi process spécifique
113
138
  tags:
114
- - Analyses
139
+ - Bi processes
140
+ parameters:
141
+ - in: path
142
+ name: proc_id
143
+ schema:
144
+ type: string
145
+ required: true
146
+ description: Bi process ID
115
147
  responses:
116
148
  200:
117
- description: List of analyses
149
+ description: List of bi processes
118
150
  content:
119
151
  application/json:
120
152
  schema:
121
- type: string
153
+ type: array
154
+ 404:
155
+ description: Bi process not found
122
156
 
123
- /wet_process/{proc_id}:
157
+ /bi_process/{proc_id}/analyses:
124
158
  get:
125
- operationId: genelastic.api.routes.list_analyses_wet_processes
126
- summary: Retrieve a list of analyses of one specific wet process
159
+ operationId: genelastic.api.routes.list_analyses_by_bi_process
160
+ summary: Renvoie les analyses qui contiennent le bi process spécifié
127
161
  tags:
128
162
  - Analyses
129
163
  parameters:
@@ -132,10 +166,10 @@ paths:
132
166
  schema:
133
167
  type: string
134
168
  required: true
135
- description: Wet process ID
169
+ description: Bi process ID
136
170
  responses:
137
171
  200:
138
- description: List of wet processes
172
+ description: List of bi processes
139
173
  content:
140
174
  application/json:
141
175
  schema:
@@ -143,10 +177,10 @@ paths:
143
177
  items:
144
178
  type: string
145
179
 
146
- /bi_process/{proc_id}:
180
+ /bi_process/{proc_id}/analyses/esql_query:
147
181
  get:
148
- operationId: genelastic.api.routes.list_analyses_bi_processes
149
- summary: Retrieve a list of analyses of one specific bi process
182
+ operationId: genelastic.api.routes.list_analyses_by_bi_process_esql
183
+ summary: Renvoie les analyses qui contiennent le bi process spécifié (via une requête ESQL)
150
184
  tags:
151
185
  - Analyses
152
186
  parameters:
@@ -166,177 +200,300 @@ paths:
166
200
  items:
167
201
  type: string
168
202
 
169
- /snvs_documents:
203
+ /bi_process/{proc_id}/analyses/sql_query:
170
204
  get:
171
- operationId: genelastic.api.routes.list_snv_documents
172
- summary: Retrieve all documents containing an insertion (INS), a deletion (DEL) or a mutation
173
- at a single position (SNV)
205
+ operationId: genelastic.api.routes.list_analyses_by_bi_process_sql
206
+ summary: Renvoie les analyses qui contiennent le bi process spécifié (via une requête SQL)
174
207
  tags:
175
- - Documents
208
+ - Analyses
209
+ parameters:
210
+ - in: path
211
+ name: proc_id
212
+ schema:
213
+ type: string
214
+ required: true
215
+ description: Bi process ID
176
216
  responses:
177
217
  200:
178
- description: Complete list of documents containing an insertion (INS), a deletion (DEL) or a mutation
179
- at a single position (SNV)
218
+ description: List of bi processes
180
219
  content:
181
220
  application/json:
182
221
  schema:
183
222
  type: array
184
223
  items:
185
- type: object
186
- properties:
187
- type:
188
- type: string
189
- chr:
190
- type: string
191
- pos:
192
- type: integer
193
- alt:
194
- type: array
195
- items:
196
- type: string
197
- info:
198
- type: object
199
- additionalProperties:
200
- type: string
201
- 400:
202
- description: Invalid request
203
- 500:
204
- description: Internal server error
224
+ type: string
225
+
205
226
 
206
- /snvs_insertion_documents:
227
+ /analyses:
207
228
  get:
208
- operationId: genelastic.api.routes.list_snv_insertion_documents
209
- summary: Retrieve all documents containing an insertion (INS) at a single position (SNV)
229
+ operationId: genelastic.api.routes.analyses
230
+ summary: Renvoie une liste de toutes les analyses présentes dans Elasticsearch
210
231
  tags:
211
- - Documents
232
+ - Analyses
212
233
  responses:
213
234
  200:
214
- description: Complete list of documents containing an insertion (INS) at a single position (SNV)
235
+ description: List of analyses
215
236
  content:
216
237
  application/json:
217
238
  schema:
218
- type: array
219
- items:
220
- type: object
221
- properties:
222
- type:
223
- type: string
224
- chr:
225
- type: string
226
- pos:
227
- type: integer
228
- alt:
229
- type: array
230
- items:
231
- type: string
232
- info:
233
- type: object
234
- properties:
235
- SVTYPE:
236
- type: string
237
- END:
238
- type: integer
239
- SVLEN:
240
- type: array
241
- items:
242
- type: integer
243
- 400:
244
- description: Invalid request
245
- 500:
246
- description: Internal server error
239
+ type: string
240
+
241
+ # /snvs_documents:
242
+ # get:
243
+ # operationId: genelastic.api.routes.list_snv_documents
244
+ # summary: Retrieve all documents containing an insertion (INS), a deletion (DEL) or a mutation
245
+ # at a single position (SNV)
246
+ # tags:
247
+ # - Documents
248
+ # responses:
249
+ # 200:
250
+ # description: Complete list of documents containing an insertion (INS), a deletion (DEL) or a mutation
251
+ # at a single position (SNV)
252
+ # content:
253
+ # application/json:
254
+ # schema:
255
+ # type: array
256
+ # items:
257
+ # type: object
258
+ # properties:
259
+ # type:
260
+ # type: string
261
+ # chr:
262
+ # type: string
263
+ # pos:
264
+ # type: integer
265
+ # alt:
266
+ # type: array
267
+ # items:
268
+ # type: string
269
+ # info:
270
+ # type: object
271
+ # additionalProperties:
272
+ # type: string
273
+ # 400:
274
+ # description: Invalid request
275
+ # 500:
276
+ # description: Internal server error
277
+ #
278
+ # /snvs_insertion_documents:
279
+ # get:
280
+ # operationId: genelastic.api.routes.list_snv_insertion_documents
281
+ # summary: Retrieve all documents containing an insertion (INS) at a single position (SNV)
282
+ # tags:
283
+ # - Documents
284
+ # responses:
285
+ # 200:
286
+ # description: Complete list of documents containing an insertion (INS) at a single position (SNV)
287
+ # content:
288
+ # application/json:
289
+ # schema:
290
+ # type: array
291
+ # items:
292
+ # type: object
293
+ # properties:
294
+ # type:
295
+ # type: string
296
+ # chr:
297
+ # type: string
298
+ # pos:
299
+ # type: integer
300
+ # alt:
301
+ # type: array
302
+ # items:
303
+ # type: string
304
+ # info:
305
+ # type: object
306
+ # properties:
307
+ # SVTYPE:
308
+ # type: string
309
+ # END:
310
+ # type: integer
311
+ # SVLEN:
312
+ # type: array
313
+ # items:
314
+ # type: integer
315
+ # 400:
316
+ # description: Invalid request
317
+ # 500:
318
+ # description: Internal server error
319
+ #
320
+ # /snvs_deletion_documents:
321
+ # get:
322
+ # operationId: genelastic.api.routes.list_snv_deletion_documents
323
+ # summary: Retrieve all documents containing a deletion (DEL) at a single position (SNV)
324
+ # tags:
325
+ # - Documents
326
+ # responses:
327
+ # 200:
328
+ # description: Complete list of documents containing a deletion (DEL) at a single position (SNV)
329
+ # content:
330
+ # application/json:
331
+ # schema:
332
+ # type: array
333
+ # items:
334
+ # type: object
335
+ # properties:
336
+ # type:
337
+ # type: string
338
+ # chr:
339
+ # type: string
340
+ # pos:
341
+ # type: integer
342
+ # alt:
343
+ # type: array
344
+ # items:
345
+ # type: string
346
+ # info:
347
+ # type: object
348
+ # properties:
349
+ # SVTYPE:
350
+ # type: string
351
+ # END:
352
+ # type: integer
353
+ # SVLEN:
354
+ # type: array
355
+ # items:
356
+ # type: integer
357
+ # 400:
358
+ # description: Invalid request
359
+ # 500:
360
+ # description: Internal server error
361
+ #
362
+ # /snvs_mutation_documents:
363
+ # get:
364
+ # operationId: genelastic.api.routes.list_snv_mutation_documents
365
+ # summary: Retrieve all documents containing a mutation at a single position (SNV)
366
+ # tags:
367
+ # - Documents
368
+ # responses:
369
+ # 200:
370
+ # description: Complete list of documents containing a mutation at a single position (SNV)
371
+ # content:
372
+ # application/json:
373
+ # schema:
374
+ # type: array
375
+ # items:
376
+ # type: object
377
+ # properties:
378
+ # type:
379
+ # type: string
380
+ # chr:
381
+ # type: string
382
+ # pos:
383
+ # type: integer
384
+ # alt:
385
+ # type: array
386
+ # items:
387
+ # type: string
388
+ # info:
389
+ # type: object
390
+ # properties:
391
+ # SVTYPE:
392
+ # type: string
393
+ # END:
394
+ # type: integer
395
+ # SVLEN:
396
+ # type: array
397
+ # items:
398
+ # type: integer
399
+ # 400:
400
+ # description: Invalid request due to incorrect parameters or format
401
+ # 500:
402
+ # description: Internal server error
403
+
404
+ /version:
405
+ get:
406
+ operationId: genelastic.api.routes.version
407
+ tags:
408
+ - Version
409
+ summary: Get the genelastic package version
410
+ description: Return the installed version of the genelastic package
411
+ responses:
412
+ 200:
413
+ description: Success
414
+ content:
415
+ application/json:
416
+ schema:
417
+ type: object
418
+ properties:
419
+ version:
420
+ type: string
421
+ example: "1.0.0"
247
422
 
248
- /snvs_deletion_documents:
423
+ /analyses/key_value_analyses_index:
249
424
  get:
250
- operationId: genelastic.api.routes.list_snv_deletion_documents
251
- summary: Retrieve all documents containing a deletion (DEL) at a single position (SNV)
425
+ operationId: genelastic.api.routes.key_value_analyses_index
252
426
  tags:
253
- - Documents
427
+ - Analyses
428
+ summary: Get all metadata fields of analyses
429
+ description: Return a list of all flattened metadata key-value documents from the analyses index
254
430
  responses:
255
431
  200:
256
- description: Complete list of documents containing a deletion (DEL) at a single position (SNV)
432
+ description: Success
257
433
  content:
258
434
  application/json:
259
435
  schema:
260
436
  type: array
261
437
  items:
262
438
  type: object
263
- properties:
264
- type:
265
- type: string
266
- chr:
267
- type: string
268
- pos:
269
- type: integer
270
- alt:
271
- type: array
272
- items:
273
- type: string
274
- info:
275
- type: object
439
+ additionalProperties:
440
+ type: string
441
+
442
+ /analyses/count_key_value_analyses_index:
443
+ get:
444
+ operationId: genelastic.api.routes.count_key_value_analyses_index
445
+ tags:
446
+ - Analyses
447
+ summary: Count all key-value pairs of analyses metadata for aggregation
448
+ description: Return counts of each unique value for selected metadata fields in the analyses index
449
+ responses:
450
+ 200:
451
+ description: Success
452
+ content:
453
+ application/json:
454
+ schema:
455
+ type: object
456
+ additionalProperties:
457
+ oneOf:
458
+ - type: object
459
+ additionalProperties:
460
+ type: integer
461
+ - type: object
276
462
  properties:
277
- SVTYPE:
463
+ error:
278
464
  type: string
279
- END:
280
- type: integer
281
- SVLEN:
282
- type: array
283
- items:
284
- type: integer
285
- 400:
286
- description: Invalid request
287
- 500:
288
- description: Internal server error
289
465
 
290
- /snvs_mutation_documents:
466
+ /wet_processes/count_key_value_wet_processes_index:
291
467
  get:
292
- operationId: genelastic.api.routes.list_snv_mutation_documents
293
- summary: Retrieve all documents containing a mutation at a single position (SNV)
468
+ operationId: genelastic.api.routes.count_wet_process_fields
294
469
  tags:
295
- - Documents
470
+ - Wet processes
471
+ summary: Count all key-value pairs of wet processes metadata for aggregation
472
+ description: Return counts of each unique value for selected metadata fields in the wet-processes index
296
473
  responses:
297
474
  200:
298
- description: Complete list of documents containing a mutation at a single position (SNV)
475
+ description: Success
299
476
  content:
300
477
  application/json:
301
478
  schema:
302
- type: array
303
- items:
304
- type: object
305
- properties:
306
- type:
307
- type: string
308
- chr:
309
- type: string
310
- pos:
311
- type: integer
312
- alt:
313
- type: array
314
- items:
315
- type: string
316
- info:
317
- type: object
479
+ type: object
480
+ additionalProperties:
481
+ oneOf:
482
+ - type: object
483
+ additionalProperties:
484
+ type: integer
485
+ - type: object
318
486
  properties:
319
- SVTYPE:
487
+ error:
320
488
  type: string
321
- END:
322
- type: integer
323
- SVLEN:
324
- type: array
325
- items:
326
- type: integer
327
- 400:
328
- description: Invalid request due to incorrect parameters or format
329
- 500:
330
- description: Internal server error
331
-
332
489
 
333
- /version:
490
+ /bi_processes/count_key_value_bi_processes_index:
334
491
  get:
335
- operationId: genelastic.api.routes.get_genelastic_version
492
+ operationId: genelastic.api.routes.count_bi_process_fields
336
493
  tags:
337
- - Version
338
- summary: Get the genelastic package version
339
- description: Return the installed version of the genelastic package
494
+ - Bi processes
495
+ summary: Count all key-value pairs of bi processes metadata for aggregation
496
+ description: Return counts of each unique value for selected metadata fields in the bi-processes index
340
497
  responses:
341
498
  200:
342
499
  description: Success
@@ -344,7 +501,12 @@ paths:
344
501
  application/json:
345
502
  schema:
346
503
  type: object
347
- properties:
348
- version:
349
- type: string
350
- example: "1.0.0"
504
+ additionalProperties:
505
+ oneOf:
506
+ - type: object
507
+ additionalProperties:
508
+ type: integer
509
+ - type: object
510
+ properties:
511
+ error:
512
+ type: string