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.
Sequence Ontology includes multiple synonyms for many terms, but only the first synonym for each is retained when parsing the ontology data file.
Cause:
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.