Closed matentzn closed 1 year ago
This duplicates https://github.com/monarch-initiative/phenol/issues/372
See my comment there
wget http://purl.obolibrary.org/obo/mondo.owl java -jar obographs-cli-0.3.0.jar convert mondo.owl mondo.json java -jar obographs-cli-0.3.0.jar validate mondo.json mondo.json - OK grep 'null' "val" : "null cell" "val" : "null cell", ... and a bunch more valid null strings
Superficially, this looks OK. However...
wget http://purl.obolibrary.org/obo/mondo.json java -jar obographs-cli-0.3.0.jar validate mondo.json mondo.json - ERROR: Cannot construct instance of `org.geneontology.obographs.core.model.axiom.LogicalDefinitionAxiom`, problem: `java.lang.NullPointerException` at [Source: (File); line: 1835151, column: 5] (through reference chain: org.geneontology.obographs.core.model.GraphDocument$Builder["graphs"]->java.util.ArrayList[0]->org.geneontology.obographs.core.model.Graph$Json["logicalDefinitionAxioms"]->java.util.ArrayList[309]) grep 'null' ... a bunch of valid nulls and then "restrictions" : [ null ] "restrictions" : [ null ] "restrictions" : [ null ] "restrictions" : [ null ] "restrictions" : [ null ] "restrictions" : [ null ] "restrictions" : [ null ] "restrictions" : [ null ] ... and quite a few more
So my question for @matentzn is what is going on with the transformation of mondo.owl to mondo.json in robot?
Moving this here:
https://github.com/monarch-initiative/phenol/issues/372#issuecomment-1527775440
This is the POM:
https://github.com/ontodev/robot/blob/master/robot-core/pom.xml#L211
Here is the code:
Anything glaringly wrong?
@matentzn Is your pipeline using that version of robot? If not, use the latest version. If it is, then what is happening to the ontology in between owlapi loading it from owl and it being written out to json?
docker pull docker.io/obolibrary/robot:latest
docker run -v $PWD/:/work -w /work --rm -ti obolibrary/robot robot --version
ROBOT version 1.9.1
docker run -v $PWD/:/work -w /work --rm -ti obolibrary/robot robot convert --input mondo.owl --output mondo-robot-1.9.1.json --format json
java -jar obographs-cli-0.3.0.jar validate mondo-robot-1.9.1.json
mondo-robot-1.9.1.json - OK
diff mondo-obog.json mondo-robot-1.9.1.json
... no difference
So, it looks like using the latest version of ROBOT produces the exact same, valid, output as the obographs-cli. This suggests that the issue is sitting somewhere in the MONDO pipeline where there is an older version of ROBOT being used to convert the files.
😱
https://github.com/monarch-initiative/mondo/blob/master/src/ontology/Makefile#L253
I am so sorry! I never ever knew that! This is insane.
100% my fault, sorry for sending you on a goose chase, and thanks for debugging... Feeling very bad.
This should take care of this:
https://github.com/monarch-initiative/mondo/pull/6229/files
THANK YOU @julesjacobsen
Well, so long as owltools isn't needed for some other reason?
Can you also please confirm that the output .JSON file passes the obographs-cli validate command. I can run this for you if you want, alternatively I'll generate a checksum of the latest one direct from obographs-cli/ robot.
Here is the generated file: https://www.dropbox.com/s/iwnthsmnz63wnhu/mondo.json?dl=0
Close enough...
diff mondo-obog.json mondo-niko.json
747807c747807
< "val" : "https://github.com/monarch-initiative/mondo/issues/4521"
---
> "val" : "https://github.com/monarch-initiative/mondo/issues/5373"
747810c747810
< "val" : "https://github.com/monarch-initiative/mondo/issues/5373"
---
> "val" : "https://github.com/monarch-initiative/mondo/issues/4521"
Does this mean that there is an ordering issue? Interesting. Maybe divergent Java versions?
It's unlikely to be a Java version thing. More likely we used a slightly different version of the ontology or there is an owl ordering issue, although obographs sorts the input, so this should be consistent.
(from @pnrobinson , on slack)
mondo.json appears to have a bug
When trying to load mondo.json (https://github.com/monarch-initiative/mondo/releases/download/v2023-04-04/mondo.json), created with obographs version 0.3.0, we get this:
I think the error is coming from obographs although the exception is thrown from phenol