diff cdhit_macros.xml @ 3:626cd6334dbc draft

planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/tools/cdhit/ commit ea0424ae045ac797c080aeabab9a8536f7eb2f84-dirty
author bebatut
date Mon, 25 Apr 2016 12:13:50 -0400
parents aa923171e225
children ba7e9a012723
line wrap: on
line diff
--- a/cdhit_macros.xml	Thu Apr 14 09:24:49 2016 -0400
+++ b/cdhit_macros.xml	Mon Apr 25 12:13:50 2016 -0400
@@ -5,170 +5,112 @@
       </requirements>
     </xml>
 
-  <template name="common_cdhit_options">      
-    <!-- start common cdhit  options -->
+  <template name="common_cdhit_options">
+    #if $advanced.settings == 'yes':
 
-    <!-- start adv. settings -->
-    #if $advanced.settings == 'yes':    
       #if str($advanced.band_width) != 'None':
         -b $advanced.band_width
       #end if
+
       #if str($advanced.throw_away_len) != 'None':
         -l $advanced.throw_away_len
       #end if
+
       #if str($advanced.description_len) != 'None':
         -d $advanced.description_len
       #end if
+
       #if str($advanced.cutoff_diff_len) != 'None':
         -s $advanced.cutoff_diff_len
       #end if
+
       #if str($advanced.aa_cutoff_diff_len) != 'None':
         -S $advanced.aa_cutoff_diff_len
       #end if
+
       #if $advanced.align.style == 'local':
         -G 0
         #if str($advance.align.align_coverage_long) != 'None':
           -aL $advance.align.align_coverage_long
         #end if
-        #if str($advance.align.aa_align_coverage_long) != 'None':
-          -AL $advance.align.aa_align_coverage_long
+
+        #if str($advance.align.align_coverage_long_control) != 'None':
+          -AL $advance.align.align_coverage_long_control
         #end if
+
         #if str($advance.aling.align_coverage_short) != 'None':
           -aS $advance.align.align_coverage_short
         #end if
-        #if str($advance.aling.aa_align_coverage_short) != 'None':
-          -AS $advance.align.aa_align_coverage_short
+
+        #if str($advance.aling.align_coverage_short_control) != 'None':
+          -AS $advance.align.align_coverage_short_control
         #end if
+
         #if str($advance.align.align_coverage_min) != 'None':
           -A $advance.align.aling_coverage_min
         #end if
       #end if
     #end if 
-    <!-- end adv. settings -->
+
     #if $print_alignment:
       $print_alignment
     #end if
+
     #if $cluster_type:
       $cluster_type
     #end if
-  </template>
 
-  <template name="runtime_tuning">      
-    #if $runtime.tuning == 'tune':
-      #if $runtime.threads_num:
-        -T $runtime.threads_num
-      #end if
-      #if $runtime.memory_limit:
-        -M $runtime.memory_limit
-      #end if
-      $runtime.in_ram
-    #else
-      \$CDHIT_SITE_OPTIONS
-    #end if
-    <!-- end runtime tuning options -->
+    \$CDHIT_SITE_OPTIONS
+
+    -T \${GALAXY_SLOTS:-1}
   </template>
 
   <macro name="common_cdhit_options">
-
     <conditional name="advanced">
-      <param name="settings" type="select" label="Use adavanced settings">
+      <param name="settings" type="select" label="Use advanced settings?">
         <option value="no" selected="true">No</option>
         <option value="yes">Yes</option>
       </param>
+
       <when value="no"/>
+
       <when value="yes">
