comparison sbol_converter.xml @ 0:38a0feb2e79d draft

planemo upload commit f40274f6b9f6a15eb4022aab21286d4c96cd8475-dirty
author tduigou
date Thu, 15 Sep 2022 13:40:15 +0000
parents
children 8d020045186c
comparison
equal deleted inserted replaced
-1:000000000000 0:38a0feb2e79d
1 <tool id="sbol_converter" name="SBOL Converter" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09">
2 <description>Convert between SBOL3 and other genetic design formats</description>
3 <macros>
4 <token name="@VERSION_SUFFIX@">0</token>
5 <token name="@TOOL_VERSION@">1.0a16</token>
6 </macros>
7 <requirements>
8 <requirement type="package" version="@TOOL_VERSION@">sbol-utilities</requirement>
9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[
11 #if str($convert_type.type) == "SBOL2 to SBOL3"
12 ln -sv '$sbol2_input' 'input.$sbol2_input.ext' &&
13 sbol2to3 -o '$output' 'input.$sbol2_input.ext'
14 #elif str($convert_type.type) == "SBOL3 to SBOL2"
15 ln -sv '$sbol3_input' 'input.$sbol3_input.ext' &&
16 sbol3to2 -o '$output' 'input.$sbol3_input.ext'
17 #elif str($convert_type.type) == "SBOL3 to GENBANK"
18 ln -sv '$sbol3_input' 'input.$sbol3_input.ext' &&
19 sbol2genbank -o '$output' 'input.$sbol3_input.ext'
20 #elif str($convert_type.type) == "GENBANK to SBOL3"
21 ln -sv '$genbank_input' 'input.$genbank_input.ext' &&
22 genbank2sbol -o '$output' 'input.$genbank_input.ext' --namespace '$convert_type.namespace'
23 #elif str($convert_type.type) == "SBOL3 to FASTA"
24 ln -sv '$sbol3_input' 'input.$sbol3_input.ext' &&
25 sbol2fasta -o '$output' 'input.$sbol3_input.ext'
26 #elif str($convert_type.type) == "FASTA to SBOL3"
27 ln -sv '$fasta_input' 'input.$fasta_input.ext' &&
28 fasta2sbol -o '$output' 'input.$fasta_input.ext' --namespace '$convert_type.namespace'
29 #elif str($convert_type.type) == "SBOL2 to FASTA"
30 ln -sv '$sbol2_input' 'input.$sbol2_input.ext' &&
31 sbol-converter SBOL2 FASTA -o '$output' 'input.$sbol2_input.ext'
32 #elif str($convert_type.type) == "FASTA to SBOL2"
33 ln -sv '$fasta_input' 'input.$fasta_input.ext' &&
34 sbol-converter FASTA SBOL2 -o '$output' 'input.$fasta_input.ext' --namespace '$convert_type.namespace'
35 #end if
36 ]]></command>
37 <inputs>
38 <conditional name="convert_type">
39 <param name="type" type="select" label="Converting type" help="Choose the format (input/ouput) for SBOL conversion">
40 <option value="SBOL2 to SBOL3" selected="True">From SBOL2 to SBOL3</option>
41 <option value="SBOL2 to FASTA" >From SBOL2 to FASTA</option>
42 <option value="SBOL3 to SBOL2" >From SBOL3 to SBOL2</option>
43 <option value="SBOL3 to FASTA" >From SBOL3 to FASTA</option>
44 <option value="SBOL3 to GENBANK" >From SBOL3 to GENBANK</option>
45 <option value="GENBANK to SBOL3" >From GENBANK to SBOL3</option>
46 <option value="FASTA to SBOL3" >From FASTA to SBOL3</option>
47 <option value="FASTA to SBOL2" >From FASTA to SBOL2</option>
48 </param>
49 <when value="SBOL2 to SBOL3">
50 <param name="sbol2_input" type="data" format="xml,rdf,nt" label="SBOL2 input" help="SBOL2 file in XML or RDF or NT format"/>
51 </when>
52 <when value="SBOL3 to SBOL2">
53 <param name="sbol3_input" type="data" format="xml,rdf,nt" label="SBOL3 input" help="SBOL3 file in XML or RDF or NT format"/>
54 </when>
55 <when value="SBOL3 to GENBANK">
56 <param name="sbol3_input" type="data" format="xml,rdf,nt" label="SBOL3 input" help="SBOL3 file in XML or RDF or NT format"/>
57 </when>
58 <when value="GENBANK to SBOL3">
59 <param name="genbank_input" type="data" format="gb" label="Genbank input" help="Genbank file in GB format"/>
60 <param argument="--namespace" type="text" value="https://synbiohub.org/public/igem" label="Namespace URL" help="Namespace URL, required for conversions from GenBank. Default=https://synbiohub.org/public/igem" />
61 </when>
62 <when value="SBOL3 to FASTA">
63 <param name="sbol3_input" type="data" format="xml,rdf,nt" label="SBOL3 input" help="SBOL3 file in XML or RDF or NT format"/>
64 </when>
65 <when value="FASTA to SBOL3">
66 <param name="fasta_input" type="data" format="fasta" label="FASTA input" help="FASTA input file"/>
67 <param argument="--namespace" type="text" value="https://synbiohub.org/public/igem" label="Namespace URL" help="Namespace URL, required for conversions from FASTA. Default=https://synbiohub.org/public/igem" />
68 </when>
69 <when value="SBOL2 to FASTA">
70 <param name="sbol2_input" type="data" format="xml,rdf,nt" label="SBOL2 input" help="SBOL2 file in XML or RDF or NT format" />
71 </when>
72 <when value="FASTA to SBOL2">
73 <param name="fasta_input" type="data" format="fasta" label="FASTA input" help="FASTA input file"/>
74 <param argument="--namespace" type="text" value="https://synbiohub.org/public/igem" label="Namespace URL" help="Namespace URL, required for conversions from FASTA. Default=https://synbiohub.org/public/igem" />
75 </when>
76 </conditional>
77 </inputs>
78 <outputs>
79 <data name="output" format="nt" label="${tool.name} on ${on_string}: ${convert_type.type}" >
80 <change_format>
81 <when input="convert_type.type" value="SBOL3 to GENBANK" format="gb" />
82 <when input="convert_type.type" value="SBOL3 to FASTA" format="fasta" />
83 <when input="convert_type.type" value="SBOL2 to FASTA" format="fasta" />
84 </change_format>
85 </data>
86 </outputs>
87 <tests>
88 <test>
89 <!-- test 1: check if identical outputs are produced sbol2 to sbol3-->
90 <conditional name="convert_type">
91 <param name="type" value="SBOL2 to SBOL3"/>
92 </conditional>
93 <param name="sbol2_input" value="BASIC_construct_A1_sbol2_input.xml" />
94 <output name="output" file="BASIC_construct_A1_sbol3_output.nt" ftype="nt" compare="diff"/>
95 </test>
96
97 <test>
98 <!-- test 2: check if identical outputs are produced sbol3 to genbank-->
99 <conditional name="convert_type">
100 <param name="type" value="SBOL3 to GENBANK"/>
101 </conditional>
102 <param name="sbol3_input" value="BBa_J23101.nt" />
103 <output name="output" file="BBa_J23101.gb" ftype="gb" compare="diff"/>
104 </test>
105
106 <test>
107 <!-- test 2: check if identical outputs are produced sbol3 to fasta-->
108 <conditional name="convert_type">
109 <param name="type" value="SBOL3 to FASTA"/>
110 </conditional>
111 <param name="sbol3_input" value="BBa_J23101.nt" />
112 <output name="output" >
113 <assert_contents>
114 <has_text text=">BBa_J23101 constitutive promoter family member" />
115 <has_text text="tttacagctagctcagtcctaggtattatgctagc" />
116 </assert_contents>
117 </output>
118 </test>
119 </tests>
120 <help><![CDATA[
121 SBOL Converter
122 ================
123
124 Convert between SBOL3 and other genetic design formats.
125
126 Input
127 -----
128 Required:
129 * **INPUT_FILE**\ : SBOL2 or SBOL3 or GENBANK or FASTA input file.
130 * **Namespace URL**\ : Namespace URL, required for conversions from GenBank or from Fasta. Default=https://synbiohub.org/public/igem"
131
132 Output
133 ------
134 * **OUTPUT_FILE**\ : SBOL2 or SBOL3 or GENBANK or FASTA output file.
135
136 Project Links
137 ------------------
138 * `GitHub <https://github.com/SynBioDex/SBOL-utilities>`_
139
140 License
141 -------
142 * `MIT <https://github.com/SynBioDex/SBOL-utilities/blob/develop/LICENSE.txt>`_
143 ]]></help>
144 </tool>