genelastic 0.7.0__py3-none-any.whl → 0.9.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.
- genelastic/api/.env +4 -0
- genelastic/api/cli_start_api.py +18 -0
- genelastic/api/errors.py +52 -0
- genelastic/api/extends/example.py +0 -6
- genelastic/api/extends/example.yml +0 -0
- genelastic/api/routes.py +313 -181
- genelastic/api/server.py +34 -26
- genelastic/api/settings.py +5 -9
- genelastic/api/specification.yml +512 -0
- genelastic/common/__init__.py +0 -39
- genelastic/common/cli.py +100 -0
- genelastic/common/elastic.py +374 -46
- genelastic/common/exceptions.py +34 -2
- genelastic/common/server.py +59 -0
- genelastic/common/types.py +1 -14
- genelastic/import_data/__init__.py +0 -27
- genelastic/import_data/checker.py +99 -0
- genelastic/import_data/checker_observer.py +13 -0
- genelastic/import_data/cli/__init__.py +0 -0
- genelastic/import_data/cli/cli_check.py +136 -0
- genelastic/import_data/cli/gen_data.py +143 -0
- genelastic/import_data/cli/import_data.py +346 -0
- genelastic/import_data/cli/info.py +247 -0
- genelastic/import_data/{cli_integrity.py → cli/integrity.py} +29 -7
- genelastic/import_data/cli/validate.py +146 -0
- genelastic/import_data/collect.py +185 -0
- genelastic/import_data/constants.py +136 -11
- genelastic/import_data/import_bundle.py +102 -59
- genelastic/import_data/import_bundle_factory.py +70 -149
- genelastic/import_data/importers/__init__.py +0 -0
- genelastic/import_data/importers/importer_base.py +131 -0
- genelastic/import_data/importers/importer_factory.py +85 -0
- genelastic/import_data/importers/importer_types.py +223 -0
- genelastic/import_data/logger.py +2 -1
- genelastic/import_data/models/__init__.py +0 -0
- genelastic/import_data/models/analyses.py +178 -0
- genelastic/import_data/models/analysis.py +144 -0
- genelastic/import_data/models/data_file.py +110 -0
- genelastic/import_data/models/process.py +45 -0
- genelastic/import_data/models/processes.py +84 -0
- genelastic/import_data/models/tags.py +170 -0
- genelastic/import_data/models/unique_list.py +109 -0
- genelastic/import_data/models/validate.py +26 -0
- genelastic/import_data/patterns.py +90 -0
- genelastic/import_data/random_bundle.py +79 -54
- genelastic/import_data/resolve.py +157 -0
- genelastic/ui/.env +1 -0
- genelastic/ui/cli_start_ui.py +20 -0
- genelastic/ui/routes.py +333 -0
- genelastic/ui/server.py +9 -82
- genelastic/ui/settings.py +2 -6
- genelastic/ui/static/cea-cnrgh.ico +0 -0
- genelastic/ui/static/cea.ico +0 -0
- genelastic/ui/static/layout.ico +0 -0
- genelastic/ui/static/novaseq6000.png +0 -0
- genelastic/ui/static/style.css +430 -0
- genelastic/ui/static/ui.js +458 -0
- genelastic/ui/templates/analyses.html +98 -0
- genelastic/ui/templates/analysis_detail.html +44 -0
- genelastic/ui/templates/bi_process_detail.html +129 -0
- genelastic/ui/templates/bi_processes.html +116 -0
- genelastic/ui/templates/explorer.html +356 -0
- genelastic/ui/templates/home.html +207 -0
- genelastic/ui/templates/layout.html +153 -0
- genelastic/ui/templates/version.html +21 -0
- genelastic/ui/templates/wet_process_detail.html +131 -0
- genelastic/ui/templates/wet_processes.html +116 -0
- genelastic-0.9.0.dist-info/METADATA +686 -0
- genelastic-0.9.0.dist-info/RECORD +76 -0
- genelastic-0.9.0.dist-info/WHEEL +4 -0
- genelastic-0.9.0.dist-info/entry_points.txt +10 -0
- genelastic-0.9.0.dist-info/licenses/LICENSE +519 -0
- genelastic/import_data/analyses.py +0 -69
- genelastic/import_data/analysis.py +0 -205
- genelastic/import_data/bi_process.py +0 -27
- genelastic/import_data/bi_processes.py +0 -49
- genelastic/import_data/cli_gen_data.py +0 -116
- genelastic/import_data/cli_import.py +0 -379
- genelastic/import_data/cli_info.py +0 -256
- genelastic/import_data/cli_validate.py +0 -54
- genelastic/import_data/data_file.py +0 -87
- genelastic/import_data/filename_pattern.py +0 -57
- genelastic/import_data/tags.py +0 -123
- genelastic/import_data/wet_process.py +0 -28
- genelastic/import_data/wet_processes.py +0 -53
- genelastic-0.7.0.dist-info/METADATA +0 -105
- genelastic-0.7.0.dist-info/RECORD +0 -40
- genelastic-0.7.0.dist-info/WHEEL +0 -5
- genelastic-0.7.0.dist-info/entry_points.txt +0 -6
- genelastic-0.7.0.dist-info/top_level.txt +0 -1
genelastic/api/server.py
CHANGED
|
@@ -3,14 +3,16 @@ from typing import Any
|
|
|
3
3
|
|
|
4
4
|
import connexion
|
|
5
5
|
import yaml
|
|
6
|
+
from connexion import FlaskApp
|
|
6
7
|
|
|
7
|
-
from genelastic.
|
|
8
|
+
from genelastic.api.errors import register_error_handlers
|
|
9
|
+
from genelastic.common.elastic import ElasticQueryConn
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
def load_yaml(file_path: Path) -> Any: # noqa: ANN401
|
|
11
13
|
"""Load a YAML file and return its content."""
|
|
12
14
|
content = None
|
|
13
|
-
with
|
|
15
|
+
with file_path.open(encoding="utf-8") as f:
|
|
14
16
|
try:
|
|
15
17
|
content = yaml.safe_load(f)
|
|
16
18
|
except yaml.YAMLError as exc:
|
|
@@ -42,39 +44,45 @@ def aggregate_openapi_specs(
|
|
|
42
44
|
|
|
43
45
|
content = load_yaml(entry)
|
|
44
46
|
|
|
45
|
-
if "paths" in content:
|
|
47
|
+
if content and "paths" in content:
|
|
46
48
|
main_spec["paths"].update(content["paths"])
|
|
47
49
|
|
|
48
50
|
return main_spec
|
|
49
51
|
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
connexion_app.
|
|
53
|
+
def create_app() -> FlaskApp:
|
|
54
|
+
# Initialiser l'application Connexion
|
|
55
|
+
connexion_app = connexion.FlaskApp(__name__)
|
|
56
|
+
connexion_app.app.config.from_object("genelastic.api.settings")
|
|
54
57
|
|
|
55
|
-
# Initialiser le client Elasticsearch
|
|
56
|
-
es_url = connexion_app.app.config["GENAPI_ES_URL"]
|
|
57
|
-
es_cert_fp = connexion_app.app.config["GENAPI_ES_CERT_FP"]
|
|
58
|
-
es_api_key = connexion_app.app.config["GENAPI_ES_ENCODED_API_KEY"]
|
|
58
|
+
# Initialiser le client Elasticsearch
|
|
59
|
+
es_url = connexion_app.app.config["GENAPI_ES_URL"]
|
|
60
|
+
es_cert_fp = connexion_app.app.config["GENAPI_ES_CERT_FP"]
|
|
61
|
+
es_api_key = connexion_app.app.config["GENAPI_ES_ENCODED_API_KEY"]
|
|
62
|
+
index_prefix = connexion_app.app.config["GENAPI_ES_INDEX_PREFIX"]
|
|
59
63
|
|
|
60
|
-
connexion_app.app.elastic_query_conn = ElasticQueryConn(
|
|
61
|
-
|
|
62
|
-
)
|
|
64
|
+
connexion_app.app.elastic_query_conn = ElasticQueryConn(
|
|
65
|
+
es_url, es_cert_fp, index_prefix, api_key=es_api_key
|
|
66
|
+
)
|
|
63
67
|
|
|
64
|
-
connexion_app.app.logger.debug(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
)
|
|
68
|
+
connexion_app.app.logger.debug(
|
|
69
|
+
"Successfully connected to Elasticsearch server: %s",
|
|
70
|
+
connexion_app.app.elastic_query_conn.client.info(),
|
|
71
|
+
)
|
|
68
72
|
|
|
69
|
-
# Chemins des fichiers YAML
|
|
70
|
-
main_yaml_file = Path(__file__).parents[0] / "specification.yml"
|
|
71
|
-
additional_yaml_dir = Path(__file__).parents[0] / "extends"
|
|
73
|
+
# Chemins des fichiers YAML
|
|
74
|
+
main_yaml_file = Path(__file__).parents[0] / "specification.yml"
|
|
75
|
+
additional_yaml_dir = Path(__file__).parents[0] / "extends"
|
|
72
76
|
|
|
73
|
-
# Charger et combiner les fichiers YAML
|
|
74
|
-
yaml_spec = aggregate_openapi_specs(main_yaml_file, additional_yaml_dir)
|
|
77
|
+
# Charger et combiner les fichiers YAML
|
|
78
|
+
yaml_spec = aggregate_openapi_specs(main_yaml_file, additional_yaml_dir)
|
|
75
79
|
|
|
76
|
-
# Ajouter la spécification vers OpenAPI
|
|
77
|
-
connexion_app.add_api(yaml_spec)
|
|
80
|
+
# Ajouter la spécification vers OpenAPI
|
|
81
|
+
connexion_app.add_api(yaml_spec)
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
register_error_handlers(connexion_app.app)
|
|
84
|
+
|
|
85
|
+
return connexion_app
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
app = create_app()
|
genelastic/api/settings.py
CHANGED
|
@@ -3,12 +3,8 @@ from environs import Env
|
|
|
3
3
|
env = Env()
|
|
4
4
|
env.read_env()
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
GENAPI_ES_URL = env.url("GENAPI_ES_URL").geturl()
|
|
12
|
-
GENAPI_ES_ENCODED_API_KEY = env.str("GENAPI_ES_ENCODED_API_KEY")
|
|
13
|
-
GENAPI_ES_INDEX_PREFIX = env.str("GENAPI_ES_INDEX_PREFIX")
|
|
14
|
-
GENAPI_ES_CERT_FP = env.str("GENAPI_ES_CERT_FP")
|
|
6
|
+
# Load required environment variables.
|
|
7
|
+
GENAPI_ES_URL = env.url("GENAPI_ES_URL").geturl()
|
|
8
|
+
GENAPI_ES_ENCODED_API_KEY = env.str("GENAPI_ES_ENCODED_API_KEY")
|
|
9
|
+
GENAPI_ES_INDEX_PREFIX = env.str("GENAPI_ES_INDEX_PREFIX")
|
|
10
|
+
GENAPI_ES_CERT_FP = env.str("GENAPI_ES_CERT_FP")
|
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
---
|
|
2
|
+
openapi: "3.0.3"
|
|
3
|
+
info:
|
|
4
|
+
description: C'est le fichier Swagger de l'API de la Base Expérimentale (genelastic).
|
|
5
|
+
version: "1.0.1"
|
|
6
|
+
title: API de la Base Expérimentale (genelastic)
|
|
7
|
+
servers:
|
|
8
|
+
- url: "/api"
|
|
9
|
+
|
|
10
|
+
paths:
|
|
11
|
+
|
|
12
|
+
/indexes:
|
|
13
|
+
get:
|
|
14
|
+
operationId: genelastic.api.routes.indexes
|
|
15
|
+
tags:
|
|
16
|
+
- Indexes
|
|
17
|
+
summary: Renvoie tous les index présents dans Elasticsearch
|
|
18
|
+
responses:
|
|
19
|
+
200:
|
|
20
|
+
description: Success of the request
|
|
21
|
+
content:
|
|
22
|
+
application/json:
|
|
23
|
+
schema:
|
|
24
|
+
type: object
|
|
25
|
+
400:
|
|
26
|
+
description: The server could not understand the request due to invalid syntax.
|
|
27
|
+
500:
|
|
28
|
+
description: Internal server error
|
|
29
|
+
|
|
30
|
+
/documents/{index_id}/{document_id}:
|
|
31
|
+
get:
|
|
32
|
+
operationId: genelastic.api.routes.retrieve_document_by_index_and_id
|
|
33
|
+
parameters:
|
|
34
|
+
- in: path
|
|
35
|
+
name: index_id
|
|
36
|
+
schema:
|
|
37
|
+
type: string
|
|
38
|
+
required: true
|
|
39
|
+
description: L'index dans lequel rechercher le document
|
|
40
|
+
- in: path
|
|
41
|
+
name: document_id
|
|
42
|
+
schema:
|
|
43
|
+
type: string
|
|
44
|
+
required: true
|
|
45
|
+
description: L'ID du document à récupérer
|
|
46
|
+
tags:
|
|
47
|
+
- Documents
|
|
48
|
+
summary: Retourne un document selon l'index et l'ID du document
|
|
49
|
+
responses:
|
|
50
|
+
200:
|
|
51
|
+
description: Success in reading the data
|
|
52
|
+
content:
|
|
53
|
+
application/json:
|
|
54
|
+
schema:
|
|
55
|
+
type: object
|
|
56
|
+
404:
|
|
57
|
+
description: Document not found
|
|
58
|
+
500:
|
|
59
|
+
description: Internal server error
|
|
60
|
+
|
|
61
|
+
/wet_processes:
|
|
62
|
+
get:
|
|
63
|
+
operationId: genelastic.api.routes.wet_processes
|
|
64
|
+
summary: Renvoie la liste des wet processes
|
|
65
|
+
tags:
|
|
66
|
+
- Wet processes
|
|
67
|
+
responses:
|
|
68
|
+
200:
|
|
69
|
+
description: List of wet processes
|
|
70
|
+
content:
|
|
71
|
+
application/json:
|
|
72
|
+
schema:
|
|
73
|
+
type: array
|
|
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
|
+
|
|
120
|
+
/bi_processes:
|
|
121
|
+
get:
|
|
122
|
+
operationId: genelastic.api.routes.bi_processes
|
|
123
|
+
summary: Renvoie la liste des bi processes
|
|
124
|
+
tags:
|
|
125
|
+
- Bi processes
|
|
126
|
+
responses:
|
|
127
|
+
200:
|
|
128
|
+
description: List of bi processes
|
|
129
|
+
content:
|
|
130
|
+
application/json:
|
|
131
|
+
schema:
|
|
132
|
+
type: array
|
|
133
|
+
|
|
134
|
+
/bi_processes/{proc_id}:
|
|
135
|
+
get:
|
|
136
|
+
operationId: genelastic.api.routes.get_bi_process
|
|
137
|
+
summary: Renvoie la liste des détails d'un bi process spécifique
|
|
138
|
+
tags:
|
|
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
|
|
147
|
+
responses:
|
|
148
|
+
200:
|
|
149
|
+
description: List of bi processes
|
|
150
|
+
content:
|
|
151
|
+
application/json:
|
|
152
|
+
schema:
|
|
153
|
+
type: array
|
|
154
|
+
404:
|
|
155
|
+
description: Bi process not found
|
|
156
|
+
|
|
157
|
+
/bi_process/{proc_id}/analyses:
|
|
158
|
+
get:
|
|
159
|
+
operationId: genelastic.api.routes.list_analyses_by_bi_process
|
|
160
|
+
summary: Renvoie les analyses qui contiennent le bi process spécifié
|
|
161
|
+
tags:
|
|
162
|
+
- Analyses
|
|
163
|
+
parameters:
|
|
164
|
+
- in: path
|
|
165
|
+
name: proc_id
|
|
166
|
+
schema:
|
|
167
|
+
type: string
|
|
168
|
+
required: true
|
|
169
|
+
description: Bi process ID
|
|
170
|
+
responses:
|
|
171
|
+
200:
|
|
172
|
+
description: List of bi processes
|
|
173
|
+
content:
|
|
174
|
+
application/json:
|
|
175
|
+
schema:
|
|
176
|
+
type: array
|
|
177
|
+
items:
|
|
178
|
+
type: string
|
|
179
|
+
|
|
180
|
+
/bi_process/{proc_id}/analyses/esql_query:
|
|
181
|
+
get:
|
|
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)
|
|
184
|
+
tags:
|
|
185
|
+
- Analyses
|
|
186
|
+
parameters:
|
|
187
|
+
- in: path
|
|
188
|
+
name: proc_id
|
|
189
|
+
schema:
|
|
190
|
+
type: string
|
|
191
|
+
required: true
|
|
192
|
+
description: Bi process ID
|
|
193
|
+
responses:
|
|
194
|
+
200:
|
|
195
|
+
description: List of bi processes
|
|
196
|
+
content:
|
|
197
|
+
application/json:
|
|
198
|
+
schema:
|
|
199
|
+
type: array
|
|
200
|
+
items:
|
|
201
|
+
type: string
|
|
202
|
+
|
|
203
|
+
/bi_process/{proc_id}/analyses/sql_query:
|
|
204
|
+
get:
|
|
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)
|
|
207
|
+
tags:
|
|
208
|
+
- Analyses
|
|
209
|
+
parameters:
|
|
210
|
+
- in: path
|
|
211
|
+
name: proc_id
|
|
212
|
+
schema:
|
|
213
|
+
type: string
|
|
214
|
+
required: true
|
|
215
|
+
description: Bi process ID
|
|
216
|
+
responses:
|
|
217
|
+
200:
|
|
218
|
+
description: List of bi processes
|
|
219
|
+
content:
|
|
220
|
+
application/json:
|
|
221
|
+
schema:
|
|
222
|
+
type: array
|
|
223
|
+
items:
|
|
224
|
+
type: string
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
/analyses:
|
|
228
|
+
get:
|
|
229
|
+
operationId: genelastic.api.routes.analyses
|
|
230
|
+
summary: Renvoie une liste de toutes les analyses présentes dans Elasticsearch
|
|
231
|
+
tags:
|
|
232
|
+
- Analyses
|
|
233
|
+
responses:
|
|
234
|
+
200:
|
|
235
|
+
description: List of analyses
|
|
236
|
+
content:
|
|
237
|
+
application/json:
|
|
238
|
+
schema:
|
|
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"
|
|
422
|
+
|
|
423
|
+
/analyses/key_value_analyses_index:
|
|
424
|
+
get:
|
|
425
|
+
operationId: genelastic.api.routes.key_value_analyses_index
|
|
426
|
+
tags:
|
|
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
|
|
430
|
+
responses:
|
|
431
|
+
200:
|
|
432
|
+
description: Success
|
|
433
|
+
content:
|
|
434
|
+
application/json:
|
|
435
|
+
schema:
|
|
436
|
+
type: array
|
|
437
|
+
items:
|
|
438
|
+
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
|
|
462
|
+
properties:
|
|
463
|
+
error:
|
|
464
|
+
type: string
|
|
465
|
+
|
|
466
|
+
/wet_processes/count_key_value_wet_processes_index:
|
|
467
|
+
get:
|
|
468
|
+
operationId: genelastic.api.routes.count_wet_process_fields
|
|
469
|
+
tags:
|
|
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
|
|
473
|
+
responses:
|
|
474
|
+
200:
|
|
475
|
+
description: Success
|
|
476
|
+
content:
|
|
477
|
+
application/json:
|
|
478
|
+
schema:
|
|
479
|
+
type: object
|
|
480
|
+
additionalProperties:
|
|
481
|
+
oneOf:
|
|
482
|
+
- type: object
|
|
483
|
+
additionalProperties:
|
|
484
|
+
type: integer
|
|
485
|
+
- type: object
|
|
486
|
+
properties:
|
|
487
|
+
error:
|
|
488
|
+
type: string
|
|
489
|
+
|
|
490
|
+
/bi_processes/count_key_value_bi_processes_index:
|
|
491
|
+
get:
|
|
492
|
+
operationId: genelastic.api.routes.count_bi_process_fields
|
|
493
|
+
tags:
|
|
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
|
|
497
|
+
responses:
|
|
498
|
+
200:
|
|
499
|
+
description: Success
|
|
500
|
+
content:
|
|
501
|
+
application/json:
|
|
502
|
+
schema:
|
|
503
|
+
type: object
|
|
504
|
+
additionalProperties:
|
|
505
|
+
oneOf:
|
|
506
|
+
- type: object
|
|
507
|
+
additionalProperties:
|
|
508
|
+
type: integer
|
|
509
|
+
- type: object
|
|
510
|
+
properties:
|
|
511
|
+
error:
|
|
512
|
+
type: string
|
genelastic/common/__init__.py
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"""Genelastic package for common code between API and import scripts."""
|
|
2
|
-
|
|
3
|
-
from .cli import add_es_connection_args, add_verbose_control_args
|
|
4
|
-
from .elastic import ElasticImportConn, ElasticQueryConn
|
|
5
|
-
from .exceptions import DBIntegrityError
|
|
6
|
-
from .types import (
|
|
7
|
-
AnalysisDocument,
|
|
8
|
-
AnalysisMetaData,
|
|
9
|
-
BioInfoProcessData,
|
|
10
|
-
Bucket,
|
|
11
|
-
BulkItems,
|
|
12
|
-
BundleDict,
|
|
13
|
-
MetadataDocument,
|
|
14
|
-
ProcessDocument,
|
|
15
|
-
RandomAnalysisData,
|
|
16
|
-
RandomBiProcessData,
|
|
17
|
-
RandomWetProcessData,
|
|
18
|
-
WetProcessesData,
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
__all__ = [
|
|
22
|
-
"AnalysisDocument",
|
|
23
|
-
"AnalysisMetaData",
|
|
24
|
-
"BioInfoProcessData",
|
|
25
|
-
"Bucket",
|
|
26
|
-
"BulkItems",
|
|
27
|
-
"BundleDict",
|
|
28
|
-
"DBIntegrityError",
|
|
29
|
-
"ElasticImportConn",
|
|
30
|
-
"ElasticQueryConn",
|
|
31
|
-
"MetadataDocument",
|
|
32
|
-
"ProcessDocument",
|
|
33
|
-
"RandomAnalysisData",
|
|
34
|
-
"RandomBiProcessData",
|
|
35
|
-
"RandomWetProcessData",
|
|
36
|
-
"WetProcessesData",
|
|
37
|
-
"add_es_connection_args",
|
|
38
|
-
"add_verbose_control_args",
|
|
39
|
-
]
|