view rgClustalw.xml @ 7:5b097fde95dd draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/clustalw commit 4048394d36408ccfeca401a84c4909a6c023e30e
author iuc
date Thu, 02 Nov 2023 10:44:37 +0000
parents 83e828f8ba26
children
line wrap: on
line source

<tool id="clustalw" name="ClustalW" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
    <description>multiple sequence alignment program for DNA or proteins</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="biotools" />
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
ln -s '$input' input.fasta &&
clustalw2 -INFILE=input.fasta -OUTFILE='$output' -OUTORDER=$out_order -TYPE=$type_conditional.dnarna
#if $outcontrol.outform == "clustal"
    -OUTPUT=CLUSTAL
    #if $outcontrol.out_seqnos == "ON"
        -SEQNOS=ON
    #end if
#end if
#if $outcontrol.outform == "phylip"
    -OUTPUT=PHYLIP
#end if
#if $outcontrol.outform == "fasta"
    -OUTPUT=FASTA
#end if
#if $range.mode == "part"
    -RANGE=${range.seq_range_start},${range.seq_range_end}
#end if
#if $type_conditional.dnarna == 'PROTEIN'
    #if $type_conditional.algorithm_conditional.selector == ''
        -PWMATRIX=$type_conditional.algorithm_conditional.slow_pairwise_alignments.PWMATRIX
        @SLOW_PAIRWISE_ALIGNMENTS@
    #else
        @FAST_PAIRWISE_ALIGNMENTS@
    #end if
    -MATRIX=$type_conditional.multiple_alignments.MATRIX
    @MULTIPLE_ALIGNMENTS@
#else
    #if $type_conditional.algorithm_conditional.selector == ''
        -PWDNAMATRIX=$type_conditional.algorithm_conditional.slow_pairwise_alignments.PWDNAMATRIX
        @SLOW_PAIRWISE_ALIGNMENTS@
    #else
        @FAST_PAIRWISE_ALIGNMENTS@
    #end if
    -DNAMATRIX=$type_conditional.multiple_alignments.DNAMATRIX
    @MULTIPLE_ALIGNMENTS@
