diff velveth.xml @ 2:8d09f8be269e draft

"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/velvet commit c5031ee00f5d61be43d2d6a1349870d6c8a817de"
author iuc
date Tue, 16 Jun 2020 12:58:20 -0400
parents 5da9a0e2fb2d
children 920677cd220f
line wrap: on
line diff
--- a/velveth.xml	Wed Feb 12 11:16:32 2020 -0500
+++ b/velveth.xml	Tue Jun 16 12:58:20 2020 -0400
@@ -1,4 +1,4 @@
-<tool id="velveth" name="velveth" version="@WRAPPER_VERSION@.1">
+<tool id="velveth" name="velveth" version="@WRAPPER_VERSION@.2">
   <description>Prepare a dataset for the Velvet velvetg Assembler</description>
   <macros>
     <import>macros.xml</import>
@@ -9,147 +9,124 @@
     velveth 2>&1 | grep "Version" | sed -e 's/Version //'
   ]]></version_command>
   <command><![CDATA[
-mkdir -p '${out_file1.extra_files_path}' &&
-velveth
-'${out_file1.extra_files_path}'
-$hash_length
-$strand_specific
-#for $i in $inputs
-    ${i.file_format}
-    ${i.read_type}
-    '${i.input}'
-#end for
+    export OMP_NUM_THREADS="\${GALAXY_SLOTS:-1}" &&
+    mkdir -p '${outfile.extra_files_path}' &&
+    velveth
+      '$outfile.extra_files_path'
+      $hash_length
+      #for $i in $inputs
+          -${i.input_type.input.ext}
+          ${i.input_type.read_type}
+          #if str( $i.input_type.input_type_selector ) == "paireds":
+              -separate '${i.input_type.input}' '${i.input_type.input2}'
+          #else if str( $i.input_type.input_type_selector ) == "pairedi":
+              -interleaved '${i.input_type.input}'
+          #else:
+              '${i.input_type.input}'
+          #end if
+      #end for
+      $strand_specific
   ]]></command>
   <inputs>
-    <param name="hash_length" type="select" label="Hash length" help="k-mer length in base pairs of the words being hashed">
-      <option value="11">11</option>
-      <option value="13">13</option>
-      <option value="15">15</option>
-      <option value="17">17</option>
-      <option value="19">19</option>
-      <option value="21" selected="yes">21</option>
-      <option value="23">23</option>
-      <option value="25">25</option>
-      <option value="27">27</option>
-      <option value="29">29</option>
-      <option value="31">31</option>
-      <option value="33">33</option>
-      <option value="35">35</option>
-      <option value="37">37</option>
-      <option value="39">39</option>
-      <option value="41">41</option>
-      <option value="43">43</option>
-      <option value="45">45</option>
-      <option value="47">47</option>
-      <option value="49">49</option>
-      <option value="51">51</option>
-      <option value="53">53</option>
-      <option value="55">55</option>
-      <option value="57">57</option>
-      <option value="59">59</option>
-      <option value="61">61</option>
-      <option value="63">63</option>
-      <option value="65">65</option>
-      <option value="67">67</option>
-      <option value="69">69</option>
-      <option value="71">71</option>
-      <option value="73">73</option>
-      <option value="75">75</option>
-      <option value="77">77</option>
-      <option value="79">79</option>
-      <option value="81">81</option>
-      <option value="83">83</option>
-      <option value="85">85</option>
-      <option value="87">87</option>
-      <option value="89">89</option>
-      <option value="91">91</option>
-      <option value="93">93</option>
-      <option value="95">95</option>
-      <option value="97">97</option>
-      <option value="99">99</option>
-      <option value="101">101</option>
-      <option value="103">103</option>
-      <option value="105">105</option>
-      <option value="107">107</option>
-      <option value="109">109</option>
-      <option value="111">111</option>
-      <option value="113">113</option>
-      <option value="115">115</option>
-      <option value="117">117</option>
-      <option value="119">119</option>
-      <option value="121">121</option>
-      <option value="123">123</option>
-      <option value="125">125</option>
-      <option value="127">127</option>
-      <option value="129">129</option>
-      <option value="131">131</option>
-      <option value="133">133</option>
-      <option value="135">135</option>
-      <option value="137">137</option>
-      <option value="139">139</option>
-      <option value="141">141</option>
-      <option value="143">143</option>
-      <option value="145">145</option>
-      <option value="147">147</option>
-      <option value="149">149</option>
-      <option value="151">151</option>
-      <option value="153">153</option>
-      <option value="155">155</option>
-      <option value="157">157</option>
-      <option value="159">159</option>
-      <option value="161">161</option>
-      <option value="163">163</option>
-      <option value="165">165</option>
-      <option value="167">167</option>
-      <option value="169">169</option>
-      <option value="171">171</option>
-      <option value="173">173</option>
-      <option value="175">175</option>
-      <option value="177">177</option>
-      <option value="179">179</option>
-      <option value="181">181</option>
-      <option value="183">183</option>
-      <option value="185">185</option>
-      <option value="187">187</option>
-      <option value="189">189</option>
-      <option value="191">191</option>
-    </param>
+      <param label="Hash Length" name="hash_length" type="integer" value="21" min="11" max="191" help="k-mer length in base pairs of the words being hashed."/>
     <param name="strand_specific" type="boolean" checked="false" truevalue="-strand_specific" falsevalue="" label="Use strand specific transcriptome sequencing" help="If you are using a strand specific transcriptome sequencing protocol, you may wish to use this option for better results."/>
     <repeat name="inputs" title="Input Files">