-        <param name="band_width" type="integer" value="" optional="true" label="band_width of alignment (default 20)">
-          <validator type="in_range" message="alignment band_width must be greater than 0" min="1"/>
-        </param>
-        <param name="throw_away_len" type="integer" value="" optional="true" label="length of throw_away_sequences (default 10)">
-          <validator type="in_range" message="throw_away_sequences length must be greater than 0" min="1"/>
-        </param>
-        <param name="description_len" type="integer" value="" optional="true" label="length of description in .clstr file (default 20)">
-          <help>if set to 0, it takes the fasta defline and stops at first space</help>
-          <validator type="in_range" message="description length cannot be negative" min="0"/>
-        </param>
-        <param name="cutoff_diff_len" type="float" value="" optional="true" label="length difference cutoff (default 0.0)">
-          <help>if set to 0.9, the shorter sequences need to be at least 90% length of the representative of the cluster</help>
-          <validator type="in_range" message="length difference cutoff must be between 0.0 and 1.0" min="0.0" max="1.0"/>
-        </param>
-        <param name="aa_cutoff_diff_len" type="integer" value="" optional="true" label="length difference cutoff in amino acid (default 999999)">
-          <help>if set to 60, the length difference between the shorter sequences and the representative of the cluster can not be bigger than 60</help>
-          <validator type="in_range" message="length difference cutoff in amino acid  be greater than 0" min="0"/>
-        </param>
+        <param name="band_width" type="integer" value="20" optional="true" label="Alignment band width" min="1" help="(-b)"/>
+
+        <param name="throw_away_len" type="integer" value="10" optional="true" label="Length of throw away sequences" min="1" help="(-l)"/>
+
+        <param name="description_len" type="integer" value="20" optional="true" label="Length of the description" min="0" help="If set to 0, it takes the fasta defline and stops at first space (-d)"/>
+
+        <param name="cutoff_diff_len" type="float" value="0.0" optional="true" label="Length difference cutoff" min="0.0" max="1.0" help="If set to 0.9, the shorter sequences need to be at least 90% length of the representative of the cluster (-s)"/>
+
+        <param name="aa_cutoff_diff_len" type="integer" value="999999" optional="true" label="Length difference cutoff in amino acid" min="0" help="If set to 60, the length difference between the shorter sequences and the representative of the cluster can not be bigger than 60 (-S)"/>
+
         <conditional name="align">
-          <param name="style" type="select" label="global or local alignments">
-            <help>local sequence identity, calculated as : number of identical amino acids in alignment divided by the length of the alignment
-                  You must set alignment coverage by length or fraction.
-            </help>
+          <param name="style" type="select" label="global or local alignments" help="Local sequence identity, calculated as : number of identical amino acids in alignment divided by the length of the alignment. You must set alignment coverage by length or fraction.">
             <option value="global" selected="true">Global</option>
             <option value="local" >Local</option>
           </param>
+
           <when value="global"/>
+
           <when value="local">
-    
-	    <param name="align_coverage_long" type="float" value="" optional="true" label="alignment coverage for the longer sequence (default 0.0)">
-              <help>if set to 0.9, the alignment must covers 90% of the sequence</help>
-	      <validator type="in_range" message="input must be between 0.0 and 1.0." min="0.0" max="1.0" />
-	    </param>
-	    <param name="aa_align_coverage_long" type="integer" value="" optional="true" label="alignment coverage control for the longer sequence (default 99999999)" >
-              <help>if set to 60, and the length of the sequence is 400,then the alignment must be at least 340 (400-60) residues</help>
-	      <validator type="in_range" message="input cannot be negative." min="0" />
-	    </param>
-	    <param name="align_coverage_short" type="float" value="" optional="true" label="alignment coverage for the shorter sequence (default 0.0)" >
-              <help>if set to 0.9, the alignment must covers 90% of the sequence</help>
-	      <validator type="in_range" message="input must be between 0.0 and 1.0." min="0.0" max="1.0" />
-	    </param>
-	    <param name="aa_align_coverage_short" type="integer" value="" optional="true" label="alignment coverage control for the shorter sequence (default 99999999)" >
-              <help>if set to 60, and the length of the sequence is 400, then the alignment must be at least 340 (400-60) residues</help>
-	      <validator type="in_range" message="input cannot be negative." min="0" />
-	    </param>
-	    <param name="align_coverage_min" type="integer" value="" optional="true" label="minimal alignment coverage control for the both sequences (default 0)" >
-              <help>alignment must cover at least this value for both sequences</help>
-	      <validator type="in_range" message="coverage must be at least 0." min="0"/>
-	    </param>
+	             <param name="align_coverage_long" type="float" value="0.0" optional="true" label="Alignment coverage for the longer sequence" min="0.0" max="1.0" help="If set to 0.9, the alignment must covers 90% of the sequence (-aL)"/>
+	
+	             <param name="align_coverage_long_control" type="integer" value="99999999" optional="true" label="Alignment coverage control for the longer sequence " min="0" help="If set to 60, and the sequence's length 400,then the alignment must be at least 340 (400-60) residues (-AL)"/>
+	    
+	             <param name="align_coverage_short" type="float" value="0.0" optional="true" label="Alignment coverage for the shorter sequence" min="0.0" max="1.0" help="As for the longer (-aS)"/>
+	    
+	             <param name="align_coverage_short_control" type="integer" value="99999999" optional="true" label="Alignment coverage control for the shorter sequence" min="0" help="As for the longer (-AS)"/>
+	    
+	             <param name="align_coverage_min" type="integer" value="0" optional="true" label="Minimal alignment coverage control for the both sequences" min="0" help="Alignment must cover at least this value for both sequences (-A)"/>
           </when>
         </conditional>
