From 96e2097d037b01d87fedef8511b7d6e1c40a5ca1 Mon Sep 17 00:00:00 2001 From: Yasemin Bridges Date: Fri, 5 Jan 2024 14:11:51 +0000 Subject: [PATCH] add handling for if num disease is not set --- src/phenotype2phenopacket/utils/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/phenotype2phenopacket/utils/utils.py b/src/phenotype2phenopacket/utils/utils.py index 9a3b4e7..41cde1d 100644 --- a/src/phenotype2phenopacket/utils/utils.py +++ b/src/phenotype2phenopacket/utils/utils.py @@ -250,3 +250,5 @@ def filter_diseases( return random.choices( group_phenotype_annotation(phenotype_annotation_data.df), k=num_disease ) + if num_disease == 0 and omim_id is None and omim_id_list is None: + return group_phenotype_annotation(phenotype_annotation_data.df)