Skip to content

Commit

Permalink
add (multiple) when children are removed because parents are present
Browse files Browse the repository at this point in the history
  • Loading branch information
valearna committed Feb 27, 2019
1 parent 2f73fa1 commit b06f61c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion genedescriptions/descriptions_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def remove_children_if_parents_present(terms, ontology, terms_already_covered: S
term in high_priority_terms):
terms_nochildren.append(term)
elif ancestors_covering_multiple_children is not None:
ancestors_covering_multiple_children.update(set(ontology.ancestors(term)).intersection(set(terms)))
ancestors_covering_multiple_children.update({ontology.label(term_id, id_if_null=True) for term_id in
set(ontology.ancestors(term)).intersection(set(terms))})
if len(terms_nochildren) < len(terms):
if terms_already_covered is not None:
terms_already_covered.update(set(terms) - set(terms_nochildren))
Expand Down

0 comments on commit b06f61c

Please sign in to comment.