-      <param label="file format" name="file_format" type="select">
-        <option value="-fasta" selected="yes">fasta</option>
-        <option value="-fastq">fastq</option>
-        <option value="-eland">eland</option>
-        <option value="-gerald">gerald</option>
-      </param>
-      <param label="read type" name="read_type" type="select">
-        <option value="-short" selected="yes">short reads</option>
-        <option value="-shortPaired">shortPaired reads</option>
-        <option value="-short2">short2 reads</option>
-        <option value="-shortPaired2">shortPaired2 reads</option>
-        <option value="-long">long reads</option>
-        <option value="-longPaired">longPaired reads</option>
-      </param>
-
-      <param name="input" type="data" format="fasta,fastq,eland,gerald" label="Dataset"/>
+      <conditional name="input_type">
+          <param name="input_type_selector" type="select" label="Choose the input type">
+              <option value="single" selected="true">Single ended</option>
+              <option value="paireds">separate paired end</option>
+              <option value="pairedi">interleaved paired end</option>
+          </param>
+          <when value="single">
+            <param label="read type" name="read_type" type="select">
+              <option value="-short" selected="true">short reads</option>
+              <option value="-short2">short2 reads</option>
+              <option value="-short3">short3 reads</option>
+              <option value="-short4">short4 reads</option>
+              <option value="-long">long reads</option>
+            </param>
+            <param name="input" type="data" format="fasta,fastq,fasta.gz,fastq.gz" label="Dataset"/>
+          </when>
+          <when value="paireds">
+            <param label="read type" name="read_type" type="select" >
+              <option value="-shortPaired" selected="true">shortPaired reads</option>
+              <option value="-shortPaired2">shortPaired2 reads</option>
+              <option value="-shortPaired3">shortPaired3 reads</option>
+              <option value="-shortPaired4">shortPaired4 reads</option>
+              <option value="-longPaired">longPaired reads</option>
+            </param>
+            <param name="input" type="data" format="fasta,fastq,fasta.gz,fastq.gz" label="Dataset"/>
+            <param name="input2" type="data" format="fasta,fastq,fasta.gz,fastq.gz" label="Dataset"/>
+          </when>
+          <when value="pairedi">
+            <param label="read type" name="read_type" type="select">
+              <option value="-shortPaired" selected="true">shortPaired reads</option>
+              <option value="-shortPaired2">shortPaired2 reads</option>
+              <option value="-shortPaired3">shortPaired3 reads</option>
+              <option value="-shortPaired4">shortPaired4 reads</option>
+              <option value="-longPaired">longPaired reads</option>
+            </param>
+            <param name="input" type="data" format="fasta,fastq,fasta.gz,fastq.gz" label="Dataset"/>
+          </when>
+      </conditional>
     </repeat>
   </inputs>
   <outputs>
-    <data name="out_file1" format="velvet" />
+    <data format="velvet" name="outfile" />
   </outputs>
   <tests>
     <test>
       <param name="hash_length" value="21" />
-      <param name="read_type" value="-shortPaired" />
-      <!-- <repeat name="inputs"> -->
-      <param name="file_format" value="fasta" />
-      <param name="read_type" value="shortPaired reads" />
-      <param name="input" value="velvet_test_reads.fa" ftype="fasta" />
-      <!-- </repeat> -->
+      <repeat name="inputs">
+        <conditional name="input_type">
+          <param name="input_type_selector" value="paireds" />
+          <param name="read_type" value="-shortPaired" />
+          <param name="input1" value="R1.fastq" ftype="fastq" />
+          <param name="input2" value="R2.fastq" ftype="fastq" />
+        </conditional>
+      </repeat>
+      <param name="strand_specific" value="" />
+      <output name="outfile" file="velveth_paireds.out">
+        <extra_files type="file" name='Sequences' value="velveth_paireds/Sequences" compare="diff" />
+        <extra_files type="file" name='Roadmaps' value="velveth_paireds/Roadmaps" compare="diff" />
+      </output>
+    </test>
+    <test>
+      <param name="hash_length" value="21" />
+      <repeat name="inputs">
+        <conditional name="input_type">
+          <param name="input_type_selector" value="single" />
+          <param name="read_type" value="-short" />
+          <param name="input" value="R1.fastq" ftype="fastq" />
+        </conditional>
+      </repeat>
       <param name="strand_specific" value="" />
-      <output name="out_file1" file="velveth_test1/output.html" lines_diff="4">
-        <extra_files type="file" name="Sequences" value="velveth_test1/Sequences" />
-        <extra_files type="file" name="Roadmaps" value="velveth_test1/Roadmaps" />
+      <output name="outfile" file="velveth_single.out">
+        <extra_files type="file" name='Sequences' value="velveth_single/Sequences" compare="diff" />
+        <extra_files type="file" name='Roadmaps' value="velveth_single/Roadmaps" compare="diff" />
+      </output>
+    </test>
+    <test>
+      <param name="hash_length" value="21" />
+      <repeat name="inputs">
+        <conditional name="input_type">
+          <param name="input_type_selector" value="single" />
+          <param name="read_type" value="-short" />
+          <param name="input" value="R1.fastq" ftype="fastq" />
+        </conditional>
+      </repeat>
+      <repeat name="inputs">
+        <param name="file_format" value="fastq" />
+        <conditional name="input_type">
+          <param name="input_type_selector" value="single" />
+          <param name="read_type" value="-short2" />
+          <param name="input" value="R2.fastq" ftype="fastq" />
+        </conditional>
+      </repeat>
+      <param name="strand_specific" value="" />
+      <output name="outfile" file="velveth_single.out">
+        <extra_files type="file" name='Sequences' value="velveth_single2/Sequences" compare="diff" />
+        <extra_files type="file" name='Roadmaps' value="velveth_single2/Roadmaps" compare="diff" />
       </output>
     </test>
   </tests>