Skip to content

Commit

Permalink
tox lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yaseminbridges committed Mar 18, 2024
1 parent ddc4265 commit 9b524be
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 32 deletions.
32 changes: 16 additions & 16 deletions src/pheval_lirical/prepare/prepare_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def add_manual_cli_arguments(
sample_id=self.phenopacket_util.sample_id(),
output_dir=self.results_dir,
output_prefix=self.phenopacket_path.stem,
exomiser_hg19_data_path=self.exomiser_hg19_data_path
if gene_analysis or variant_analysis
else None,
exomiser_hg38_data_path=self.exomiser_hg38_data_path
if gene_analysis or variant_analysis
else None,
exomiser_hg19_data_path=(
self.exomiser_hg19_data_path if gene_analysis or variant_analysis else None
),
exomiser_hg38_data_path=(
self.exomiser_hg38_data_path if gene_analysis or variant_analysis else None
),
)

def add_phenopacket_cli_arguments(
Expand All @@ -97,12 +97,12 @@ def add_phenopacket_cli_arguments(
exomiser_data=self.exomiser_data_dir,
output_dir=self.results_dir,
output_prefix=self.phenopacket_path.stem,
exomiser_hg19_data_path=self.exomiser_hg19_data_path
if gene_analysis or variant_analysis
else None,
exomiser_hg38_data_path=self.exomiser_hg38_data_path
if gene_analysis or variant_analysis
else None,
exomiser_hg19_data_path=(
self.exomiser_hg19_data_path if gene_analysis or variant_analysis else None
),
exomiser_hg38_data_path=(
self.exomiser_hg38_data_path if gene_analysis or variant_analysis else None
),
)

def add_cli_arguments(
Expand Down Expand Up @@ -279,10 +279,10 @@ def write_command(
) -> None:
"""Write LIRICAL command."""
try:
self.write_phenopacket_command(
command_arguments
) if self.mode.lower() == "phenopacket" else self.write_manual_command(
command_arguments
(
self.write_phenopacket_command(command_arguments)
if self.mode.lower() == "phenopacket"
else self.write_manual_command(command_arguments)
)
except IOError:
print("Error writing ", self.file)
Expand Down
38 changes: 22 additions & 16 deletions src/pheval_lirical/run/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,35 @@ def prepare_lirical_commands(
prepare_commands(
lirical_jar=input_dir.joinpath(tool_specific_configurations.lirical_jar_executable),
input_dir=input_dir.joinpath("data"),
exomiser_data_dir=input_dir.joinpath(
tool_specific_configurations.exomiser_db_configurations.exomiser_database
)
if tool_specific_configurations.exomiser_db_configurations.exomiser_database is not None
else None,
exomiser_data_dir=(
input_dir.joinpath(
tool_specific_configurations.exomiser_db_configurations.exomiser_database
)
if tool_specific_configurations.exomiser_db_configurations.exomiser_database is not None
else None
),
phenopacket_dir=phenopacket_dir,
vcf_dir=vcf_dir,
file_prefix=Path(testdata_dir).name,
tool_input_commands_dir=tool_input_commands_dir,
raw_results_dir=raw_results_dir,
mode=tool_specific_configurations.mode,
lirical_version=lirical_version,
exomiser_hg19_data=input_dir.joinpath(
tool_specific_configurations.exomiser_db_configurations.exomiser_hg19_database
)
if tool_specific_configurations.exomiser_db_configurations.exomiser_hg19_database
else None,
exomiser_hg38_data=input_dir.joinpath(
tool_specific_configurations.exomiser_db_configurations.exomiser_hg38_database
)
if tool_specific_configurations.exomiser_db_configurations.exomiser_hg38_database
is not None
else None,
exomiser_hg19_data=(
input_dir.joinpath(
tool_specific_configurations.exomiser_db_configurations.exomiser_hg19_database
)
if tool_specific_configurations.exomiser_db_configurations.exomiser_hg19_database
else None
),
exomiser_hg38_data=(
input_dir.joinpath(
tool_specific_configurations.exomiser_db_configurations.exomiser_hg38_database
)
if tool_specific_configurations.exomiser_db_configurations.exomiser_hg38_database
is not None
else None
),
gene_analysis=gene_analysis,
variant_analysis=variant_analysis,
),
Expand Down
1 change: 1 addition & 0 deletions src/pheval_lirical/runner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""LIRICAL Runner"""

from dataclasses import dataclass
from pathlib import Path

Expand Down

0 comments on commit 9b524be

Please sign in to comment.