Repository 'salsa'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/salsa

Changeset 2:ab5b7f6b7198 (2021-09-23)
Previous changeset 1:ba7b0f11e470 (2021-06-18) Next changeset 3:f77f7a7f3b83 (2021-11-11)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/salsa2 commit 59c5c8edd0c2080d7685e312fee19de1da75097e"
modified:
salsa2.xml
b
diff -r ba7b0f11e470 -r ab5b7f6b7198 salsa2.xml
--- a/salsa2.xml Fri Jun 18 20:29:33 2021 +0000
+++ b/salsa2.xml Thu Sep 23 19:36:12 2021 +0000
b
@@ -5,7 +5,7 @@
     </xrefs>
     <macros>
         <token name="@TOOL_VERSION@">2.3</token>
-        <token name="@VERSION_SUFFIX@">0</token>
+        <token name="@VERSION_SUFFIX@">1</token>
     </macros>
     <requirements>
         <requirement type="package" version="@TOOL_VERSION@">salsa2</requirement>
@@ -18,9 +18,18 @@
 run_pipeline.py
 -a '$fasta_in'
 -l input.fasta.fai
+#if $enzyme_conditional.enzyme_options == 'preconfigured':
+    #if $enzyme_conditional.preconfigured_enzymes == 'dovetail'
+        -e 'GATC'
+    #else if $enzyme_conditional.preconfigured_enzymes == 'arima1'
+        -e 'GATC,GANTC'
+    #else
+        -e 'GATC,GANTC,CTNAG,TTAA'
+    #end if
+#else:
+    -e '${enzyme_conditional.manual_enzyme}'
+#end if
 -b '$bed_file'
--e '$enzyme'
-
 #if str($cutoff):
     -c '$cutoff'
 #end if
@@ -37,10 +46,25 @@
         <param name="bed_file" type="data" format="bed" label="Bed alignment" help="Sorted by read names"/>
         <param name="cutoff" argument="-c" type="integer" min="1" label="Cutoff" optional="true" help="Minimum contig length to scaffold."/>
         <param name="gfa_file" argument="-g" type="data" format="gfa1,gfa2" optional="true" label="Sequence graphs" help="Sequence graphs encoded in GFA format."/>
-        <param name="enzyme" argument="-e" type="text" label="Restriction enzyme sequence(s)"
-               help="Restriction enzyme sequence. If multiple were used, include all as a comma separated list without spaces (ex. 'GATC,AAGCTT').">
-            <validator type="expression" message="Only alphabetical letters and the comma can be used in to define restriction enzym sequences.">value.replace(',', '').isalpha()</validator>
-        </param>
+        <conditional name="enzyme_conditional">
+            <param name="enzyme_options" type="select" label="Enzyme selection" help="TODO">
+                <option value="preconfigured">Preconfigured restriction enzymes</option>
+                <option value="specific">Enter a specific sequence</option>
+            </param>
+            <when value="preconfigured">
+                <param name="preconfigured_enzymes" type="select" multiple="true" label="Preconfigured enzymes">
+                    <option value="dovetail">Dovetail Chicago, Dovetail Hi-C or Phase: GATC</option>
+                    <option value="arima1">Arima Hi-C 1.0: GATC, GANTC</option>
+                    <option value="arima2">Arima Hi-C 2.0: GATC, GANTC, CTNAG, TTAA</option>
+                </param>
+            </when>
+            <when value="specific">
+                <param name="manual_enzyme" argument="-e" type="text" label="Restriction enzyme sequence(s)"
+                    help="Restriction enzyme sequence. If multiple were used, include all as a comma separated list without spaces (ex. 'GATC,AAGCTT').">
+                    <validator type="expression" message="Only alphabetical letters and the comma can be used in to define restriction enzym sequences.">value.replace(',', '').isalpha()</validator>
+                </param>
+            </when>
+        </conditional>
         <param name="iter" argument="-i" type="integer" min="0" label="Iterations" optional="true" help="Number of iterations to run"/>
     </inputs>
     <outputs>
@@ -53,17 +77,39 @@
             <param name="length" value="test.fai"/>
             <param name="bed_file" value="test.bed"/>
             <param name="gfa_file" value="test.gfa1"/>
+            <conditional name="enzyme_conditional">
+                <param name="enzyme_options" value="specific"/>
+                <param name="manual_enzyme" value="GATC,GANTC"/> 
+            </conditional>
             <param name="enzyme" value="GATC,GANTC"/> 
             <param name="cutoff" value="1000"/>
             <param name="iter" value="3"/>
             <output name="scaffolds_fasta" file="out.fasta"/>
             <output name="scaffolds_agp" file="out.agp"/>
         </test>
+        <!--Test manual enzyme-->
         <test>
             <param name="fasta_in" value="test.fasta"/>
             <param name="bed_file" value="test.bed"/>
             <param name="gfa_file" value="test.gfa1"/>
-            <param name="enzyme" value="GATC,GANTC"/> 
+            <conditional name="enzyme_conditional">
+                <param name="enzyme_options" value="specific"/>
+                <param name="manual_enzyme" value="GATC,GANTC"/> 
+            </conditional>
+            <param name="cutoff" value="1000"/>
+            <param name="iter" value="3"/>
+            <output name="scaffolds_fasta" file="out.fasta"/>
+            <output name="scaffolds_agp" file="out.agp"/>
+        </test>
+        <!--Test predefined enzyme-->
+        <test>
+            <param name="fasta_in" value="test.fasta"/>
+            <param name="bed_file" value="test.bed"/>
+            <param name="gfa_file" value="test.gfa1"/>
+            <conditional name="enzyme_conditional">
+                <param name="enzyme_options" value="preconfigured"/>
+                <param name="preconfigured_enzymes" value="arima1"/> 
+            </conditional>
             <param name="cutoff" value="1000"/>
             <param name="iter" value="3"/>
             <output name="scaffolds_fasta" file="out.fasta"/>