view presto_buildconsensus.xml @ 0:7c7df98db5a9 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:37:30 -0400
parents
children 379f74eae0ab
line wrap: on
line source

<tool id="presto_buildconsensus" name="pRESTO BuildConsensus" version="@PRESTO_VERSION@">
    <description>Builds a consensus sequence for each set of input sequences</description>
    
    <macros>
        <import>presto_macros.xml</import>
    </macros>
    
    <expand macro="requirements"/>
    
    <version_command>BuildConsensus.py --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
        ln -s '$fastq_in' in.fastq &&
        BuildConsensus.py
          --nproc "\${GALAXY_SLOTS:-1}"
          -s in.fastq
          -n '$n'
          --bf '$bf'
          -q '$q'
          --freq '$freq'
          #if $maxgap
            --maxgap '$maxgap'
          #end if
          #if $pf
            --pf '$pf'
          #end if
          #if $prcons
            --prcons '$prcons'
          #end if
          #if $cf
            --cf $cf
          #end if
          #if $act
            --act $act
          #end if
          $dep
          
          #if $filtering.filter == "diversity"
            --maxdiv '$filtering.maxdiv'
          #end if
          #if $filtering.filter == "error"
            --maxerror '$filtering.maxerror'
          #end if

          --outname=tmp 
          #if $capture_log
            --log '$log_out'
          #end if
    ]]></command>

    <inputs>
        <param argument="-s" name="fastq_in" type="data" format="fastq" label="Input FASTQ file" help="FASTQ file of sequences with barcodes/UMIs in an annotation."/>
        <param argument="-n" type="integer" value="1" label="Min Count" help="Minimum number of squences to form a valid consensus."/>
        <param argument="--bf" type="text" value="BARCODE" label="Barcode Field" help="Name of the annotation field which contains the barcode/UMI sequence."/>
        <param argument="-q" type="integer" value="0" label="Min Quality" help="Minimum quality under which an ambiguous character is assigned to a consensus base."/>
        <param argument="--freq" type="float" value="0.6" label="Min Frequency" help="At a given position the fraction of basecalls required to agree to output an unambiguous base."/>
        <param argument="--maxgap" type="float" value="" optional="true" label="Max Gap Fraction" help="Positions with greater than this fraction of gaps are deleted from the consensus."/>
        <param argument="--pf" type="text" value="" optional="true" label="Primer Field" help="Name of the annotation field which contains the primer sequence (often PRIMER)."/>
        <param argument="--prcons" type="float" value="" optional="true" label="Primer Consensus Frequency" help="Specify to define a minimum primer frequency required to assign a consensus primer, and filter out sequences with minority primers from the consensus building step."/>
        <param argument="--cf" type="text" value="" optional="true" label="Copy Fields"  help="Zero or more space-separated annotations to copy from input sequences to consensus sequences.">
            <expand macro="text-regex-validator"/>
        </param>
        <param argument="--act" type="text" value="" optional="true" label="Copy Actions" help="Space-separated list of actions to take on copied annotations. Must be of same length as Copy Fields. Options are: min,max,sum,set,majority.">
            <expand macro="text-regex-validator"/>
        </param>
        <param argument="--dep" type="boolean" value="false" truevalue="--dep" falsevalue="" label="Dependent Model" help="Specify to calculate consensus quality with a non-independence assumption."/>
        <expand macro="presto-log-param"/>

        <conditional name="filtering">
            <param name="filter" type="select" label="Filtering Strategy">
                <option value="none">No filtering of consensus reads.</option>
                <option value="diversity">Filter by diversity (average pairwise error rate of input reads).</option>
                <option value="error">Filters by error rate of input reads vs. consensus.</option>
            </param>
            <when value="diversity">
                <param argument="--maxdiv" type="float" value="" label="Max Diversity" help="Remove consensus reads with average pairwise error between input reads above this cutoff [0-1]."/>
            </when>
            <when value="error">
                <param argument="--maxerror" type="float" value="" label="Max Error" help="Remove consensus reads with average error vs. input reads above this cutoff [0-1]."/>
            </when>
            <when value="none"/>
        </conditional>
    </inputs>

    <outputs>
        <data name="fastq_out" format="fastq" from_work_dir="tmp_consensus-pass.fastq"/>
        <expand macro="presto-log-output"/>
    </outputs>
    
    <tests>
        <test>
            <param name="fastq_in" value="presto_buildconsensus_test_input.fastq"/>
            <param name="n" value="2"/>
            <param name="pf" value="PRIMER"/>
            <param name="maxgap" value="0.5"/>
            <param name="prcons" value="0.6"/>
            <param name="filter" value="error"/>
            <param name="maxerror" value="0.1"/>
            <output name="fastq_out" file="presto_buildconsensus_test_maxerror_output.fastq" sort="true"/>
        </test>
        <test>
            <param name="fastq_in" value="presto_buildconsensus_test_input.fastq"/>
            <param name="n" value="2"/>
            <param name="pf" value="PRIMER"/>
            <param name="maxgap" value="0.5"/>
            <param name="prcons" value="0.6"/>
            <param name="filter" value="diversity"/>
            <param name="maxdiv" value="0.05"/>
            <output name="fastq_out" file="presto_buildconsensus_test_maxdiv_output.fastq" sort="true"/>
        </test>
    </tests>
    
    <help><![CDATA[
Builds a consensus sequence for each set of input sequences.

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

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