pheval-exomiser 0.3.4__tar.gz → 0.4.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.
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/PKG-INFO +2 -2
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/pyproject.toml +2 -2
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/post_process/post_process.py +2 -2
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/post_process/post_process_results_format.py +129 -9
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/prepare/create_batch_commands.py +28 -8
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/run/run.py +35 -18
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/runner.py +2 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/README.md +0 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/__init__.py +0 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/cli.py +0 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/constants.py +0 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/post_process/__init__.py +0 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/prepare/__init__.py +0 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/prepare/tool_specific_configuration_options.py +0 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/prepare/write_application_properties.py +0 -0
- {pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/run/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pheval_exomiser
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Yasemin Bridges
|
|
6
6
|
Author-email: y.bridges@qmul.ac.uk
|
|
@@ -17,7 +17,7 @@ Requires-Dist: google (>=3.0.0,<4.0.0)
|
|
|
17
17
|
Requires-Dist: numpy (<2)
|
|
18
18
|
Requires-Dist: oaklib (>=0.5.12,<0.6.0)
|
|
19
19
|
Requires-Dist: phenopackets (>=2.0.2,<3.0.0)
|
|
20
|
-
Requires-Dist: pheval (>=0.6.
|
|
20
|
+
Requires-Dist: pheval (>=0.6.7,<0.7.0)
|
|
21
21
|
Requires-Dist: pyaml (>=21.10.1,<22.0.0)
|
|
22
22
|
Requires-Dist: pydantic (>=2.7.1,<3.0.0)
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pheval_exomiser"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.4.0"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["Yasemin Bridges <y.bridges@qmul.ac.uk>",
|
|
6
6
|
"Julius Jacobsen <j.jacobsen@qmul.ac.uk>",
|
|
@@ -19,7 +19,7 @@ oaklib = "^0.5.12"
|
|
|
19
19
|
docker = "^6.0.1"
|
|
20
20
|
pydantic = "^2.7.1"
|
|
21
21
|
numpy = "<2"
|
|
22
|
-
pheval = "^0.6.
|
|
22
|
+
pheval = "^0.6.7"
|
|
23
23
|
|
|
24
24
|
[tool.poetry.dev-dependencies]
|
|
25
25
|
pytest = "^7.1.2"
|
{pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/post_process/post_process.py
RENAMED
|
@@ -12,9 +12,9 @@ def post_process_result_format(
|
|
|
12
12
|
variant_analysis: bool,
|
|
13
13
|
gene_analysis: bool,
|
|
14
14
|
disease_analysis: bool,
|
|
15
|
+
exomiser_version: str,
|
|
15
16
|
):
|
|
16
17
|
"""Standardise Exomiser json format to separated gene and variant results."""
|
|
17
|
-
print("...standardising results format...")
|
|
18
18
|
create_standardised_results(
|
|
19
19
|
result_dir=raw_results_dir,
|
|
20
20
|
output_dir=output_dir,
|
|
@@ -24,5 +24,5 @@ def post_process_result_format(
|
|
|
24
24
|
gene_analysis=gene_analysis,
|
|
25
25
|
disease_analysis=disease_analysis,
|
|
26
26
|
variant_analysis=variant_analysis,
|
|
27
|
+
exomiser_version=exomiser_version,
|
|
27
28
|
)
|
|
28
|
-
print("done")
|
|
@@ -4,6 +4,7 @@ from pathlib import Path
|
|
|
4
4
|
|
|
5
5
|
import click
|
|
6
6
|
import polars as pl
|
|
7
|
+
from packaging import version
|
|
7
8
|
from pheval.post_processing.post_processing import (
|
|
8
9
|
SortOrder,
|
|
9
10
|
generate_disease_result,
|
|
@@ -15,10 +16,15 @@ from pheval.utils.file_utils import files_with_suffix
|
|
|
15
16
|
|
|
16
17
|
class ModeOfInheritance(Enum):
|
|
17
18
|
AUTOSOMAL_DOMINANT = 1
|
|
19
|
+
AD = 1
|
|
18
20
|
AUTOSOMAL_RECESSIVE = 2
|
|
21
|
+
AR = 2
|
|
19
22
|
X_DOMINANT = 1
|
|
23
|
+
XD = 1
|
|
20
24
|
X_RECESSIVE = 2
|
|
25
|
+
XR = 2
|
|
21
26
|
MITOCHONDRIAL = 3
|
|
27
|
+
MT = 3
|
|
22
28
|
|
|
23
29
|
|
|
24
30
|
def trim_exomiser_result_filename(exomiser_result_path: Path) -> Path:
|
|
@@ -38,6 +44,18 @@ def extract_gene_results_from_json(
|
|
|
38
44
|
).drop_nulls()
|
|
39
45
|
|
|
40
46
|
|
|
47
|
+
def extract_gene_results_from_parquet(
|
|
48
|
+
exomiser_parquet_result: pl.DataFrame, score_name: str
|
|
49
|
+
) -> pl.DataFrame:
|
|
50
|
+
return exomiser_parquet_result.select(
|
|
51
|
+
[
|
|
52
|
+
pl.col("geneSymbol").alias("gene_symbol"),
|
|
53
|
+
pl.col("ensemblGeneId").alias("gene_identifier"),
|
|
54
|
+
pl.col(score_name).fill_null(0).round(4).alias("score"),
|
|
55
|
+
]
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
41
59
|
def extract_disease_results_from_json(exomiser_json_result: pl.DataFrame) -> pl.DataFrame:
|
|
42
60
|
return (
|
|
43
61
|
exomiser_json_result.select(
|
|
@@ -55,6 +73,18 @@ def extract_disease_results_from_json(exomiser_json_result: pl.DataFrame) -> pl.
|
|
|
55
73
|
)
|
|
56
74
|
|
|
57
75
|
|
|
76
|
+
def extract_disease_results_from_parquet(exomiser_parquet_result: pl.DataFrame) -> pl.DataFrame:
|
|
77
|
+
return (
|
|
78
|
+
exomiser_parquet_result.select(pl.col("diseaseMatches"))
|
|
79
|
+
.explode("diseaseMatches")
|
|
80
|
+
.select(
|
|
81
|
+
pl.col("diseaseMatches").struct.field("diseaseId").alias("disease_identifier"),
|
|
82
|
+
pl.col("diseaseMatches").struct.field("score").alias("score"),
|
|
83
|
+
)
|
|
84
|
+
.drop_nulls()
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
58
88
|
def extract_variant_results_from_json(
|
|
59
89
|
exomiser_json_result: pl.DataFrame, score_name: str
|
|
60
90
|
) -> pl.DataFrame:
|
|
@@ -124,6 +154,67 @@ def extract_variant_results_from_json(
|
|
|
124
154
|
)
|
|
125
155
|
|
|
126
156
|
|
|
157
|
+
def extract_variant_results_from_parquet(
|
|
158
|
+
exomiser_parquet_result: pl.DataFrame, score_name: str
|
|
159
|
+
) -> pl.DataFrame:
|
|
160
|
+
contributing_variant_only = exomiser_parquet_result.filter(
|
|
161
|
+
pl.col("isContributingVariant") == True # noqa
|
|
162
|
+
)
|
|
163
|
+
return (
|
|
164
|
+
contributing_variant_only.select(
|
|
165
|
+
[
|
|
166
|
+
pl.col("geneSymbol"),
|
|
167
|
+
pl.col("contigName").alias("chrom").cast(pl.String),
|
|
168
|
+
pl.col("start").cast(pl.Int64),
|
|
169
|
+
pl.col("end").cast(pl.Int64),
|
|
170
|
+
pl.col("ref"),
|
|
171
|
+
pl.col("alt"),
|
|
172
|
+
pl.col(score_name).alias("score"),
|
|
173
|
+
pl.col("moi")
|
|
174
|
+
.map_elements(lambda moi: ModeOfInheritance[moi].value, return_dtype=pl.Int8)
|
|
175
|
+
.alias("moi_enum"),
|
|
176
|
+
]
|
|
177
|
+
)
|
|
178
|
+
.with_columns(
|
|
179
|
+
[
|
|
180
|
+
(pl.col("moi_enum") == 2).alias("is_recessive"),
|
|
181
|
+
pl.when(pl.col("moi_enum") == 2)
|
|
182
|
+
.then(
|
|
183
|
+
pl.format(
|
|
184
|
+
"recessive|{}|{}|{}",
|
|
185
|
+
pl.col("geneSymbol"),
|
|
186
|
+
pl.col("score"),
|
|
187
|
+
pl.col("moi_enum"),
|
|
188
|
+
)
|
|
189
|
+
)
|
|
190
|
+
.otherwise(
|
|
191
|
+
pl.format(
|
|
192
|
+
"dominant|{}|{}|{}|{}|{}|{}",
|
|
193
|
+
pl.col("chrom"),
|
|
194
|
+
pl.col("start"),
|
|
195
|
+
pl.col("end"),
|
|
196
|
+
pl.col("ref"),
|
|
197
|
+
pl.col("alt"),
|
|
198
|
+
pl.col("score"),
|
|
199
|
+
)
|
|
200
|
+
)
|
|
201
|
+
.alias("group_key"),
|
|
202
|
+
]
|
|
203
|
+
)
|
|
204
|
+
.with_columns(
|
|
205
|
+
[
|
|
206
|
+
pl.col("group_key")
|
|
207
|
+
.rank("dense")
|
|
208
|
+
.cast(pl.UInt32)
|
|
209
|
+
.map_elements(
|
|
210
|
+
lambda i: str(uuid.uuid5(uuid.NAMESPACE_DNS, str(i))), return_dtype=pl.String
|
|
211
|
+
)
|
|
212
|
+
.alias("grouping_id")
|
|
213
|
+
]
|
|
214
|
+
)
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
127
218
|
def create_standardised_results(
|
|
128
219
|
result_dir: Path,
|
|
129
220
|
output_dir: Path,
|
|
@@ -133,36 +224,55 @@ def create_standardised_results(
|
|
|
133
224
|
gene_analysis: bool,
|
|
134
225
|
disease_analysis: bool,
|
|
135
226
|
variant_analysis: bool,
|
|
227
|
+
exomiser_version: str,
|
|
136
228
|
):
|
|
137
229
|
sort_order = SortOrder.ASCENDING if sort_order.lower() == "ascending" else SortOrder.DESCENDING
|
|
138
|
-
|
|
139
|
-
|
|
230
|
+
use_parquet = True if version.parse(exomiser_version) >= version.parse("15.0.0") else False
|
|
231
|
+
read_result = pl.read_parquet if use_parquet else pl.read_json
|
|
232
|
+
result_files = (
|
|
233
|
+
files_with_suffix(result_dir, ".parquet")
|
|
234
|
+
if use_parquet
|
|
235
|
+
else files_with_suffix(result_dir, ".json")
|
|
236
|
+
)
|
|
237
|
+
for exomiser_result_path in result_files:
|
|
238
|
+
exomiser_result = read_result(exomiser_result_path)
|
|
140
239
|
if gene_analysis:
|
|
141
|
-
gene_results =
|
|
240
|
+
gene_results = (
|
|
241
|
+
extract_gene_results_from_parquet(exomiser_result, score_name)
|
|
242
|
+
if use_parquet
|
|
243
|
+
else extract_gene_results_from_json(exomiser_result, score_name)
|
|
244
|
+
)
|
|
142
245
|
generate_gene_result(
|
|
143
246
|
results=gene_results,
|
|
144
247
|
sort_order=sort_order,
|
|
145
248
|
output_dir=output_dir,
|
|
146
|
-
result_path=trim_exomiser_result_filename(
|
|
249
|
+
result_path=trim_exomiser_result_filename(exomiser_result_path),
|
|
147
250
|
phenopacket_dir=phenopacket_dir,
|
|
148
251
|
)
|
|
149
252
|
if disease_analysis:
|
|
150
|
-
disease_results =
|
|
253
|
+
disease_results = (
|
|
254
|
+
extract_disease_results_from_parquet(exomiser_result)
|
|
255
|
+
if use_parquet
|
|
256
|
+
else extract_disease_results_from_json(exomiser_result)
|
|
257
|
+
)
|
|
151
258
|
generate_disease_result(
|
|
152
259
|
results=disease_results,
|
|
153
260
|
sort_order=sort_order,
|
|
154
261
|
output_dir=output_dir,
|
|
155
|
-
result_path=trim_exomiser_result_filename(
|
|
262
|
+
result_path=trim_exomiser_result_filename(exomiser_result_path),
|
|
156
263
|
phenopacket_dir=phenopacket_dir,
|
|
157
264
|
)
|
|
158
|
-
|
|
159
265
|
if variant_analysis:
|
|
160
|
-
variant_results =
|
|
266
|
+
variant_results = (
|
|
267
|
+
extract_variant_results_from_parquet(exomiser_result, score_name)
|
|
268
|
+
if use_parquet
|
|
269
|
+
else extract_variant_results_from_json(exomiser_result, score_name)
|
|
270
|
+
)
|
|
161
271
|
generate_variant_result(
|
|
162
272
|
results=variant_results,
|
|
163
273
|
sort_order=sort_order,
|
|
164
274
|
output_dir=output_dir,
|
|
165
|
-
result_path=trim_exomiser_result_filename(
|
|
275
|
+
result_path=trim_exomiser_result_filename(exomiser_result_path),
|
|
166
276
|
phenopacket_dir=phenopacket_dir,
|
|
167
277
|
)
|
|
168
278
|
|
|
@@ -228,6 +338,14 @@ def create_standardised_results(
|
|
|
228
338
|
default=False,
|
|
229
339
|
help="Specify whether to create PhEval disease results.",
|
|
230
340
|
)
|
|
341
|
+
@click.option(
|
|
342
|
+
"--version",
|
|
343
|
+
"-v",
|
|
344
|
+
required=True,
|
|
345
|
+
help="Exomiser version used to generate results.",
|
|
346
|
+
default="15.0.0",
|
|
347
|
+
show_default=True,
|
|
348
|
+
)
|
|
231
349
|
def post_process_exomiser_results(
|
|
232
350
|
output_dir: Path,
|
|
233
351
|
results_dir: Path,
|
|
@@ -237,6 +355,7 @@ def post_process_exomiser_results(
|
|
|
237
355
|
gene_analysis: bool,
|
|
238
356
|
variant_analysis: bool,
|
|
239
357
|
disease_analysis: bool,
|
|
358
|
+
version: str,
|
|
240
359
|
):
|
|
241
360
|
"""Post-process Exomiser json results into PhEval gene and variant outputs."""
|
|
242
361
|
(
|
|
@@ -263,4 +382,5 @@ def post_process_exomiser_results(
|
|
|
263
382
|
variant_analysis=variant_analysis,
|
|
264
383
|
gene_analysis=gene_analysis,
|
|
265
384
|
disease_analysis=disease_analysis,
|
|
385
|
+
exomiser_version=version,
|
|
266
386
|
)
|
{pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/prepare/create_batch_commands.py
RENAMED
|
@@ -4,6 +4,7 @@ from pathlib import Path
|
|
|
4
4
|
from typing import List, Optional
|
|
5
5
|
|
|
6
6
|
import click
|
|
7
|
+
from packaging import version
|
|
7
8
|
from phenopackets import Family, Phenopacket
|
|
8
9
|
from pheval.prepare.custom_exceptions import MutuallyExclusiveOptionError
|
|
9
10
|
from pheval.utils.file_utils import all_files, files_with_suffix
|
|
@@ -189,9 +190,10 @@ def create_command_arguments(
|
|
|
189
190
|
class CommandsWriter:
|
|
190
191
|
"""Write a command to file."""
|
|
191
192
|
|
|
192
|
-
def __init__(self, file: Path, variant_analysis: bool):
|
|
193
|
+
def __init__(self, file: Path, variant_analysis: bool, exomiser_version: str):
|
|
193
194
|
self.file = open(file, "w")
|
|
194
195
|
self.variant_analysis = variant_analysis
|
|
196
|
+
self.exomiser_version = exomiser_version
|
|
195
197
|
|
|
196
198
|
def write_basic_analysis_command(self, command_arguments: ExomiserCommandLineArguments):
|
|
197
199
|
"""Write basic analysis command for Exomiser"""
|
|
@@ -246,6 +248,11 @@ class CommandsWriter:
|
|
|
246
248
|
self, command_arguments: ExomiserCommandLineArguments
|
|
247
249
|
) -> None:
|
|
248
250
|
"""Write a phenotype-only command out for exomiser ≥13.2.0 to run."""
|
|
251
|
+
phenotype_only = (
|
|
252
|
+
"phenotype-only"
|
|
253
|
+
if version.parse(self.exomiser_version) < version.parse("15.0.0")
|
|
254
|
+
else "phenotype_only"
|
|
255
|
+
)
|
|
249
256
|
self.file.write(
|
|
250
257
|
"--sample "
|
|
251
258
|
+ str(command_arguments.sample)
|
|
@@ -254,7 +261,7 @@ class CommandsWriter:
|
|
|
254
261
|
+ " --output-filename "
|
|
255
262
|
+ f"{Path(command_arguments.sample).stem}-exomiser"
|
|
256
263
|
+ " --preset "
|
|
257
|
-
+
|
|
264
|
+
+ phenotype_only
|
|
258
265
|
)
|
|
259
266
|
|
|
260
267
|
def write_phenotype_only_command(self, command_arguments: ExomiserCommandLineArguments):
|
|
@@ -290,11 +297,13 @@ class BatchFileWriter:
|
|
|
290
297
|
variant_analysis: bool,
|
|
291
298
|
output_dir: Path,
|
|
292
299
|
batch_prefix: str,
|
|
300
|
+
exomiser_version: str,
|
|
293
301
|
):
|
|
294
302
|
self.command_arguments_list = command_arguments_list
|
|
295
303
|
self.variant_analysis = variant_analysis
|
|
296
304
|
self.output_dir = output_dir
|
|
297
305
|
self.batch_prefix = batch_prefix
|
|
306
|
+
self.exomiser_version = exomiser_version
|
|
298
307
|
|
|
299
308
|
def write_commands(self, commands_writer: CommandsWriter) -> None:
|
|
300
309
|
"""Write command arguments to a file."""
|
|
@@ -305,7 +314,9 @@ class BatchFileWriter:
|
|
|
305
314
|
def write_temp_file(self) -> str:
|
|
306
315
|
"""Write commands out to a temporary file."""
|
|
307
316
|
temp = tempfile.NamedTemporaryFile(delete=False)
|
|
308
|
-
commands_writer = CommandsWriter(
|
|
317
|
+
commands_writer = CommandsWriter(
|
|
318
|
+
Path(temp.name), self.variant_analysis, self.exomiser_version
|
|
319
|
+
)
|
|
309
320
|
self.write_commands(commands_writer)
|
|
310
321
|
return temp.name
|
|
311
322
|
|
|
@@ -314,6 +325,7 @@ class BatchFileWriter:
|
|
|
314
325
|
commands_writer = CommandsWriter(
|
|
315
326
|
Path(self.output_dir).joinpath(self.batch_prefix + "-exomiser-batch.txt"),
|
|
316
327
|
self.variant_analysis,
|
|
328
|
+
self.exomiser_version,
|
|
317
329
|
)
|
|
318
330
|
self.write_commands(commands_writer)
|
|
319
331
|
|
|
@@ -349,6 +361,7 @@ def create_batch_file(
|
|
|
349
361
|
max_jobs: int,
|
|
350
362
|
variant_analysis: bool,
|
|
351
363
|
results_dir: Path,
|
|
364
|
+
exomiser_version: str,
|
|
352
365
|
output_options_dir: Path = None,
|
|
353
366
|
output_options_file: Path = None,
|
|
354
367
|
output_formats: List[str] = None,
|
|
@@ -367,10 +380,7 @@ def create_batch_file(
|
|
|
367
380
|
)
|
|
368
381
|
(
|
|
369
382
|
BatchFileWriter(
|
|
370
|
-
command_arguments,
|
|
371
|
-
variant_analysis,
|
|
372
|
-
output_dir,
|
|
373
|
-
batch_prefix,
|
|
383
|
+
command_arguments, variant_analysis, output_dir, batch_prefix, exomiser_version
|
|
374
384
|
).write_all_commands()
|
|
375
385
|
if max_jobs == 0
|
|
376
386
|
else BatchFileWriter(
|
|
@@ -378,6 +388,7 @@ def create_batch_file(
|
|
|
378
388
|
variant_analysis,
|
|
379
389
|
output_dir,
|
|
380
390
|
batch_prefix,
|
|
391
|
+
exomiser_version,
|
|
381
392
|
).create_split_batch_files(max_jobs)
|
|
382
393
|
)
|
|
383
394
|
|
|
@@ -411,7 +422,6 @@ def create_batch_file(
|
|
|
411
422
|
@click.option(
|
|
412
423
|
"--vcf-dir",
|
|
413
424
|
"-v",
|
|
414
|
-
# required=True,
|
|
415
425
|
metavar="PATH",
|
|
416
426
|
type=Path,
|
|
417
427
|
help="Path to VCF directory.",
|
|
@@ -456,6 +466,14 @@ def create_batch_file(
|
|
|
456
466
|
required=False,
|
|
457
467
|
help="Results directory for Exomiser results - compatible with versions 13.2.0 onwards.",
|
|
458
468
|
)
|
|
469
|
+
@click.option(
|
|
470
|
+
"--exomiser-version",
|
|
471
|
+
"-v",
|
|
472
|
+
required=True,
|
|
473
|
+
help="Exomiser version used to generate results.",
|
|
474
|
+
default="15.0.0",
|
|
475
|
+
show_default=True,
|
|
476
|
+
)
|
|
459
477
|
@click.option(
|
|
460
478
|
"--output-options-dir",
|
|
461
479
|
"-O",
|
|
@@ -492,6 +510,7 @@ def prepare_exomiser_batch(
|
|
|
492
510
|
batch_prefix: str,
|
|
493
511
|
max_jobs: int,
|
|
494
512
|
variant_analysis: bool,
|
|
513
|
+
exomiser_version: str,
|
|
495
514
|
output_options_dir: Path = None,
|
|
496
515
|
output_options_file: Path = None,
|
|
497
516
|
output_formats: List[str] = None,
|
|
@@ -511,4 +530,5 @@ def prepare_exomiser_batch(
|
|
|
511
530
|
output_options_dir=output_options_dir,
|
|
512
531
|
output_options_file=output_options_file,
|
|
513
532
|
output_formats=list(output_formats),
|
|
533
|
+
exomiser_version=exomiser_version,
|
|
514
534
|
)
|
|
@@ -27,15 +27,17 @@ def prepare_batch_files(
|
|
|
27
27
|
tool_input_commands_dir: Path,
|
|
28
28
|
raw_results_dir: Path,
|
|
29
29
|
variant_analysis: bool,
|
|
30
|
+
exomiser_version: str,
|
|
30
31
|
) -> None:
|
|
31
32
|
"""Prepare the exomiser batch files"""
|
|
32
33
|
print("...preparing batch files...")
|
|
33
34
|
vcf_dir_name = Path(testdata_dir).joinpath("vcf")
|
|
34
|
-
|
|
35
|
-
config.output_formats
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
if version.parse(exomiser_version) >= version.parse("15.0.0"):
|
|
36
|
+
if "PARQUET" not in config.output_formats:
|
|
37
|
+
config.output_formats.append("PARQUET")
|
|
38
|
+
elif version.parse(exomiser_version) < version.parse("15.0.0"):
|
|
39
|
+
if "JSON" not in config.output_formats:
|
|
40
|
+
config.output_formats.append("JSON")
|
|
39
41
|
create_batch_file(
|
|
40
42
|
environment=config.environment,
|
|
41
43
|
analysis=input_dir.joinpath(config.analysis_configuration_file),
|
|
@@ -48,7 +50,8 @@ def prepare_batch_files(
|
|
|
48
50
|
output_options_dir=None,
|
|
49
51
|
results_dir=raw_results_dir,
|
|
50
52
|
variant_analysis=variant_analysis,
|
|
51
|
-
output_formats=output_formats,
|
|
53
|
+
output_formats=config.output_formats,
|
|
54
|
+
exomiser_version=exomiser_version,
|
|
52
55
|
)
|
|
53
56
|
|
|
54
57
|
|
|
@@ -121,18 +124,32 @@ def run_exomiser_local(
|
|
|
121
124
|
][0]
|
|
122
125
|
exomiser_jar_file_path = config.exomiser_software_directory.joinpath(exomiser_jar_file)
|
|
123
126
|
for file in batch_files:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
if version.parse(exomiser_version) < version.parse("15.0.0"):
|
|
128
|
+
subprocess.run(
|
|
129
|
+
[
|
|
130
|
+
"java",
|
|
131
|
+
"-Xmx4g",
|
|
132
|
+
"-jar",
|
|
133
|
+
exomiser_jar_file_path,
|
|
134
|
+
"--batch",
|
|
135
|
+
file,
|
|
136
|
+
f"--spring.config.location={Path(input_dir).joinpath('application.properties')}",
|
|
137
|
+
],
|
|
138
|
+
shell=False,
|
|
139
|
+
)
|
|
140
|
+
elif version.parse(exomiser_version) >= version.parse("15.0.0"):
|
|
141
|
+
subprocess.run(
|
|
142
|
+
[
|
|
143
|
+
"java",
|
|
144
|
+
"-Xmx4g",
|
|
145
|
+
f"-Dspring.config.location={str(Path(input_dir).joinpath('application.properties'))}",
|
|
146
|
+
"-jar",
|
|
147
|
+
exomiser_jar_file_path,
|
|
148
|
+
"batch",
|
|
149
|
+
file,
|
|
150
|
+
],
|
|
151
|
+
shell=False,
|
|
152
|
+
)
|
|
136
153
|
if version.parse(exomiser_version) < version.parse("13.1.0"):
|
|
137
154
|
os.rename(
|
|
138
155
|
f"{output_dir}/results",
|
|
@@ -45,6 +45,7 @@ class ExomiserPhEvalRunner(PhEvalRunner):
|
|
|
45
45
|
tool_input_commands_dir=self.tool_input_commands_dir,
|
|
46
46
|
raw_results_dir=self.raw_results_dir,
|
|
47
47
|
variant_analysis=self.input_dir_config.variant_analysis,
|
|
48
|
+
exomiser_version=self.version,
|
|
48
49
|
)
|
|
49
50
|
run_exomiser(
|
|
50
51
|
input_dir=self.input_dir,
|
|
@@ -71,4 +72,5 @@ class ExomiserPhEvalRunner(PhEvalRunner):
|
|
|
71
72
|
variant_analysis=self.input_dir_config.variant_analysis,
|
|
72
73
|
gene_analysis=self.input_dir_config.gene_analysis,
|
|
73
74
|
disease_analysis=self.input_dir_config.disease_analysis,
|
|
75
|
+
exomiser_version=self.version,
|
|
74
76
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pheval_exomiser-0.3.4 → pheval_exomiser-0.4.0}/src/pheval_exomiser/post_process/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|