# HG changeset patch # User Mikel Egaña Aranguren # Date 1318926616 -7200 # Node ID 14bfd77f852016015b31a221327f4231845221f6 # Parent 40adbcb2a7cc01355c64315524c8d5e37ed67641 Interface improved (Imports first) and proper handling of import/merge options added diff -r 40adbcb2a7cc -r 14bfd77f8520 OPPL/Disjoint_localisation.oppl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OPPL/Disjoint_localisation.oppl Tue Oct 18 10:30:16 2011 +0200 @@ -0,0 +1,7 @@ +?localisation_sibling:CLASS +SELECT +ASSERTED ?localisation_sibling SubClassOf GO_0008150 +WHERE ?localisation_sibling != GO_0051179 +BEGIN +ADD ?localisation_sibling DisjointWith GO_0051179 +END; diff -r 40adbcb2a7cc -r 14bfd77f8520 OPPL/README --- a/OPPL/README Tue Oct 11 11:09:52 2011 +0200 +++ b/OPPL/README Tue Oct 18 10:30:16 2011 +0200 @@ -13,11 +13,11 @@ 1.- Stop galaxy. 2.- Copy oppl_galaxy_tool.jar, FaCT++-linux-v1.5.2/ FaCT++-OSX-v1.5.2/ -and oppl_galaxy_tool_lib/ to /galaxy-dist/tool-data/shared/jars/. +and oppl_galaxy_tool_lib/ to /galaxy-dist/tool-data/shared/jars/ -3.- Create directory /galaxy-dist/tools/OPPL/. +3.- Create directory /galaxy-dist/tools/OPPL/ -4.- Copy oppl.xml to /galaxy-dist/tools/OPPL/. +4.- Copy oppl.xml to /galaxy-dist/tools/OPPL/ 5.- Add the following lines to /galaxy-dist/tool_conf.xml: @@ -43,7 +43,12 @@ Ontology Pre Processor Language >> Execute an OPPL file against an OWL file -An ontology produced by another galaxy tools can also be used +An ontology produced by another galaxy tools can also be used. + +Test.oppl and test.owl can be used as examples. More OPPL-Galaxy +examples can be obtained at http://miuras.inf.um.es/OPPL-Galaxy/, and +general OPPL script that may be useful to use with OPPL-Galaxy can be +obtained at http://oppl2.sourceforge.net/taggedexamples/. @@ -68,9 +73,6 @@ http://wiki.g2.bx.psu.edu/Future/Job%20Failure%20When%20stderr -OBO rendering does not work properly if the URIs lack the fragment or -if an object property lacks an rdfs:label. - TESTS @@ -122,11 +124,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . -OPPL API, OWL API, Pellet, HermiT, FaCT++ and OBOformat have their own -licenses. - -Galaxy is distributed as open source under the conditions of the -Academic Free License (http://www.opensource.org/licenses/academic.php). +OPPL API, OWL API, Pellet, HermiT, and FaCT++ have their own licenses. diff -r 40adbcb2a7cc -r 14bfd77f8520 OPPL/Tool.java --- a/OPPL/Tool.java Tue Oct 11 11:09:52 2011 +0200 +++ b/OPPL/Tool.java Tue Oct 18 10:30:16 2011 +0200 @@ -182,17 +182,17 @@ // Print the ontology to the standard output so other galaxy tools can operate on it - // Do not merge ontologies - if(merge_URI.equals("NoMerge")){ - saveOntology(manager, OWL_ontology, Output_format); - } - // Merge ontologies - else{ + // Merge ontologies (Only in case there are imports) + if(!merge_URI.equals("NoMerge") && !imports_file_path.equals("NoImports")){ OWLOntologyMerger merger = new OWLOntologyMerger(manager); IRI mergedOntologyIRI = IRI.create(merge_URI); OWLOntology merged = merger.createMergedOntology(manager, mergedOntologyIRI); saveOntology(manager, merged, Output_format); } + // Do not merge ontologies (Even in the case in which a URI is provided, if there are not imports do not merge) + else{ + saveOntology(manager, OWL_ontology, Output_format); + } } private static void saveOntology (OWLOntologyManager manager, OWLOntology ontology, String Format) throws OWLOntologyStorageException, IOException, URISyntaxException { @@ -213,12 +213,12 @@ // Keep rdfs:label String class_name = null; - for (OWLAnnotation annotation : cls.getAnnotations(ontology, label)) { - if (annotation.getValue() instanceof OWLLiteral) { - OWLLiteral val = (OWLLiteral) annotation.getValue(); - class_name = val.getLiteral(); - } - } + for (OWLAnnotation annotation : cls.getAnnotations(ontology, label)){ + if (annotation.getValue() instanceof OWLLiteral) { + OWLLiteral val = (OWLLiteral) annotation.getValue(); + class_name = val.getLiteral(); + } + } // I have to remove all the annotations cause I don't know which ones are rendered properly manager.removeAxioms(ontology,ontology.getAnnotationAssertionAxioms(cls.getIRI())); diff -r 40adbcb2a7cc -r 14bfd77f8520 OPPL/oppl.xml --- a/OPPL/oppl.xml Tue Oct 11 11:09:52 2011 +0200 +++ b/OPPL/oppl.xml Tue Oct 18 10:30:16 2011 +0200 @@ -1,4 +1,4 @@ - + It executes an OPPL script against the input ontology and generates a new ontology with the changes described in the OPPL script @@ -46,10 +46,8 @@ --> - - - + @@ -72,12 +70,14 @@ + + - + @@ -143,8 +143,6 @@ http://hermit-reasoner.com/ http://code.google.com/p/factplusplus/ - - http://code.google.com/p/oboformat/ **Contact** diff -r 40adbcb2a7cc -r 14bfd77f8520 OPPL/oppl_galaxy_tool.jar Binary file OPPL/oppl_galaxy_tool.jar has changed