#end if
-OUTPUTTREE=$tree_calculation.OUTPUTTREE
$tree_calculation.KIMURA
$tree_calculation.TOSSGAPS
    ]]></command>
    <inputs>
        <param name="input" type="data" format="fasta" label="FASTA file" />
        <conditional name="type_conditional">
            <param name="dnarna" type="select" label="Data type">
                <option value="DNA" selected="True">DNA nucleotide sequences</option>
                <option value="PROTEIN">Protein sequences</option>
            </param>
            <when value="DNA">
                <expand macro="macro_options" algorithm="PWDNAMATRIX" multiple="DNAMATRIX" label="DNA" default="IUB">
                    <option value="IUB" selected="true">IUB</option>
                    <option value="CLUSTALW">CLUSTALW</option>
                </expand>
            </when>
            <when value="PROTEIN">
                <expand macro="macro_options" algorithm="PWMATRIX" multiple="MATRIX" label="Protein" default="GONNET">
                    <option value="BLOSUM">BLOSUM</option>
                    <option value="PAM">PAM</option>
                    <option value="GONNET" selected="true">GONNET</option>
                    <option value="ID">ID</option>
                </expand>
            </when>
        </conditional>
        <section name="tree_calculation" title="Tree calculation/BOOTSTRAP options">
            <param argument="-OUTPUTTREE" type="select" label="Output tree/distance forma" help="Specify the output format. Default: phylip">
                <option value="PHYLIP">PHYLIP</option>
                <option value="DIST">DIST</option>
                <option value="NJ">NJ</option>
                <option value="NEXUS">NEXUS</option>
            </param>
            <param argument="-KIMURA" type="boolean" truevalue="-KIMURA" falsevalue="" checked="false" label="Use Kimura correction" 
                help="For small divergence (say inferior 10%) this option makes no difference. For greater divergence, this option corrects for the fact that observed distances underestimate actual evolutionary distances." />
            <param argument="-TOSSGAPS" type="boolean" truevalue="-TOSSGAPS" falsevalue="" checked="false" label="Ignore positions with gaps" help="Default: No" />
        </section>
        <conditional name="outcontrol">
            <param name="outform" type="select" label="Output alignment format">
                <option value="clustal" selected="True">Native Clustal output format</option>
                <option value="phylip">PHYLIP format</option>
                <option value="fasta">FASTA format</option>
            </param>
            <when value="fasta" />
            <when value="phylip" />
            <when value="clustal">
                <param name="out_seqnos" type="boolean" truevalue="ON" falsevalue="OFF" label="Show residue numbers in clustal format output" />
            </when>
        </conditional>
        <param name="out_order" type="select" label="Output order">
            <option value="ALIGNED">Aligned</option>
            <option value="INPUT">Same order as input file</option>
        </param>
        <conditional name="range">
            <param name="mode" type="select" label="Output complete alignment (or specify part to output)">
                <option value="complete">Complete alignment</option>
                <option value="part">Only part of the alignment</option>
            </param>
            <when value="complete" />
            <when value="part">
                <param name="seq_range_start" type="integer" value="1" label="Start point" help="Sequence range to write" />
                <param name="seq_range_end" type="integer" value="99999" label="End point" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="output" format="clustal" label="${tool.name} on ${on_string}: ${outcontrol.outform}">
            <change_format>
                <when input="outcontrol.outform" value="phylip" format="phylip" />
                <when input="outcontrol.outform" value="fasta" format="fasta" />
            </change_format>
        </data>
        <data name="dnd" format="nhx" label="${tool.name} on ${on_string}: dnd" from_work_dir="input.dnd" />
    </outputs>
    <tests>
        <test>
            <param name="input" value="rgClustal_testin.fasta" />
            <param name="outform" value="fasta" />
            <conditional name="type_conditional">
                <param name="dnarna" value="DNA"/>
            </conditional>
            <param name="mode" value="complete" />
            <param name="out_order" value="ALIGNED" />
            <output name="output" file="rgClustal_testout.fasta" ftype="fasta" />
            <output name="dnd" file="rgClustal_testin.dnd" ftype="nhx" />
        </test>
        <!-- Test DNA options-->
        <test expect_num_outputs="2">
            <param name="input" value="rgClustal_testin.fasta"/>
            <param name="out_order" value="ALIGNED"/>
            <section name="tree_calculation">
                <param name="OUTPUTTREE" value="PHYLIP"/>
                <param name="KIMURA" value="true"/>
                <param name="TOSSGAPS" value="true"/>
            </section>
            <conditional name="type_conditional">
                <param name="dnarna" value="DNA"/>
                <section name="multiple_alignments">
                    <param name="DNAMATRIX" value="IUB"/>
                    <param name="GAPOPEN" value="2"/>
                    <param name="GAPEXT" value="1"/>
                    <param name="ENDGAPS" value="true"/>
                    <param name="GAPDIST" value="1"/>
                    <param name="NOPGAP" value="true"/>
                    <param name="NOHGAP" value="true"/>
                    <param name="MAXDIV" value="1"/>
                    <param name="NEGATIVE" value="true"/>
                    <param name="TRANSWEIGHT" value="1"/>
                </section>
                <conditional name="algorithm_conditional">
                    <param name="selector" value=""/>
                    <section name="slow_pairwise_alignments">
                        <param name="PWGAPOPEN" value="2"/>
                        <param name="PWGAPEXT" value="1"/>
                    </section>
                </conditional>
            </conditional>
            <output name="output" file="rgClustal_testout02.aln" ftype="clustal"/>
            <output name="dnd" file="rgClustal_testout02.dnd" ftype="nhx"/>
        </test>
        <!-- Test protein options and fast algorithm-->
        <test expect_num_outputs="2">
            <param name="input" value="rgClustal_testin_prot.fasta"/>
            <param name="out_order" value="ALIGNED"/>
            <section name="tree_calculation">
                <param name="OUTPUTTREE" value="PHYLIP"/>
                <param name="KIMURA" value="false"/>
                <param name="TOSSGAPS" value="false"/>
            </section>
            <conditional name="type_conditional">
                <param name="dnarna" value="PROTEIN"/>
                <section name="multiple_alignments">
                    <param name="MATRIX" value="BLOSUM"/>
                    <param name="GAPOPEN" value="3"/>
                    <param name="GAPEXT" value="1"/>
                    <param name="ENDGAPS" value="true"/>
                    <param name="GAPDIST" value="2"/>
                    <param name="NOPGAP" value="true"/>
                    <param name="NOHGAP" value="true"/>
                    <param name="MAXDIV" value="1"/>
                    <param name="NEGATIVE" value="true"/>
                    <param name="TRANSWEIGHT" value="1"/>
                </section>
                <conditional name="algorithm_conditional">
                    <param name="selector" value="-QUICKTREE"/>
                    <section name="fast_pairwise_alignments">
                        <param name="KTUPLE" value="1"/>
                        <param name="TOPDIAGS" value="1"/>
                        <param name="WINDOW" value="2"/>
                        <param name="PAIRGAP" value="2"/>
                        <param name="SCORE" value="PERCENT"/>
                    </section>
                </conditional>
            </conditional>
            <output name="output" file="rgClustal_testout03.aln" ftype="clustal"/>
            <output name="dnd" file="rgClustal_testout03.dnd" ftype="nhx"/>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**Note**

This tool allows you to run a multiple sequence alignment with ClustalW_.
You can align DNA or protein sequences in the input file which should be multiple sequences to be aligned in a FASTA file.

The alignments will appear as a clustal format file or optionally, as PHYLIP or FASTA format files in your history. If you choose FASTA as
the output format, you can create a 'Logo' image using the Sequence Logo tool.

If Clustal format is chosen, you have the option of adding basepair counts to the output.

A subsequence of the alignment can be output by setting the Output complete parameter to "Partial" and defining the offset and end of the subsequence to be output.

----

.. class:: infomark

**Attribution**

The first iteration of this Galaxy wrapper was written by Hans-Rudolf Hotz.

It was modified by Ross Lazarus for the rgenetics project - tests and some additional parameters were added. Cristóbal Gallardo included the remaining parameters.

This wrapper is released licensed under the LGPL_.

.. _ClustalW: http://www.clustal.org/clustal2/

.. _LGPL: https://www.gnu.org/copyleft/lesser.html
    ]]></help>
    <citations>
        <citation type="doi">10.1093/bioinformatics/btm404</citation>
    </citations>
</tool>