CSBiology / OBO.NET

An OBO file format parser, written in F#.
MIT License
3 stars 1 forks source link

Add functionality to resolve `treat-xrefs-as-equivalent` to determine if 2 input terms are equal given an `OboOntology` #34

Closed kMutagene closed 3 months ago

kMutagene commented 4 months ago

Given that #33 is implemented, OboOntology should offer a function of signature

Oboterm -> OboTerm -> OboOntology -> bool

that checks whether two terms are equivalent by resolving the xrefs of both terms (if they exist in the given ontology) set to treat-xrefs-as-equivalent.

Example:

Consider this term in a given obo file:

treat-xrefs-as-equivalent: TEST

[Term]
id: 1
name: YES
xref: TEST:0001

the function should return true for any one of these terms.

kMutagene commented 4 months ago

Note that we do not have any information about name and ref fields of the xref terms here, so this should strictly work on accession numbers.

omaus commented 3 months ago

Done via #36.