changeset 0:54c48f9ca32b default tip

first release
author Mikel Egana <mikel.egana.aranguren@gmail.com>
date Fri, 04 Sep 2015 23:24:45 +0200
parents
children
files tools/SADI-Docker/SADI-Docker-RDFSyntaxConverter.xml tools/SADI-Docker/SADI-Docker-SPARQLGalaxy.xml tools/SADI-Docker/SADI-Docker-mergeRDFgraphs.xml tools/SADI-Docker/SADI-Docker-rapper.xml tools/SADI-Docker/SADI-Docker-sadi_client.xml tools/SADI-Docker/SADI-Docker-tab2rdf.xml
diffstat 6 files changed, 271 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/SADI-Docker/SADI-Docker-RDFSyntaxConverter.xml	Fri Sep 04 23:24:45 2015 +0200
@@ -0,0 +1,49 @@
+<tool id="SADI-Docker-RDFSyntaxConverter" name="SADI - RDF Syntax Converter" version="0.1">
+	<description>Converts RDF to N3, N-TRIPLE or TAB format</description>	
+	<requirements>
+	  <container type="docker">mikeleganaaranguren/sadi:v6</container>
+	</requirements>
+
+	<command>java -jar sadi/RDFSyntaxConverter.jar $input $format > $output 2>/dev/null</command>
+		
+	<inputs>
+		<param name="input" type="data" format="rdf" label="RDF input file"/>	
+		<param name="format" type="select" label="Choose RDF output format">
+			<option value="N3">N3</option>
+			<option value="N-TRIPLE">N-TRIPLE</option>
+			<option value="TAB" selected="true">Tab separated columns</option>
+		</param>
+	</inputs>
+	<outputs>
+		<data format="text" name="output" />
+	</outputs>
+	
+	 <tests>
+		<test>
+			<param name="input" value="hello-input.rdf"/>
+			<param name="format" value="N3"/>
+			<output name="output" file="RDFSyntaxConverter_N3_test_hello_output"/>
+		</test>
+		<test>
+			<param name="input" value="hello-input.rdf"/>
+			<param name="format" value="N-TRIPLE"/>
+			<output name="output" file="RDFSyntaxConverter_N-TRIPLE_test_hello_output"/>
+		</test>
+		<test>
+			<param name="input" value="hello-input.rdf"/>
+			<param name="format" value="TAB"/>
+			<output name="output" file="RDFSyntaxConverter_TAB_test_hello_output"/>
+		</test>
+	</tests>
+	<help>
+	  
+	  **What it does** 
+	  
+	  Given an RDF input file, it converts it to N3, N-TRIPLE or TAB (A tab delimited file containing three columns -subjects, predicates and objects- for other Galaxy tools to consume).
+	  
+	  **About**
+	  
+	  More information and contact: http://github.com/mikel-egana-aranguren/SADI-Docker-Galaxy.
+	  
+	</help>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/SADI-Docker/SADI-Docker-SPARQLGalaxy.xml	Fri Sep 04 23:24:45 2015 +0200
@@ -0,0 +1,39 @@
+<tool id="SADI-Docker-SPARQLGalaxy" name="SADI - Execute an SPARQL query against an RDF file" version="0.1">
+	<description>It executes an SPARQL query against the input RDF file and generates an HTML file with the variables and bound entities</description>
+	  	<requirements>
+	  <container type="docker">mikeleganaaranguren/sadi:v6</container>
+	</requirements>
+	<command>
+	   python /sadi/sparql.py $ontology "$pasted_query" $out_format > $output 2>/dev/null
+	</command>
+	<inputs>
+		<param name="ontology" type="data" format="rdf" label="Input RDF file"/>		   
+		<param name="pasted_query" type="text" area="True" size="10x50" label="SPARQL Query" value="SELECT * WHERE { ?s ?p ?o }">
+		  <sanitizer sanitize="False"/>
+		</param>	
+		<param name="out_format" type="select" label="Output format" help="">
+			<option value="html" selected="true">HTML</option>
+			<option value="tab">TABULAR</option>
+		</param>
+
+	</inputs>
+	<outputs>
+		<data format="html" name="output">
+		<change_format>
+			<when input="out_format" value="tab" format="tabular" />
+		 </change_format>
+		 </data>
+	</outputs>
+	<help>
+	  
+**Usage**
+
+  An RDF file (in any format that RDFLib can accept) and a SPARQL query are needed.
+
+**About**
+	  
+  More information and contact: http://github.com/mikel-egana-aranguren/SADI-Docker-Galaxy.
+
+	</help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/SADI-Docker/SADI-Docker-mergeRDFgraphs.xml	Fri Sep 04 23:24:45 2015 +0200
@@ -0,0 +1,36 @@
+<tool id="SADI-Docker-mergeRDFgraphs" name="SADI - Merge RDF Graphs" version="0.1">
+  <description>Merge RDF graphs</description>
+  	<requirements>
+	  <container type="docker">mikeleganaaranguren/sadi:v6</container>
+	</requirements>
+  <command>
+      python /sadi/MergeRDFGraphs.py
+      #for $i in $input_files
+        ${i.input_file}
+      #end for
+      > $output_file
+  </command>
+  <inputs>
+    <repeat name="input_files" title="Input RDF file">
+      <param name="input_file" type="data" format="rdf" label="RDF file"/>
+    </repeat>
+  </inputs>
+  <outputs>
+    <data name="output_file" format="rdf"/>
+  </outputs>
+  <help>
+    
+**What it does**
+
+Merge RDF graphs from history.
+
+**Output Format**
+
+Output RDF format is RDF/XML by default.
+
+**About**
+	  
+More information and contact: http://github.com/mikel-egana-aranguren/SADI-Docker-Galaxy.
+
+  </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/SADI-Docker/SADI-Docker-rapper.xml	Fri Sep 04 23:24:45 2015 +0200
@@ -0,0 +1,32 @@
+<tool id="SADI-Docker-rapper" name="SADI - RDF Format (Rapper)" version="0.1">
+  <description>RDF converter (Rapper)</description>
+  	<requirements>
+	  <container type="docker">mikeleganaaranguren/sadi:v6</container>
+	</requirements>
+  <command>
+    rapper -q $input_file -i $input_format -o $output_format > $output_file
+  </command>
+  <inputs>
+    <param name="input_file" type="data" label="Input File"/>
+    <param name="input_format" type="select" label="Input Format">
+      <option value="ntriples">N-Triples</option>
+      <option value="turtle">Turtle</option>
+      <option value="rdfxml">RDF/XML</option>
+    </param>
+    <param name="output_format" type="select" label="Output Format">
+      <option value="ntriples">N-Triples</option>
+      <option value="turtle">Turtle</option>
+      <option value="rdfxml">RDF/XML</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data name="output_file" format="rdf" label="${tool.name} on ${on_string}"/>
+  </outputs>
+  <help>
+
+**What it does**
+
+This tool converts RDF format from/to N-Triples, Turtle, RDF/XML with Raptor's Rapper.
+
+  </help>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/SADI-Docker/SADI-Docker-sadi_client.xml	Fri Sep 04 23:24:45 2015 +0200
@@ -0,0 +1,30 @@
+<tool id="SADI-Docker-sadi_client" name="SADI client" version="0.1">
+	<description>Invoke a SADI service, given an input RDF, synchronously</description>
+	<requirements>
+	  <container type="docker">mikeleganaaranguren/sadi:v6</container>
+	</requirements>
+	
+	<command>java -jar /sadi/sadi_client.jar $url $input > $output 2>/dev/null</command>
+		
+	<inputs>
+		<param name="url" type="text" size="250" label="Service URL">
+		  <sanitizer sanitize="False"/><!-- Disable sanitizer for URLs with e.g. tilde character -->
+		</param>
+		<param name="input" type="data" format="rdf" label="RDF input for SADI service"/>	
+	</inputs>
+	<outputs>
+		<data format="rdf" name="output" />
+	</outputs>
+	
+	<help>
+	  
+	  **What it does**
+	  
+	  Given an RDF input and a SADI service URL, sends the input to the service obtaining an output, synchronously. 
+	  
+	  **About**
+	  
+	  More information and contact: http://github.com/mikel-egana-aranguren/SADI-Docker-Galaxy.
+	  
+	</help>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/SADI-Docker/SADI-Docker-tab2rdf.xml	Fri Sep 04 23:24:45 2015 +0200
@@ -0,0 +1,85 @@
+<tool id="SADI-Docker-tab2rdf" name="SADI - Tab-to-RDF" version="0.1">
+  
+  <!-- Modified by Mikel EgaƱa Aranguren, very hacky -->
+  
+  <description>Converter</description>
+  
+  	<requirements>
+	  <container type="docker">mikeleganaaranguren/sadi:v6</container>
+	</requirements>
+  <command>
+    #if $namespace.choose_namespace=="none"
+      python /sadi/tab2rdf.py $input_file $output_file $output_format none
+      #for $i in $triples
+        ${i.s_col} ${i.p_val} ${i.o_col} ${i.o_type}
+      #end for
+    #else
+      python /sadi/tab2rdf.py $input_file $output_file $output_format $namespace.choosen_namespace
+      #for $i in $triples
+        ${i.s_col} ${i.p_val} ${i.o_col} ${i.o_type}
+      #end for  
+    #end if
+  </command>
+  <inputs>
+    <param name="input_file" type="data" format="tabular" label="Input File (tabular)"/>
+    
+    <conditional name="namespace">
+      <param name="choose_namespace" type="select" label="Add namespace?">
+        <option value="none">No (The tab file includes complete URIs for each resource)</option>
+        <option value="yes_choose_namespace">Yes</option>
+      </param>
+      <when value="yes_choose_namespace">
+        <param name="choosen_namespace" type="text" size="50" value="http://localhost/" label="Namespace" />
+      </when>
+    </conditional>
+    
+    <param name="output_format" type="select" label="Output Format">
+      <option value="ntriples">N-Triples</option>
+      <option value="turtle">Turtle</option>
+      <option value="rdfxml">RDF/XML</option>
+    </param>
+    <repeat name="triples" title="Triples">
+      <param name="s_col" type="data_column" data_ref="input_file" label="Subject (column)" />
+      <param name="p_val" type="text" size="50" value="a" label="Predicate (text)">
+	<sanitizer sanitize="False"/>
+      </param>
+      <param name="o_col" type="data_column" data_ref="input_file" label="Object (column)" />
+      <param name="o_type" label="Check if this object is Literal (Keep unchecked if this object is URI)" type="boolean" truevalue="1" falsevalue="0" checked="False"/>
+    </repeat>
+  </inputs>
+  <outputs>
+    <data name="output_file" format="rdf" label="${tool.name} on ${on_string}"/>
+  </outputs>
+  <help>
+    
+**Important note**
+
+This is a modified version of Tab2RDF, local to SADI-Docker-Galaxy (http://github.com/mikel-egana-aranguren/SADI-Docker-Galaxy).
+
+**What it does**
+
+Sample Input::
+
+    name     age  superviser
+    Micheal  42   John
+    Anne     30   Micheal
+
+Sample Parameters::
+
+    Namespace - 'http://localhost/'
+    Triple 1 - c1 'age' c2(literal)
+    Triple 2 - c3 'supervises' c1(URI)
+
+Sample Output::
+
+    &lt;http://localhost/Michael&gt; &lt;http://localhost/age&gt; "42"
+    &lt;http://localhost/Anne&gt; &lt;http://localhost/age&gt; "30"
+    &lt;http://localhost/John&gt; &lt;http://localhost/supervises&gt; &lt;http://localhost/Micheal&gt;
+    &lt;http://localhost/Micheal&gt; &lt;http://localhost/supervises&gt; &lt;http://localhost/Anne&gt;
+
+**Output Format**
+
+Output RDF format is N-Triples by default.
+
+  </help>
+</tool>