Skip to content

Commit

Permalink
Capitalize field
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiara Rasi committed Jan 31, 2024
1 parent 5efbcea commit 450622c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions preClinVar/file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ def set_item_condition_set(item: dict, variant_dict: dict):
if cond_db and cond_values:
cond_values = cond_values.split(";")
for cond_id in cond_values:
conditions.append({"db": cond_db, "id": cond_id})
condition = {"db": cond_db, "id": cond_id}
conditions.append(condition)
if conditions:
item["conditionSet"] = {"condition": conditions}

if len(conditions) > 1 and multi_condition_explanation:
item["conditionSet"]["MultipleConditionExplanation"] = multi_condition_explanation
if multi_condition_explanation:
item["conditionSet"][
"MultipleConditionExplanation"
] = multi_condition_explanation.capitalize()


def set_item_local_id(item, variant_dict):
Expand Down

0 comments on commit 450622c

Please sign in to comment.