Planteome / noctua

Graph-based modeling environment for biology, including prototype editor and services
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Ontology terms from CO_XXX give error when added in editor #8

Closed elserj closed 7 years ago

elserj commented 7 years ago

Get the following error when adding "rice leaf width trait" in "Add individual": Error (error): Could not successfully handle batch request. Exception: org.geneontology.minerva.MolecularModelManager$UnknownIdentifierException. Unknown URI protocol: CO_320:0000021; your operation was likely not performed.org.geneontology.minerva.MolecularModelManager$UnknownIdentifierException: Unknown URI protocol: CO_320:0000021 at org.geneontology.minerva.curie.MappedCurieHandler.getIRI(MappedCurieHandler.java:114) at org.geneontology.minerva.server.handler.M3ExpressionParser.parse(M3ExpressionParser.java:61) at org.geneontology.minerva.server.handler.M3ExpressionParser.parse(M3ExpressionParser.java:42) at org.geneontology.minerva.server.handler.OperationsImpl.parseM3Expression(OperationsImpl.java:310) at org.geneontology.minerva.server.handler.OperationsImpl.handleRequestForIndividual(OperationsImpl.java:159) at org.geneontology.minerva.server.handler.JsonOrJsonpBatchHandler.m3Batch(JsonOrJsonpBatchHandler.java:156) at org.geneontology.minerva.server.handler.JsonOrJsonpBatchHandler.m3Batch(JsonOrJsonpBatchHandler.java:132) at org.geneontology.minerva.server.handler.JsonOrJsonpBatchHandler.m3BatchPostPrivileged(JsonOrJsonpBatchHandler.java:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171) at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:195) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104) at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:402) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:349) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106)...

My initial guess was that it was related to the underscore "_" in the ID, but looking at the error this seems to be more of an error with it not knowing how to lookup the URI. I'm not sure where this is defined or what needs to be done to fix.

Thoughts @kltm?

kltm commented 7 years ago

My guess would be that this is not loaded into the ontology that minerva is using? It is trying to resolve it, but seems unable. I suppose it's possible that the underscore is causing problems, but it wouldn't be my first guess.

elserj commented 7 years ago

Well, I added them to the planteome_noctua.owl file that is loaded and minerva doesn't give any errors about loading them. For one thing, I did try loading with an altered version of the file where I changed all instances of CO_320 to CO320 just to test, and the autofill still had it, so I think that is coming from the SOLR instance anyway.

cmungall commented 7 years ago

Minerva does not need to know about the existence of a class, so this shouldn't make a difference.

Note however that Minerva needs to know the prefixes of everything in its universe. The json-ld context file in the minerva repo deal with this. We will have to register these centrally since there is no way to extend at runtime.

(technically we should not be providing OBO PURL prefixes for anything not formally registered. We need a plan for this cc @marieALaporte)

If the json-ld registration isn't done then the behavior of CURIEs coming from Solr is undefined.

Related: https://github.com/geneontology/neo/issues/17

kltm commented 7 years ago
We will have to register these centrally since there is no way to extend at runtime.

We should probably circle back again--there should be a lot of ways of accomplishing that.

elserj commented 7 years ago

I think I understand what you guys are saying, but for now, what do we do? It doesn't seem right that would give an error and not complete. What if someone does actually want to add one of these terms to a model?

elserj commented 7 years ago

Error was in minerva not recognizing the URI. Fixed in https://github.com/Planteome/minerva/commit/868c3e254e50c9ea1fe5d01bdb872afb31ed2f6d by using external minerva-cli.jar with modified amigo_context_gen.jsonld.