Skip to content

Commit

Permalink
Merge pull request #46 from monarch-initiative/45-convert-expects-a-l…
Browse files Browse the repository at this point in the history
…ist-of-omim-ids

45 convert expects a list of omim ids
  • Loading branch information
yaseminbridges authored Dec 12, 2024
2 parents ba3be0a + 7a4f457 commit 273db47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "phenotype2phenopacket"
version = "0.6.6"
version = "0.6.7"
description = ""
authors = ["Yasemin Bridges <y.bridges@qmul.ac.uk>"]
readme = "README.md"
Expand Down
8 changes: 6 additions & 2 deletions src/phenotype2phenopacket/convert/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ def convert_to_phenopackets(
grouped_omim_diseases = filter_diseases(
num_disease, omim_id, omim_id_list, phenotype_annotation_data
)
for omim_id, omim_disease in zip(read_omim_id_list(omim_id_list), grouped_omim_diseases):
omim_ids = (
read_omim_id_list(omim_id_list) if omim_id_list else [None] * len(grouped_omim_diseases)
)
for omim_id, omim_disease in zip(omim_ids, grouped_omim_diseases):
if len(omim_disease) == 0:
print(f"Skipping... Could not find any phenotype entries for {omim_id}!")
id_message = f" for {omim_id}!" if omim_id else "!"
print(f"Skipping... Could not find any phenotype entries{id_message}")
continue
phenopacket_file = PhenotypeAnnotationToPhenopacketConverter(
human_phenotype_ontology
Expand Down

0 comments on commit 273db47

Please sign in to comment.