ncbo / bioportal-project

Serves to consolidate (in Zenhub) all public issues in BioPortal
BSD 2-Clause "Simplified" License
7 stars 5 forks source link

UMLS OWLAnnotationPropertyTransformer error / purl redirects don't work for some umls ontologies #196

Open graybeal opened 3 years ago

graybeal commented 3 years ago

@alexskr found

Im seeing a lot of errors like this in a few ontologies:

> 2020-12-07T13:15:33 [main] ERROR o.s.o.u.OWLAnnotationPropertyTransformer - 
> Attempt to transform an axiom to correct misuse of properties failed. Property replacement: 
> {<http://purl.bioontology.org/ontology/CSP/RN>=<http://purl.bioontology.org/ontology/CSP/RN>}, axiom: 
> AnnotationAssertion(<http://purl.bioontology.org/ontology/CSP/RN> 
> <http://purl.bioontology.org/ontology/CSP/1928-7217> <http://purl.bioontology.org/ontology/CSP/1928-6281>), error: null

and im not sure what those are.
graybeal commented 3 years ago

It turns out this is due to the purls not resolving, so when the umls2rdf script via owlapi checks them (in the OWLAPI project) this error occurs because the Object being annotated resolves to null.

It turns out the purls are not resolving because there is no redirect for the CSP purls to send them to the CRISP ontology in BioPortal. In fact this is happening for 6 ontologies:

These 6 are all in https://github.com/ncbo/umls2rdf/blame/master/umls.conf and have the unique characteristic that they do not contain a ; character, but the first part of the entry is different than the second part, like AAA,BBB.ttl,load_on_codes. (LNC -> LOINC is like that too, but it works and I'm guessing its purl entries are fixed.)

Parsing code for that list is here: https://github.com/ncbo/umls2rdf/blob/be8cc0da426e64f64de5f75264bbf48b2b5f9b87/umls2rdf.py#L742.

graybeal commented 3 years ago

I conclude we can fix the initial problem by adding two redirects to the purl server:

http://purl.bioontology.org/ontology/AAA goes instead to http://bioportal.bioontology.org/ontologies/BBB and http://purl.bioontology.org/ontology/AAA/xyz goes to http://bioportal.bioontology.org/ontologies/BBB?p=classes&conceptid=xyz

(The second one is for the concepts. I'm assuming it's possible to create wildcard redirects in the purl server; if not we might have to create a wildcard redirect in nginx. Hey, maybe that setting got lost?)

This does not resolve why this has appeared 'now', though possibly it has been this way a long time and no one ever complained.

(I'm not crystal clear on where in the code the purl redirects get created so this may not be the exactly right solution. But it'll get us going for now.)

graybeal commented 3 years ago

created ticket #198 to block the reserved UMLS acronyms so ontologies can't be created on top of them.

mdorf commented 3 years ago

The PURL admin interface appears broken, as in the changes to the PURL target URLs do not take effect. Can possibly update the PURL DB directly, but still need to determine the feasibility of having a PURL with acronym AAA point to a target with acronym BBB.

alexskr commented 3 years ago

I successfully updated purls by directly modifying DB

alexskr commented 3 years ago

fixing purl for CRISP ontology didn't resolve this error.

graybeal commented 3 years ago

What's the PURL that you fixed exactly?

alexskr commented 3 years ago

I have updated purl for the 6 ontologies you mentioned earlier: AIR -> AI-RHEUM CST -> COSTART CSP -> CRISP WHO -> WHO-ART MTHMST -> MSTDE MTHMSTFRE -> MSTDE-FRE