-
       </when>
     </conditional>
 
     <param name="print_alignment" type="boolean" truevalue="-p 1" falsevalue="" checked="false" label="Print alignment overlap in .clstr file"/>
 
-    <param name="cluster_type" type="boolean" truevalue="-g 1" falsevalue="" checked="false" label="Slow Cluster" 
-           help="by cd-hit's default algorithm, a sequence is clustered to the first 
-        cluster that meet the threshold (fast cluster). If set the program
-        will cluster it into the most similar cluster that meet the threshold
-        (accurate but slow mode). This won't change the representatives of final clusters"/>
-
+    <param name="cluster_type" type="boolean" truevalue="-g 1" falsevalue="" checked="false" label="Slow Cluster" help="In cd-hit's default algorithm, a sequence is clustered to the first cluster that meet the threshold (fast cluster). If set to slow, the program will cluster it into the most similar cluster that meet the threshold (accurate but slow mode). This won't change the representatives of final clusters (-g)"/>
   </macro>
 
-  <macro name="runtime_tuning">
-    <conditional name="runtime">
-      <param name="tuning" type="select" label="Runtime Memory and Threads">
-        <option value="default" selected="true">Use Default settings</option>
-        <option value="tune" >Set Runtime options</option>
-      </param>
-      <when value="default"/>
-      <when value="tune">
-        <param name="threads_num" type="integer" value="1" optional="true" label="number of threads; with 0, all CPUs will be used. (default 1)" >
-          <validator type="in_range" message="input cannot be negative." min="0" />
-        </param>
-        <param name="memory_limit" type="integer" value="800" optional="true" label="memory limit (in MB) for the program; 0 for unlimitted. (default 800)" >
-          <validator type="in_range" message="input cannot be negative." min="0" />
-        </param>
-        <param name="in_ram" type="boolean" truevalue="-B 1" falsevalue="" checked="false" label="Too big for in Memory calculation" 
-               help="Use for huge databases"/>
-      </when>
-    </conditional>
-  </macro>
-
-  <token name="@CITATION_SECTION@">------
-
-**Citation**
-
-For the underlying tool, please cite `DePristo MA, Banks E, Poplin R, Garimella KV, Maguire JR, Hartl C, Philippakis AA, del Angel G, Rivas MA, Hanna M, McKenna A, Fennell TJ, Kernytsky AM, Sivachenko AY, Cibulskis K, Gabriel SB, Altshuler D, Daly MJ. A framework for variation discovery and genotyping using next-generation DNA sequencing data. Nat Genet. 2011 May;43(5):491-8. &lt;http://www.ncbi.nlm.nih.gov/pubmed/21478889&gt;`_
-
-If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
-
-  </token>
 </macros>