From 4c4143a78cfde57f06a610a0ab743155a0c6b580 Mon Sep 17 00:00:00 2001 From: Yasemin Bridges Date: Tue, 17 Dec 2024 19:12:42 +0000 Subject: [PATCH 1/2] handle hpo terms that are not found --- src/phenotype2phenopacket/utils/phenopacket_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phenotype2phenopacket/utils/phenopacket_utils.py b/src/phenotype2phenopacket/utils/phenopacket_utils.py index de9389c..5e9a5a7 100644 --- a/src/phenotype2phenopacket/utils/phenopacket_utils.py +++ b/src/phenotype2phenopacket/utils/phenopacket_utils.py @@ -682,7 +682,7 @@ def create_phenotypic_feature(self, phenotype_annotation_entry: dict) -> Phenoty rels = self.human_phenotype_ontology.entity_alias_map( phenotype_annotation_entry["hpo_id"] ) - hpo_term = "".join(rels[(list(rels.keys())[0])]) + hpo_term = "".join(rels[(list(rels.keys())[0])]) if rels else None return PhenotypicFeature( type=OntologyClass(id=phenotype_annotation_entry["hpo_id"], label=hpo_term), onset=self.create_onset(phenotype_annotation_entry), From 9600d0c9320574aaf636e9ad866f201dbf978c6e Mon Sep 17 00:00:00 2001 From: Yasemin Bridges Date: Tue, 17 Dec 2024 19:13:20 +0000 Subject: [PATCH 2/2] bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a8e3635..bdf6cdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "phenotype2phenopacket" -version = "0.6.8" +version = "0.6.9" description = "" authors = ["Yasemin Bridges "] readme = "README.md"