view presto_filterseq.xml @ 3:196b83ac37f2 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/presto commit d52e3c9c53dd358e14e65a3a083e7d5c102f8697"
author iuc
date Sat, 25 Sep 2021 18:30:46 +0000
parents 33a09d40751f
children
line wrap: on
line source

<tool id="presto_filterseq" name="pRESTO FilterSeq" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>Filters and/or masks reads based on length, quality, missing bases and repeats.</description>
    <expand macro="bio_tools"/>
    <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_BASE_URL@/en/stable>`_ for more information.

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