Display-Lab / psdo

Performance Summary Display Ontology
https://display-lab.github.io/psdo/
Other
3 stars 3 forks source link

Electronic Dictionary #131

Closed grosscol closed 6 years ago

grosscol commented 6 years ago

Use script to generate dictionary of terms from the fio-edit.owl source file. Sort alphabetically and format dictionary using markdown. Link directly from readme.

Should run on GNU Linux and OS X.

Depends on @CooperStansbury to test and merge.

CooperStansbury commented 6 years ago

@grosscol "dictionary.csv" file doesn't exist, and isn't built the first time that the script is run.

tail: tools/../src/ontology/dictionary.csv: No such file or directory

grosscol commented 6 years ago

@CooperStansbury good catch. I had commented out the execution of robot on line 37 of make-dict.sh. Correction made and squashed. You'll have to force pull the branch since I re-wrote the last commit. git pull -f

CooperStansbury commented 6 years ago

@grosscol I force pulled but the tool still doesn't create the file dictionary.csv the first time it's run, if this file doesn't exist already. Will you add your file dictionary.csv to the repo so that the file is available? If the file makes it into the repo I don't think there will be any need to build the file when someone runs the script the first time.

CooperStansbury commented 6 years ago

Here's what I'm getting: tail: tools/../src/ontology/dictionary.csv: No such file or directory

The robot docs suggest that a file will only be written for non-empty query results. Perhaps this is the issue?

CooperStansbury commented 6 years ago

I lied, there is much more to the the error message. Full output of running the make-dict.sh tool is below. Possibly a system configuration issue on my end?

Using ROBOT to extract classes org.semanticweb.owlapi.model.UnloadableImportException: Could not load imported ontology: <http://purl.obolibrary.org/obo/MFOEM.owl> Cause: /Users/MILK/Desktop/Work/_Research_DLHS/TEMP/fio/src/ontology/imports/MFOEM.owl (No such file or directory) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1690) at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$TPImportsHandler.handleTriple(TripleHandlers.java:1558) at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$HandlerAccessor.handleStreaming(TripleHandlers.java:194) at org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer.statementWithResourceValue(OWLRDFConsumer.java:1501) at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFParser.statementWithResourceValue(RDFParser.java:365) at org.semanticweb.owlapi.rdf.rdfxml.parser.EmptyPropertyElement.startElement(StartRDF.java:236) at org.semanticweb.owlapi.rdf.rdfxml.parser.PropertyElementList.startElement(StartRDF.java:658) at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFParser.startElement(RDFParser.java:196) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFParser.parse(RDFParser.java:140) at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:73) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:197) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1098) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1054) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1004) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1015) at org.obolibrary.robot.IOHelper.loadOntology(IOHelper.java:278) at org.obolibrary.robot.IOHelper.loadOntology(IOHelper.java:172) at org.obolibrary.robot.CommandLineHelper.getInputOntology(CommandLineHelper.java:280) at org.obolibrary.robot.CommandLineHelper.updateInputOntology(CommandLineHelper.java:333) at org.obolibrary.robot.CommandLineHelper.updateInputOntology(CommandLineHelper.java:302) at org.obolibrary.robot.QueryCommand.execute(QueryCommand.java:126) at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:219) at org.obolibrary.robot.CommandManager.execute(CommandManager.java:161) at org.obolibrary.robot.CommandManager.main(CommandManager.java:121) at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:53) Caused by: org.semanticweb.owlapi.io.OWLOntologyCreationIOException: /Users/MILK/Desktop/Work/_Research_DLHS/TEMP/fio/src/ontology/imports/MFOEM.owl (No such file or directory) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:207) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1098) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1054) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:957) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadImports(OWLOntologyManagerImpl.java:1648) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1684) ... 35 more Caused by: java.io.FileNotFoundException: /Users/MILK/Desktop/Work/_Research_DLHS/TEMP/fio/src/ontology/imports/MFOEM.owl (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at org.semanticweb.owlapi.io.AbstractOWLParser.getInputStreamFromContentEncoding(AbstractOWLParser.java:165) at org.semanticweb.owlapi.io.AbstractOWLParser.getInputStream(AbstractOWLParser.java:127) at org.semanticweb.owlapi.io.AbstractOWLParser.getInputSource(AbstractOWLParser.java:232) at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:72) at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:197) ... 40 more java.lang.IllegalArgumentException: A valid input ontology must be specified at org.obolibrary.robot.CommandLineHelper.updateInputOntology(CommandLineHelper.java:337) at org.obolibrary.robot.CommandLineHelper.updateInputOntology(CommandLineHelper.java:302) at org.obolibrary.robot.QueryCommand.execute(QueryCommand.java:126) at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:219) at org.obolibrary.robot.CommandManager.execute(CommandManager.java:161) at org.obolibrary.robot.CommandManager.main(CommandManager.java:121) at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:53) usage: robot [command] [options] <arguments> -h,--help print usage information -noprefixes do not use default prefixes -p,--prefix <arg> add a prefix 'foo: http://bar' -P,--prefixes <arg> use prefixes from JSON-LD file -V,--version print version information -v,--verbose increased logging -vv,--very-verbose high logging -vvv,--very-very-verbose maximum logging -x,--xml-entities use entity substitution with ontology XML output commands: help print help for command annotate annotate ontology convert convert ontology diff find the differences between two ontologies export-prefixes export prefixes to a file extract extract terms from an ontology filter filter ontology axioms materialize materialize ontology merge merge ontologies mirror mirror ontology imports closure query query an ontology reason reason ontology reduce reduce ontology relax relax ontology repair repair terms from an ontology report report terms from an ontology template build an ontology from a template unmerge unmerge ontologies validate-profile validate ontology against an OWL profile verify Runs a sparql query on an ontology. Any results of the query are violations, counted, and reported Formatting dictionary markdown tail: tools/../src/ontology/dictionary.csv: No such file or directory

grosscol commented 6 years ago

The root cause of this looks like ROBOT is looking for MFOEM.owl but is unable to find it.

/Users/MILK/Desktop/Work/_Research_DLHS/TEMP/fio/src/ontology/imports/MFOEM.owl (No such file or directory)

See if re-running tools/download-catalog.sh fixes the situation.

CooperStansbury commented 6 years ago

@grosscol bingo. I tested new term addition and as long as we/I continue to use IAO_0000115 for every definition we'll be good. I created a separate branch 'term-dev' where I've started to do some formatting cleaning and caught a few terms defined under the wrong annotation property and could not be 'found' by the sparql query. This is ready to merge - would you be kind enough to show me how tomorrow?