Giter Club home page Giter Club logo

slimmer's Introduction

build DOI

Slimmer is a slim tool to slim ontologies as part of ontology integration. It allows users to provide configuration files that specify which parts of an ontology should be kept and/or removed, allowing to just select parts of the ontology you like. Rewiring the ontology is part of the features, allowing you to define new super terms.

Configuring the slimming

The configuration of the slimming of an ontology consists of two files. The first file is a Java properties file, listing the ontology, a pointer to the second configuration file, and the URI of the output ontology. Details are found at https://github.com/enanomapper/slimmer/wiki/Slimmer-configuration-files and in https://enanomapper.github.io/tutorials/Added%20ontology%20terms/README.html

For example:

owl=http://www.bioassayontology.org/bao/bao_complete.owl
iris=bao.iris
slimmed=http://purl.enanomapper.org/onto/external/bao-slim.owl

The second, .iris file configures the slicing of the ontology:

+D(http://purl.bioontology.org/ontology/npo#NPO_1436):http://www.bioassayontology.org/bao#BAO_0000697 detection instrument
+D(http://purl.obolibrary.org/obo/IAO_0000030):http://www.bioassayontology.org/bao#BAO_0000179 endpoint
+D(http://purl.obolibrary.org/obo/OBI_0000070):http://www.bioassayontology.org/bao#BAO_0000015 bioassay

This configuration file uses a custom syntax which is briefly explained here. By default it removes all content.

The first character indicates if the something needs to be included (+) or excluded from a previously defined inclusion (-). The second character indicates whether a whole upper (U) or down (D) tree should be included or excluded. After the colon the URI of the resource is given to be in- or excluded, followed by a user-oriented comment. Finally, before the colon and in brackets an optional superclass of this resource can be specified, possibly from other ontologies.

Compile

mvn clean compile assembly:single

Run

java -cp target/slimmer-1.0.0-SNAPSHOT-jar-with-dependencies.jar com.github.enanomapper.Slimmer src/main/resources

Funding

The project has had contributions from various European Commission projects. The eNanoMapper project was funded by the European Union’s Seventh Framework Programme for research, technological development and demonstration (FP7-NMP-2013-SMALL-7) under grant agreement no. 604134. NanoCommons has received funding from European Union Horizon 2020 Programme (H2020) under grant agreement nº 731032. NanoSolveIt has received funding from European Union Horizon 2020 Programme (H2020) under grant agreement no. 814572.

slimmer's People

Contributors

dependabot[bot] avatar egonw avatar fehrhart avatar jkchang2015 avatar lrieswijk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slimmer's Issues

Add option to merge rdfs:comment labels

I got the following error message when trying to convert the NPO ontology into OBO format, pointing at the need for a feature to merge rdfs:comment labels in slimmer.

OBO STRUCTURE ERROR Ontology does not conform to OBO structure rules:
multiple comment tags not allowed. in frame:Frame(Disposition id( Disposition)name( disposition)comment(

ccont.owl download times out

Janna, are there alternative download locations? Jenkins reports:

--2015-09-08 06:43:09--  (try:11)  http://livercancer.imbi.uni-heidelberg.de/ccont.owl
Connecting to livercancer.imbi.uni-heidelberg.de (livercancer.imbi.uni
    -heidelberg.de)|129.206.228.156|:80... failed: Connection timed out.
Retrying.

Problems with PATO and CHEMINF slims

There seems to be something odd going on with the slimmer.

In CHEMINF, despite clearly specifying the same parent class for 'molecular entity quality', 'chemical substance quality' and 'surface area' which I newly added to the cheminf.iris for export, only one of the three is getting the correct parent allocated, while the other two are assigned no parent class.

In PATO, newly assigned classes for export, e.g. size, are not being included in the resulting slim file, despite the build executing on commit as usual.

Add relationships to slimmer

Currently the slimmer only accepts and "slims" classes. We need to add relationships, which can also be duplicated in much the same fashion as classes are.

Problem with headclass "Toxicity" within "Information Content Entity"

There seems to be a change in the subclasses present in the headclass of "toxicity" which is now under the superclass of "information content entity". Before this was under "disposition" so something must have changed in composing the eNM ontology. NOTE: under the toxicity class there are some classes which have manually been added to the eNM ontology.

OBI fails to slim

org.semanticweb.owlapi.model.OWLRuntimeException: 1 pending annotations should have been used by now. [Annotation(http://purl.obolibrary.org/obo/IAO_0010000 http://purl.obolibrary.org/obo/BFO_0010034)]
at org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer.setPendingAnnotations(OWLRDFConsumer.java:567)
at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$TypeAxiomHandler.handleTriple(TripleHandlers.java:2752)
at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$HandlerAccessor.applyAnnotations(TripleHandlers.java:170)
at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$HandlerAccessor$3.handleResourceTriple(TripleHandlers.java:199)
at org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer.iterateResourceTriples(OWLRDFConsumer.java:2484)
at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$HandlerAccessor.consumeAnnotatedAxioms(TripleHandlers.java:194)
at org.semanticweb.owlapi.rdf.rdfxml.parser.TripleHandlers$HandlerAccessor.mopUp(TripleHandlers.java:377)
at org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer.endModel(OWLRDFConsumer.java:1494)
at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFParser.parse(RDFParser.java:134)
at org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:81)
at uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:159)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:958)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:896)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:918)
at com.github.enanomapper.Slimmer.(Slimmer.java:62)
at com.github.enanomapper.Slimmer.(Slimmer.java:48)
at com.github.enanomapper.Slimmer.main(Slimmer.java:119)

Possible bug with assigning parent in cheminf-slim?

There might be a bug with how the parent class (specified in ()) is assigned in the case of cheminf. For cheminf I included only one class with descendents -- chemical descriptor -- and assigned it the parent IAO_0000030 i.e. information content entity. However, in the resulting SLIM the class has no specified parent. I suspect this is because the IAO class that I want to delegate as parent IS actually present in the source version of cheminf, so it gets removed along with the rest of the imported IAO. However, despite the fact that it is present in cheminf I don't want to import it from there as we are importing direct from IAO.

Problem with NPO slim

The latest version of the NPO slim file is not usable, as it generates an error in Protege / other OWL parsers. According to the error message from Protege, the problem is with an unknown prefix “ncicp” in the XML. This appears in the syntax used internally in the NPO for their definitions, e.g.

<npo:FULL_SYN
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">&lt;ncicp:ComplexTerm
xmlns:ncicp="http://ncicb.nci.nih.gov/xml/owl/EVS/ComplexProperties.xsd#&quot;&gt;&lt;ncicp:term-name&gt;cylindrical
shape</ncicp:term-name><ncicp:term-group>PT</ncicp:term-group><ncicp:term-source>NCI</ncicp:term-source></ncicp:ComplexTerm>/npo:FULL_SYN

In previous versions of the slimmer, the output file produced for the NPO slim did not include the escaping of XML characters in the embedded definition, e.g. it used to include ncicp:ComplexDefinition whereas now it includes <ncicp:ComplexDefinition> This change must reflect an underlying change in the slimming software since nothing has changed in the underlying NPO OWL file.

Random extra class in obi slim file

The OBI slim file includes the class BFO_0000003 (without metadata) which is not included in the instructions. The only place that the class is used in the slim file is in the range of the preceded_by and precedes relations. As this class is not included in the instructions I would not expect it to be included in the resulting slim file.

License?

@jannahastings , what license shall we use? I'm happy with the code under the MIT license. What about the config files? Also MIT or do you want to specify something else?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.