diff sorting.xml @ 0:fae6527990af draft

Imported from capsule None
author iuc
date Thu, 21 May 2015 03:58:09 -0400
parents
children 8c4e2933a17a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sorting.xml	Thu May 21 03:58:09 2015 -0400
@@ -0,0 +1,102 @@
+<tool id="vsearch_sorting" name="VSearch sorting" version="@VERSION@.0">
+    <description></description>
+    <macros>
+        <import>vsearch_macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command>
+<![CDATA[
+    vsearch
+        @GENERAL@
+        #if $sorting_mode.sorting_mode_select == 'sortbylength':
+            --sortbylength "$sorting_mode.infile"
+        #else:
+            --sortbysize "$sorting_mode.infile"
+            #if $sorting_mode.minsize:
+                --minsize $sorting_mode.minsize
+            #end if
+            #if $sorting_mode.maxsize:
+                --maxsize $sorting_mode.maxsize
+            #end if
+        #end if
+        --output $outfile
+        #if $sizeout:
+            --sizeout $sizeout
+        #end if
+        #if $topn:
+            --topn $topn
+        #end if
+
+]]>
+    </command>
+    <inputs>
+        <conditional name="sorting_mode">
+            <param name="sorting_mode_select" type="select" label="Sorting by" help="">
+                <option value="sortbylength">sequence length</option>
+                <option value="sortbyabundance">by abundance</option>
+            </param>
+            <when value="sortbylength">
+                <param name="infile" type="data" format="fasta" label="Select your FASTA file" help="(--sortbylength)" />
+            </when>
+            <when value="sortbyabundance">
+                <param name="infile" type="data" format="fasta" label="Select your FASTA file" help="(--sortbysize)" />
+                <param name="minsize" type="integer" value="" optional="True" label="Minimum abundance"
+                    help="(--minsize)"/>
+                <param name="maxsize" type="integer" value="" optional="True" label="Maximum abundance"
+                    help="(--maxsize)"/>
+          </when>
+        </conditional>
+        <expand macro="topn" />
+        <param name="sizeout" type="boolean" truevalue="--sizeout" falsevalue="" checked="False" 
+            label="Add abundance annotation to output" help="(--sizeout)"/>
+    </inputs>
+    <outputs>
+        <data name="outfile" format="fasta" label="${tool.name} on ${on_string}" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="sorting_mode_select" value="sortbyabundance"/>
+            <param name="infile" value="db.fasta" ftype="fasta" />
+            <output name="outfile" file="sorting_result1.fasta" ftype="fasta" />
+        </test>
+        <test>
+            <param name="sorting_mode_select" value="sortbylength"/>
+            <param name="infile" value="db.fasta" ftype="fasta" />
+            <output name="outfile" file="sorting_result2.fasta" ftype="fasta" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+Fasta entries are sorted by decreasing abundance (−−sortbysize) or sequence length (−−sort-
+bylength). To obtain a stable sorting order, ties are sorted by decreasing abundance and label
+increasing alpha-numerical order (−−sortbylength), or just by label increasing alpha-numerical
+order (−−sortbysize). Label sorting assumes that all sequences have unique labels. The same
+applies to the automatic sorting performed during chimera checking (−−uchime_denovo), derepli-
+cation (−−derep_fulllength), and clustering (−−cluster_fast and −−cluster_size).
+
+Sorting options
+  --maxsize INT               maximum abundance for sortbysize
+  --minsize INT               minimum abundance for sortbysize
+  --output FILENAME           output FASTA file
+  --relabel STRING            relabel with this prefix string after sorting
+  --sizeout                   add abundance annotation to output
+  --sortbylength FILENAME     sort sequences by length in given FASTA file
+  --sortbysize FILENAME       abundance sort sequences in given FASTA file
+  --topn INT                  output just top n seqs after sorting
+
+
+@EXTERNAL_DOCUMENTATION@
+
+-------
+
+@REFERENCES@
+
+
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>