view presto_filterseq.xml @ 0:7b102129b1e8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/presto commit 5d4da3eb59439ce5b1eea211b4ad1d47807d7acb
author iuc
date Wed, 30 May 2018 15:36:41 -0400
parents
children 85d929281435
line wrap: on
line source

<tool id="presto_filterseq" name="pRESTO FilterSeq" version="@PRESTO_VERSION@">
    <description>Filters and/or masks reads based on length, quality, missing bases and repeats.</description>
    
    <macros>
        <import>presto_macros.xml</import>
    </macros>
    
    <expand macro="requirements"/>
    
    <version_command>FilterSeq.py --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
        ln -s '$fastq_in' in.fastq &&
        FilterSeq.py '$cc.command'
          --nproc "\${GALAXY_SLOTS:-1}"
          -s in.fastq
          #if $varExists('cc.q')
            -q '$cc.q'
          #end if
          #if $getVar('cc.inner', False)
            --inner
          #end if
          #if $varExists('cc.win')
            --win '$cc.win'
          #end if
          #if $getVar('cc.reverse', False)
            --reverse
          #end if
          #if $varExists('cc.n')
            -n '$cc.n'
          #end if
          --outdir=.
          --outname=tmp_filter_seq 
          #if $capture_log
            --log '$log_out'
          #end if
          &&
        mv ./tmp_filter_seq_${cc.command}-pass.fastq $fastq_out
    ]]></command>
    <inputs>
        <param argument="-s" name="fastq_in" type="data" format="fastq" label="Input FASTQ file"/>
        <conditional name="cc">
            <param name="command" type="select" label="Command">
                <option value="length">Filters reads by length (length)</option>
                <option value="missing">Filters reads by N or gap character count (missing)</option>
                <option value="repeats">Filters reads by consecutive nucleotide repeats (repeats)</option>
                <option value="quality">Filters reads by quality score (quality)</option>
                <option value="maskqual">Masks low quality positions (maskqual)</option>
                <option value="trimqual">Trims sequences by quality score decay (trimqual)</option>
            </param>
            <when value="length">
                <param argument="-n" type="integer" value="" label="Minimum Length" help="Discard reads shorter than this number of bases long."/>
            </when>
            <when value="missing">
                <param argument="-n" type="integer" value="" label="Max Missing" help="Dicard reads with more than this many no-calls or gaps."/>
            </when>
            <when value="repeats">
                <param argument="-n" type="integer" value="" label="Max Repeat Length" help="Discard reads with simple repeats of this length of longer."/>
            </when>
            <when value="quality">
                <param argument="-q"  type="integer" value="20" label="Minimum Quality" help="Discard reads with mean quality below this value."/>
                <param argument="--inner" type="boolean" value="false" label="End-Trim Ns" help="Exclude Ns at the ends of the reads from calculation."/>
            </when>
            <when value="maskqual">
                <param argument="-q" type="integer" value="20" label="Minimum Quality" help="Discard reads with mean quality below this value."/>
            </when>
            <when value="trimqual">
                <param argument="-q" type="integer" value="20" label="Minimum Quality" help="Discard reads with mean quality below this value."/>
                <param argument="--win" type="integer" value="10" label="Window Size" help="Window size for moving average quality calculation."/>
                <param argument="--reverse" type="boolean" value="false" label="Reverse" help="If true trim the start of the reads instead of the ends."/>
            </when>
        </conditional>
        <expand macro="presto-log-param"/>
    </inputs>

    <outputs>
        <data name="fastq_out" format="fastq"/>
        <expand macro="presto-log-output"/>
    </outputs>
    
    <tests>
        <test>
            <param  name="command" value="length"/>
            <param  name="n" value="299"/>
            <param  name="fastq_in" value="presto_filterseq_test_in.fastq"/>
            <output name="fastq_out" file="presto_filterseq_length_test_out.fastq" sort="true"/>
        </test>
        <test>
            <param  name="command" value="missing"/>
            <param  name="n" value="281"/>
            <param  name="fastq_in" value="presto_filterseq_test_in.fastq"/>
            <output name="fastq_out" file="presto_filterseq_missing_test_out.fastq" sort="true"/>
        </test>
        <test>
            <param  name="command" value="repeats"/>
            <param  name="n" value="8"/>
            <param  name="fastq_in" value="presto_filterseq_test_in.fastq"/>
            <output name="fastq_out" file="presto_filterseq_repeats_test_out.fastq" sort="true"/>
        </test>
        <test>
            <param  name="command" value="quality"/>
            <param  name="q" value="30"/>
            <param  name="fastq_in" value="presto_filterseq_test_in.fastq"/>
            <output name="fastq_out" file="presto_filterseq_quality_test_out.fastq" sort="true"/>
        </test>
        <test>
            <param  name="command" value="maskqual"/>
            <param  name="q" value="30"/>
            <param  name="fastq_in" value="presto_filterseq_test_in.fastq"/>
            <output name="fastq_out" file="presto_filterseq_maskqual_test_out.fastq" sort="true"/>
        </test>
        <test>
            <param  name="command" value="trimqual"/>
            <param  name="q" value="30"/>
            <param  name="fastq_in" value="presto_filterseq_test_in.fastq"/>
            <output name="fastq_out" file="presto_filterseq_trimqual_test_out.fastq" sort="true"/>
        </test>
    </tests>
    
    <help><![CDATA[
Filters and/or masks reads based on length, quality, missing bases and repeats.

See the `pRESTO online help <@PRESTO_URL_BASE@/FilterSeq.html>`_ for more information.

@HELP_NOTE@
    ]]></help>
    <expand macro="citations" />
</tool>