view sorting.xml @ 1:8c4e2933a17a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vsearch commit 95732e013ec4dfe5dae0b9ed81e9d7710cbaed9d
author iuc
date Wed, 26 Aug 2015 13:34:22 -0400
parents fae6527990af
children f29e21388219
line wrap: on
line source

<tool id="vsearch_sorting" name="VSearch sorting" version="@VERSION@.1">
    <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 $relabel:
            --relabel "$relabel"
        #end if
        $sizeout
        #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="relabel" type="text" value="" 
               label="Relabel with this prefix string after sorting" help="(--relabel)"/>
        <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>
        <test>
            <param name="sorting_mode_select" value="sortbylength"/>
            <param name="infile" value="db.fasta" ftype="fasta" />
            <param name="relabel" value="TEST" />
            <output name="outfile" file="sorting_result3.fasta" ftype="fasta" />
        </test>
        <test>
            <param name="sorting_mode_select" value="sortbylength"/>
            <param name="infile" value="db.fasta" ftype="fasta" />
            <param name="sizeout" value="--sizeout" />
            <output name="outfile" file="sorting_result4.fasta" ftype="fasta" />
        </test>
        <test>
            <param name="sorting_mode_select" value="sortbylength"/>
            <param name="infile" value="db.fasta" ftype="fasta" />
            <param name="relabel" value="With spaces" />
            <output name="outfile" file="sorting_result5.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>