diff OPPL/oppl.xml @ 5:68935f90c2db

Added OWL imports closure
author Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
date Sat, 17 Sep 2011 13:41:28 +0200
parents 4f60202c58d9
children 3740505b579c
line wrap: on
line diff
--- a/OPPL/oppl.xml	Wed Sep 14 19:52:06 2011 +0200
+++ b/OPPL/oppl.xml	Sat Sep 17 13:41:28 2011 +0200
@@ -1,31 +1,50 @@
-<tool id="oppl" name="Execute an OPPL file against an ontology" version="1.0.2">
-  <description>It executes an OPPL script against the input ontology and generates a new ontology with the changes described in the OPPL script</description>
-  <command>java -jar ${__tool_data_path__}/shared/jars/oppl_galaxy_tool.jar $input $OPPL $format $inferred > $output </command>
-  <!--<command>java -Xmx7000M -Xms250M -DentityExpansionLimit=1000000000 -jar ${__tool_data_path__}/shared/jars/oppl_galaxy_tool.jar $input $OPPL $format > $output </command>-->
-  <inputs>
-    <param format="text" name="input" type="data" label="Input ontology file"/>
-    <param format="text" name="OPPL" type="data" label="OPPL file"/>
-    <param name="format" type="select" label="Choose ontology output format">
-        <option value="OWL" selected="true">OWL</option>
-	<option value="OBO">OBO</option>
-    </param>
-    <param name="inferred" type="boolean" value="False" truevalue="Add_inferred" falsevalue="Gora_ni" label="Add inferred subsumption axioms to output ontology"/>
-  </inputs>
-  <outputs>
-    <data format="text" name="output" />
-  </outputs>
+<tool id="oppl" name="Execute an OPPL file against an ontology" version="1.0.3">
+	<description>It executes an OPPL script against the input ontology and generates a new ontology with the changes described in the OPPL script</description>
+
+	<!-- The conditional is tacky, I think, but it works! -->
+
+	<command>
+		#if $import_opts.imports_select==False #java -Xmx7000M -Xms250M -DentityExpansionLimit=1000000000 -jar ${__tool_data_path__}/shared/jars/oppl_galaxy_tool.jar $input $OPPL $format $inferred NoImports > $output 2>/dev/null
+		#else #java -Xmx7000M -Xms250M -DentityExpansionLimit=1000000000 -jar ${__tool_data_path__}/shared/jars/oppl_galaxy_tool.jar $input $OPPL $format $inferred $imports > $output 2>/dev/null
+		#end if
+	</command>
+		
+	<!--<command>java -Xmx7000M -Xms250M -DentityExpansionLimit=1000000000 -jar ${__tool_data_path__}/shared/jars/oppl_galaxy_tool.jar $input $OPPL $format $inferred $imports > $output 2>/dev/null</command>-->
 
-  <tests>
-    <test>
-      <param name="input" value="test.owl"/>
-      <param name="OPPL" value="test.oppl"/>
-      <param name="format" value="OWL"/>
-      <param name="inferred" value="False"/>
-      <output name="out_file" file="test_new.owl"/>	
-    </test>
-  </tests>
+	<inputs>
+		<param format="text" name="input" type="data" label="Input ontology file"/>
+		<param format="text" name="OPPL" type="data" label="OPPL file"/>
+		<conditional name="import_opts">
+			<param name="imports_select" type="boolean" value="False" truevalue="imports_yes" falsevalue="imports_no" label="Tick the box if the loaded ontology includes OWL imports"/>
+			<when value="imports_no"/>
+			<!--<when value="imports_no">
+				<param type="hidden" name="imports" value="NoImports"/>
+	    		</when>-->
+			<when value="imports_yes">
+                		<param format="text" name="imports" type="data" label="OWL imports URI mapping file"/>
+            		</when>
+		</conditional>
+		<param name="format" type="select" label="Choose ontology output format">
+			<option value="OWL" selected="true">OWL</option>
+			<option value="OBO">OBO</option>
+		</param>
+		<param name="inferred" type="boolean" value="False" truevalue="Add_inferred" falsevalue="Gora_ni" label="Add inferred subsumption axioms to output ontology"/>
 
-  <help>
+	</inputs>
+	<outputs>
+		<data format="text" name="output" />
+	</outputs>
+	<tests>
+		<test>
+			<param name="input" value="test.owl"/>
+			<param name="OPPL" value="test.oppl"/>
+			<param name="format" value="OWL"/>
+			<param name="inferred" value="False"/>
+			<param name="imports" value="NoImports"/>
+			<output name="out_file" file="test_new.owl"/>	
+		</test>
+	</tests>
+	<help>
 
 **About OPPL-Galaxy**
 
@@ -37,19 +56,19 @@
 
 **Usage**
 
-  An ontology and an OPPL file are needed (test.owl and test.oppl can be used as samples). Load both with Get Data >> Upload File from your computer. 
+  An ontology and an OPPL file are needed (test.owl and test.oppl can be used as samples, both available in the bundle). Load both with Get Data >> Upload File from your computer. 
 
-  Then execute the OPPL file against the OWL file with Ontology Pre Processor Language >> Execute an OPPL file against an OWL file.
-
-  This is the OPPL script provided in the bundle, test.oppl (Variables start with ?): 
+  Then execute the OPPL file against the OWL file with Ontology Pre Processor Language >> Execute an OPPL file against an OWL file. A new output ontology will be generated.
 
-  ?whole:CLASS,
-  ?part:CLASS
-  SELECT
-  ?part SubClassOf part_of some ?whole WHERE ?part != Nothing
-  BEGIN
-  ADD ?part SubClassOf part_of only ?whole
-  END;
+  In case the loaded ontology includes OWL imports, a file that maps the imported ontologies' URIs to actual physical URIs is needed. The file (See the file test_URI_mappings provided in the bundle) follows the convention URI-tab-physical URI:
+  
+  http://purl.obolibrary.org/obo/CHEBI_ONTOLOGY_chebi_ontology	/home/pik/UPM/OPPL_galaxy/oppl/OPPL/chebi.owl
+
+  http://purl.obolibrary.org/obo/UBERON_uberon	/home/pik/UPM/OPPL_galaxy/oppl/OPPL/cell.owl
+
+  The output ontology can be OBO or OWL (RDF/XML).
+ 
+  The inferred subsumption axioms can be added to the output ontology as asserted axioms. 
 
 **More information**
 
@@ -65,6 +84,6 @@
 
   Please send any request or comment to mikel.egana.aranguren@gmail.com.
 
-  </help>
+	</help>
 
 </tool>