Skip to content

Commit 2740bc1

Browse files
Merge pull request #115 from Clinical-Genomics/fix_multiple_conditions_parsing
Fix multiple conditions parsing
2 parents 2503caa + 9e3135f commit 2740bc1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## [unreleased]
22
### Fixed
33
- Upload to Codecov step in `tests_n_coverage.yml` action
4+
- Fix `multipleConditionExplanation` to be lowercase
45

56
## [2.5.1]
67
### Fixed

preClinVar/file_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def set_item_condition_set(item: dict, variant_dict: dict):
9494
item["conditionSet"] = {"condition": conditions}
9595
if multi_condition_explanation:
9696
item["conditionSet"][
97-
"MultipleConditionExplanation"
97+
"multipleConditionExplanation"
9898
] = multi_condition_explanation.capitalize()
9999

100100

tests/test_file_parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from preClinVar.constants import CLNSIG_TERMS
22
from preClinVar.file_parser import (
3-
csv_lines,
43
set_item_clin_sig,
54
set_item_condition_set,
65
set_item_variant_set,
@@ -50,7 +49,7 @@ def test_set_item_condition_set():
5049
set_item_condition_set(item=item, variant_dict=variant_dict)
5150

5251
# THEN it should contain the expected key/values
53-
assert item["conditionSet"]["MultipleConditionExplanation"] == MULTIPLE_COND_EXPLANATION
52+
assert item["conditionSet"]["multipleConditionExplanation"] == MULTIPLE_COND_EXPLANATION
5453
for condition in item["conditionSet"]["condition"]:
5554
assert condition["db"] == CONDITION_DB
5655
assert condition["id"] in OMIM_NUMBERS

0 commit comments

Comments
 (0)