Skip to content

Only one Synonym is saved for each Ontology term parsed #836

Description

@gmungoc

Sequence Ontology includes multiple synonyms for many terms, but only the first synonym for each is retained when parsing the ontology data file.
Cause:

  • OntologyTerm$Impl.synonyms is a TreeSet, but does not follow the TreeSet Javadoc guidance that "...ordering...must be consistent with equals...to correctly implement the Set interface"
  • Synonym.COMPARATOR 'equates' two Synonyms if both have null value for Category (regardless of name - which looks wrong)
  • a second Synonym is not added to the set, as considered 'equal' to the first

I'm happy to create a failing test and a pull request. Can I now use a parameterised type Set<Synonym>? I guess change has limited impact - though it would increase memory footprint of the parsed ontology.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions