Mercurial > repos > mikel-egana-aranguren > sadi_docker
comparison tools/SADI-Docker/SADI-Docker-tab2rdf.xml @ 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:54c48f9ca32b |
---|---|
1 <tool id="SADI-Docker-tab2rdf" name="SADI - Tab-to-RDF" version="0.1"> | |
2 | |
3 <!-- Modified by Mikel EgaƱa Aranguren, very hacky --> | |
4 | |
5 <description>Converter</description> | |
6 | |
7 <requirements> | |
8 <container type="docker">mikeleganaaranguren/sadi:v6</container> | |
9 </requirements> | |
10 <command> | |
11 #if $namespace.choose_namespace=="none" | |
12 python /sadi/tab2rdf.py $input_file $output_file $output_format none | |
13 #for $i in $triples | |
14 ${i.s_col} ${i.p_val} ${i.o_col} ${i.o_type} | |
15 #end for | |
16 #else | |
17 python /sadi/tab2rdf.py $input_file $output_file $output_format $namespace.choosen_namespace | |
18 #for $i in $triples | |
19 ${i.s_col} ${i.p_val} ${i.o_col} ${i.o_type} | |
20 #end for | |
21 #end if | |
22 </command> | |
23 <inputs> | |
24 <param name="input_file" type="data" format="tabular" label="Input File (tabular)"/> | |
25 | |
26 <conditional name="namespace"> | |
27 <param name="choose_namespace" type="select" label="Add namespace?"> | |
28 <option value="none">No (The tab file includes complete URIs for each resource)</option> | |
29 <option value="yes_choose_namespace">Yes</option> | |
30 </param> | |
31 <when value="yes_choose_namespace"> | |
32 <param name="choosen_namespace" type="text" size="50" value="http://localhost/" label="Namespace" /> | |
33 </when> | |
34 </conditional> | |
35 | |
36 <param name="output_format" type="select" label="Output Format"> | |
37 <option value="ntriples">N-Triples</option> | |
38 <option value="turtle">Turtle</option> | |
39 <option value="rdfxml">RDF/XML</option> | |
40 </param> | |
41 <repeat name="triples" title="Triples"> | |
42 <param name="s_col" type="data_column" data_ref="input_file" label="Subject (column)" /> | |
43 <param name="p_val" type="text" size="50" value="a" label="Predicate (text)"> | |
44 <sanitizer sanitize="False"/> | |
45 </param> | |
46 <param name="o_col" type="data_column" data_ref="input_file" label="Object (column)" /> | |
47 <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"/> | |
48 </repeat> | |
49 </inputs> | |
50 <outputs> | |
51 <data name="output_file" format="rdf" label="${tool.name} on ${on_string}"/> | |
52 </outputs> | |
53 <help> | |
54 | |
55 **Important note** | |
56 | |
57 This is a modified version of Tab2RDF, local to SADI-Docker-Galaxy (http://github.com/mikel-egana-aranguren/SADI-Docker-Galaxy). | |
58 | |
59 **What it does** | |
60 | |
61 Sample Input:: | |
62 | |
63 name age superviser | |
64 Micheal 42 John | |
65 Anne 30 Micheal | |
66 | |
67 Sample Parameters:: | |
68 | |
69 Namespace - 'http://localhost/' | |
70 Triple 1 - c1 'age' c2(literal) | |
71 Triple 2 - c3 'supervises' c1(URI) | |
72 | |
73 Sample Output:: | |
74 | |
75 <http://localhost/Michael> <http://localhost/age> "42" | |
76 <http://localhost/Anne> <http://localhost/age> "30" | |
77 <http://localhost/John> <http://localhost/supervises> <http://localhost/Micheal> | |
78 <http://localhost/Micheal> <http://localhost/supervises> <http://localhost/Anne> | |
79 | |
80 **Output Format** | |
81 | |
82 Output RDF format is N-Triples by default. | |
83 | |
84 </help> | |
85 </tool> |