geneontology / termgenie

Web-application for pattern-based ontology class generation
7 stars 6 forks source link

Can't commit new TG terms #102

Closed mcourtot closed 7 years ago

mcourtot commented 7 years ago

How to reproduce (from @rjdodson. I tried as well and got same result)

Using TermGenie I selected protein_complex_by_activity Selected Use template For required activity I added: Ras guanyl-nucleotide exchange factor activity For Literature reference I added: PMID:20493808 For DefX_Ref I added: GOC:rjd Selected Verify Input Selected the box to the left of the term and the Submit for Review box Selected Submit

2016-12-02 09:08:01 CommitTerms service call failed Error: jsonrpc error[-32000] : Caused by java.lang.NullPointerException at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:634) at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:363) at org.bbop.termgenie.ontology.obo.OboWriterTools.writeFrame(OboWriterTools.java:52) at org.bbop.termgenie.ontology.CommitHistoryTools.create(CommitHistoryTools.java:56) at org.bbop.termgenie.ontology.CommitHistoryTools.translateTerms(CommitHistoryTools.java:137) at org.bbop.termgenie.ontology.CommitHistoryTools.create(CommitHistoryTools.java:122) at org.bbop.termgenie.ontology.OntologyCommitReviewPipeline.commit(OntologyCommitReviewPipeline.java:87) at org.bbop.termgenie.services.DefaultTermCommitServiceImpl$CommitTask.runSimple(DefaultTermCommitServiceImpl.java:426) at org.bbop.termgenie.ontology.OntologyIdManager$OntologyIdManagerTask.run(OntologyIdManager.java:62) at org.bbop.termgenie.ontology.OntologyIdManager$OntologyIdManagerTask.run(OntologyIdManager.java:58) at org.bbop.termgenie.core.management.GenericTaskManager.runManagedTask(GenericTaskManager.java:295) at org.bbop.termgenie.services.DefaultTermCommitServiceImpl.commitTerms(DefaultTermCommitServiceImpl.java:188) 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.json.rpc.server.InjectingJsonRpcExecutor.executeMethod(InjectingJsonRpcExecutor.java:264) at org.json.rpc.server.InjectingJsonRpcExecutor.execute(InjectingJsonRpcExecutor.java:171) at org.bbop.termgenie.servlets.TermGenieJsonRPCServlet.doPost(TermGenieJsonRPCServlet.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119) at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133) at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130) at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745)

nathandunn commented 7 years ago

user details going in are:

GoYamlUserPermissionsImpl has flag? allow-write value true
org.bbop.termgenie.services.DefaultTermCommitServiceImpl name from userData: UserDataImpl {screenname=
Robert Dodson, guid=rjdodson, email=null, xref=GOC:rjd, scmAlias=null, orcid=GOC:rjd} yields scm null
org.bbop.termgenie.services.DefaultTermCommitServiceImpl name from guid: rjdodson
org.bbop.termgenie.services.DefaultTermCommitServiceImpl name from screen: rjdodson
org.bbop.termgenie.services.DefaultTermCommitServiceImpl name from email: rjdodson
[GO WARN] 2016-12-01 09:42:21 (InjectingJsonRpcExecutor:174) exception occured while executing : commit.commitTerms
org.json.rpc.commons.JsonRpcRemoteException: jsonrpc error[-32000] : 
Caused by java.lang.NullPointerException
        at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:634)
        at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:363)
        at org.bbop.termgenie.ontology.obo.OboWriterTools.writeFrame(OboWriterTools.java:52)
        at org.bbop.termgenie.ontology.CommitHistoryTools.create(CommitHistoryTools.java:56)
        at org.bbop.termgenie.ontology.CommitHistoryTools.translateTerms(CommitHistoryTools.java:137)
        at org.bbop.termgenie.ontology.CommitHistoryTools.create(CommitHistoryTools.java:122)
        at org.bbop.termgenie.ontology.OntologyCommitReviewPipeline.commit(OntologyCommitReviewPipeline.java:87)
nathandunn commented 7 years ago

The code error is in the obo library, but it is pulling out a key with a null value.

 while (valuesIterator.hasNext()) {
            String value = valuesIterator.next().toString(); // error here 
            assert value != null;
            if (idsLabel != null && nameProvider != null) {

Digging backwards, it looks like there is a tag with null clauses. No idea how that happens.

kltm commented 7 years ago

Some random thoughts here.

Looking at the error, it seems odd that their orcid would be reported as their go xref. I wonder if there is a mapping issue given that the format has changed a bit in users.yaml, and that some fields are no longer required, and some new informational ones are. Also, would not the scmalias be populated? I'm not sure if that would normally be "git", "github", or their username. It's a shame we can't really have a "before" example.

If the only things that have really changed internally is some of the variables pulled during authorization, mapping issues seem like the simplest explanation.

kltm commented 7 years ago

It might be good to see what the OBO requests normally look like; are there any examples lying around? It might be obvious that there is a piece of information now missing that's not getting mapped correctly (noting that this is passing through CommitHistoryTools).

cmungall commented 7 years ago

This is the most recent entry in the GO file that came from TG AFAICT

[Term]
id: GO:1905725
name: protein localization to microtubule end
namespace: biological_process
def: "A process in which a protein is transported to, or maintained in, a location at a microtubule end." [GO_REF:0000087, GOC:TermGenie, PMID:12034771]
synonym: "protein localisation to microtubule end" EXACT [GOC:TermGenie]
intersection_of: GO:0008104 ! protein localization
intersection_of: has_target_end_location GO:1990752 ! microtubule end
created_by: mah
creation_date: 2016-11-28T15:01:43Z
cmungall commented 7 years ago

It's possible this is unrelated. If it is related, it will be because it is trying to put something bad in the created_by field most likely

cmungall commented 7 years ago

I'm going to try adding the term CONFIRMED same error

cmungall commented 7 years ago

https://github.com/geneontology/termgenie/search?utf8=%E2%9C%93&q=TAG_CREATED_BY

so if scmAlias is null, then the obo will in fact be null

nathandunn commented 7 years ago

That would make sense. I tried to make it put that in.

Question: should the "scmAlias" be for svn or should it be the github username, or something else entirely?

I can pretty easily just have it pull in the github username if the scmAlias is null.

cmungall commented 7 years ago

do github username if scmAlias is null

cmungall commented 7 years ago

Looking at https://github.com/geneontology/termgenie/blob/master/TermGenie/TermGenieUserManagement/TermGenieUserManagement-GeneOntology/src/main/java/org/bbop/termgenie/user/go/GoYamlUserDataProvider.java

it seems that it was previously setting scmAlias from the users GOC:xref, but only doing this if it has an md5. I'm guessing the switch from persona eliminated the need for the md5 portion.

So for maximal consistency, do something like this: https://github.com/geneontology/termgenie/blob/master/TermGenie/TermGenieUserManagement/TermGenieUserManagement-GeneOntology/src/main/java/org/bbop/termgenie/user/go/GoYamlUserDataProvider.java#L147

(but not so important, the true provenance info is in the def dbxref

nathandunn commented 7 years ago

I think this makes sense. I'll try giving that a shot.