From 481262cd89cf79059d49de3aa33606506d18d5ba Mon Sep 17 00:00:00 2001 From: Valerio Arnaboldi Date: Wed, 3 Jan 2024 12:37:25 -0800 Subject: [PATCH] Fixed error --- genedescriptions/data_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genedescriptions/data_manager.py b/genedescriptions/data_manager.py index 3785aad..2e4f806 100644 --- a/genedescriptions/data_manager.py +++ b/genedescriptions/data_manager.py @@ -204,7 +204,7 @@ def set_ontology(self, ontology_type: DataType, ontology: Ontology, config: Gene if terms_replacement_regex: self.rename_ontology_terms(ontology=ontology, terms_replacement_regex=terms_replacement_regex) root_nodes = [n for n in ontology.nodes() if len( - list(g.predecessors(n))) == 0 and len(list(ontology.successors(n))) > 0] + list(ontology.predecessors(n))) == 0 and len(list(ontology.successors(n))) > 0] set_all_depths(ontology=ontology, root_node_ids=root_nodes, relations=self.get_relations(ontology_type)) if config.get_module_property(module=module, prop=ConfigModuleProperty.TRIMMING_ALGORITHM) == "ic":