Closed pnrobinson closed 4 years ago
@julesjacobsen Do you have an opinion about where to put the exactMatch property? The Term class in phenol is somewhat constrained and does not map 1:1 to the Node/Meta object from obographs. We should either extend the Term class to have basicPropertyValues or we would have to add this as an Xref or something like that.
Probably related to https://github.com/monarch-initiative/phenol/issues/215
This is working now. I added a test class "OntologyLoaderMondoTest", e.g.,
@Test
void testGetExactSynomym() {
Term maxillofacialDysostosis = mondo.getTermMap().get(TermId.of("MONDO:0007952"));
List<TermSynonym> synonymList = maxillofacialDysostosis.getSynonyms();
assertEquals(1, synonymList.size());
TermSynonym syn = synonymList.get(0);
assertEquals(TermSynonymScope.EXACT, syn.getScope());
System.out.println(syn);
List<TermXref> xreflist = syn.getTermXrefs();
assertEquals(1, xreflist.size());
TermXref xref = xreflist.get(0);
assertEquals(TermId.of("OMIM:155000"), xref.getId());
}
I will commit this to develop because I only added a test class and did not change any other code.
Currently, phenol does not pull in "exactMatch" as used in MONDO. This is important to get exact OMIM matches.
It looks like the information is contained in the Node/Meta object from obographs. See
org.monarchinitiative.phenol.io.obo.OboGraphTermFactory
, line 35.The meta object has a lot of information that can be accessed via
See
Phenol does not currently capture this, but we could.
I would suggest we do so in a Dbxref object. For the above example, the MONDO term is MONDO:0002974, label="cervical cancer". The meta field of this term (from obographs) has a map "basicPropertlyValues". The term also has an xrefs list, one of whose values is NCIT:C9311.
Therefore, the question is what we map this to in phenol.