diff rgClustalw.xml @ 4:d9c2b2fde6a3 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/clustalw commit fdbbc72ea8880e53b09ca3e60bafa544d5088dbc
author devteam
date Thu, 15 Sep 2022 12:12:51 +0000
parents d6694932c5e0
children 83e828f8ba26
line wrap: on
line diff
--- a/rgClustalw.xml	Mon May 22 21:02:45 2017 -0400
+++ b/rgClustalw.xml	Thu Sep 15 12:12:51 2022 +0000
@@ -1,11 +1,12 @@
-<tool id="clustalw" name="ClustalW" version="2.1">
+<tool id="clustalw" name="ClustalW" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
     <description>multiple sequence alignment program for DNA or proteins</description>
-    <requirements>
-        <requirement type="package" version="2.1">clustalw</requirement>
-    </requirements>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
     <command detect_errors="exit_code"><![CDATA[
 ln -s '$input' input.fasta &&
-clustalw2 -INFILE=input.fasta -OUTFILE='$output' -OUTORDER=$out_order -TYPE=$dnarna
+clustalw2 -INFILE=input.fasta -OUTFILE='$output' -OUTORDER=$out_order -TYPE=$type_conditional.dnarna
 #if $outcontrol.outform == "clustal"
     -OUTPUT=CLUSTAL
     #if $outcontrol.out_seqnos == "ON"
@@ -21,13 +22,62 @@
 #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" />
-        <param name="dnarna" type="select" label="Data type">
-            <option value="DNA" selected="True">DNA nucleotide sequences</option>
-            <option value="PROTEIN">Protein sequences</option>
-        </param>
+        <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>
@@ -69,18 +119,92 @@
         <test>
             <param name="input" value="rgClustal_testin.fasta" />
             <param name="outform" value="fasta" />
-            <param name="dnarna" value="DNA" />
+            <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_ using the default options.
-
+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
@@ -92,11 +216,13 @@
 
 ----
 
+.. 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.
+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_.