changeset 99:de42cdf6e10b draft

Uploaded
author greg
date Mon, 27 Mar 2017 09:57:54 -0400
parents 56dbe45f4bfb
children 283f6666daf7
files macros.xml phylogenomics_analysis.xml
diffstat 2 files changed, 102 insertions(+), 64 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Thu Mar 23 15:01:27 2017 -0400
+++ b/macros.xml	Mon Mar 27 09:57:54 2017 -0400
@@ -13,7 +13,7 @@
             <regex match="Exception:"/>
         </stdio>
     </xml>
-    <token name="@REMOVE_GAPPY_SEQUENCES_COND@">
+    <token name="@REMOVE_GAPPY_SEQUENCES_COND_PREP@">
         #set remove_gappy_sequences_cond = $options_type_cond.remove_gappy_sequences_cond
         #set remove_gappy_sequences = $remove_gappy_sequences_cond.remove_gappy_sequences
         #if str($remove_gappy_sequences) == 'no':
@@ -53,18 +53,57 @@
                     #set multiple_sequence_alignments_option = $multiple_sequence_alignments_option_cond.multiple_sequence_alignments_option
                     #if str($multiple_sequence_alignments_option) == 'pasta_alignments':
                         #set pasta_iter_limit = $multiple_sequence_alignments_option_cond.pasta_iter_limit
-                    #else if str($multiple_sequence_alignments_option) == 'iterative_realignments':
-                        #set iterative_realignments = $multiple_sequence_alignments_option_cond.iterative_realignments
+                    #else if str($multiple_sequence_alignments_option) == 'iterative_realignment':
+                        #set iterative_realignment = $multiple_sequence_alignments_option_cond.iterative_realignment
                     #end if
                 #end if
             #end if
         #end if
     </token>
-    <token name="@SET_PHYLOGENETIC_TREES@">
+    <token name="@REMOVE_GAPPY_SEQUENCES_COND_CMD@">
+        #if str($remove_gappy_sequences) == 'no':
+            #if str($multiple_sequence_alignments) == 'yes':
+                --alignments_method $multiple_sequence_alignments_option
+                #if str($multiple_sequence_alignments_option) == 'pasta_alignments':
+                    --pasta_script_path '$__tool_directory__/run_pasta.py'
+                    --pasta_iter_limit $pasta_iter_limit
+                #end if
+            #end if
+        #else:
+            ## str($remove_gappy_sequences) == 'yes':
+            --trim_type $trim_type
+            #if str($trim_type) == 'gap_trimming':
+                --gap_trimming $gap_trimming
+            #end if
+            #if str($remove_sequences_with_gaps) == 'no':
+                #if str($multiple_sequence_alignments) == 'yes':
+                    --alignments_method $multiple_sequence_alignments_option
+                    #if str($multiple_sequence_alignments_option) == 'pasta_alignments':
+                        --pasta_script_path '$__tool_directory__/run_pasta.py'
+                        --pasta_iter_limit $pasta_iter_limit
+                    #end if
+                #end if
+            #else:
+                ## str($remove_sequences_with_gaps) == 'yes':
+                --remove_sequences $remove_sequences_with_gaps_of
+                #if str($multiple_sequence_alignments) == 'yes':
+                    --alignments_method $multiple_sequence_alignments_option
+                    #if str($multiple_sequence_alignments_option) == 'pasta_alignments':
+                    #if str($multiple_sequence_alignments_option) == 'pasta_alignments':
+                        --pasta_script_path '$__tool_directory__/run_pasta.py'
+                        --pasta_iter_limit $pasta_iter_limit
+                    #else:
+                        --iterative_realignment $iterative_realignment
+                    #end if
+                #end if
+            #end if
+        #end if
+    </token>
+    <token name="@SET_PHYLOGENETIC_TREES_PREP@">
         #set phylogenetic_trees_cond = $options_type_cond.phylogenetic_trees_cond
         #set phylogenetic_trees = $phylogenetic_trees_cond.phylogenetic_trees
     </token>
-    <token name="@TREE_INFERENCE_COND@">
+    <token name="@TREE_INFERENCE_COND_PREP@">
         #set tree_inference_cond = $phylogenetic_trees_cond.tree_inference_cond
         #set tree_inference = $tree_inference_cond.tree_inference
         #if str($tree_inference) == 'raxml':
@@ -75,8 +114,21 @@
             #end if
             #set bootstrap_replicates = $tree_inference_cond.bootstrap_replicates
         #end if
+        #set min_orthogroup_size = $phylogenetic_trees_cond.min_orthogroup_size
         #set max_orthogroup_size = $phylogenetic_trees_cond.max_orthogroup_size
-        #set min_orthogroup_size = $phylogenetic_trees_cond.min_orthogroup_size
+    </token>
+    <token name="@TREE_INFERENCE_COND_CMD@">
+        --tree_inference $tree_inference
+        #if str($tree_inference) == 'raxml':
+            #if str($rooting_order_file) == 'yes':
+                --rooting_order '$rooting_order'
+                ## No else block needed here because the default rooting_order
+                ## configuration will be used if the --rooting_order flag is missing.
+            #end if
+            --bootstrap_replicates $bootstrap_replicates
+        #end if
+        --min_orthogroup_size $min_orthogroup_size
+        --max_orthogroup_size $max_orthogroup_size
     </token>
     <xml name="param_scaffold">
         <param name="scaffold" type="select" label="Orthogroups or gene families proteins scaffold">
@@ -142,10 +194,10 @@
             <expand macro="options_multiple_sequence_alignments_option" />
         </param>
     </xml>
-    <xml name="param_multiple_sequence_alignments_option_with_iterative_realignments">
+    <xml name="param_multiple_sequence_alignments_option_with_iterative_realignment">
         <param name="multiple_sequence_alignments_option" type="select" force_select="true" label="Select method for multiple sequence alignments">
             <expand macro="options_multiple_sequence_alignments_option" />
-            <option value="iterative_realignments">Iterative orthogroups realignment, trimming and fitering</option>
+            <option value="iterative_realignment">Iterative orthogroups realignment, trimming and fitering</option>
         </param>
     </xml>
     <xml name="whens_multiple_sequence_alignments_option_cond">
@@ -167,16 +219,16 @@
             </when>
         </conditional>
     </xml>
-    <xml name="cond_multiple_sequence_alignments_with_iterative_realignments">
+    <xml name="cond_multiple_sequence_alignments_with_iterative_realignment">
         <conditional name="multiple_sequence_alignments_cond">
             <expand macro="param_multiple_sequence_alignments" />
             <when value="no" />
             <when value="yes">
                 <conditional name="multiple_sequence_alignments_option_cond">
-                    <expand macro="param_multiple_sequence_alignments_option_with_iterative_realignments" />
+                    <expand macro="param_multiple_sequence_alignments_option_with_iterative_realignment" />
                     <expand macro="whens_multiple_sequence_alignments_option_cond" />
-                    <when value="iterative_realignments">
-                        <param name="iterative_realignments" type="integer" value="0" min="0" label="Maximum number of iterations" help="Zero value has no affect"/>
+                    <when value="iterative_realignment">
+                        <param name="iterative_realignment" type="integer" value="0" min="0" label="Maximum number of iterations" help="Zero value has no affect"/>
                     </when>
                 </conditional>
             </when>
@@ -282,7 +334,7 @@
                     </when>
                     <when value="yes">
                         <param name="remove_sequences_with_gaps_of" type="float" value="0.5" min="0" max="1" label="Remove sequences with gaps of" help="0.5 removes sequences with 50% gaps" />
-                        <expand macro="cond_multiple_sequence_alignments_with_iterative_realignments" />
+                        <expand macro="cond_multiple_sequence_alignments_with_iterative_realignment" />
                     </when>
                 </conditional>
             </when>
--- a/phylogenomics_analysis.xml	Thu Mar 23 15:01:27 2017 -0400
+++ b/phylogenomics_analysis.xml	Mon Mar 27 09:57:54 2017 -0400
@@ -22,11 +22,10 @@
 
             #if str($options_type) == 'advanced':
                 #if str($input_format) == 'ptortho':
-                    @REMOVE_GAPPY_SEQUENCES_COND@
-                    @SET_PHYLOGENETIC_TREES@
+                    @REMOVE_GAPPY_SEQUENCES_COND_PREP@
+                    @SET_PHYLOGENETIC_TREES_PREP@
                     #if str($phylogenetic_trees) == 'yes':
-                        @TREE_INFERENCE_COND@
-                        #set sequence_type = 'protein'
+                        @TREE_INFERENCE_COND_PREP@
                     #end if
                 #else:
                     ## str($input_format) == 'ptorthocs'
@@ -36,20 +35,19 @@
                     #set options_type = $options_type_cond.options_type
                     #if str($orthogroup_fna) == 'yes':
                         #if str(options_type) == 'advanced':
-                            @REMOVE_GAPPY_SEQUENCES_COND@
+                            @REMOVE_GAPPY_SEQUENCES_COND_PREP@
                             #set multiple_codon_alignments = $options_type_cond.multiple_codon_alignments
-                            @SET_PHYLOGENETIC_TREES@
+                            @SET_PHYLOGENETIC_TREES_PREP@
                             #if str($phylogenetic_trees) == 'yes':
-                                @TREE_INFERENCE_COND@
-                                #set sequence_type = $phylogenetic_trees_cond.sequence_type
+                                @TREE_INFERENCE_COND_PREP@
                             #end if
                         #end if
                     #else:
                         #if str(options_type) == 'advanced':
-                            @REMOVE_GAPPY_SEQUENCES_COND@
-                            @SET_PHYLOGENETIC_TREES@
+                            @REMOVE_GAPPY_SEQUENCES_COND_PREP@
+                            @SET_PHYLOGENETIC_TREES_PREP@
                             #if str($phylogenetic_trees) == 'yes':
-                                @TREE_INFERENCE_COND@
+                                @TREE_INFERENCE_COND_PREP@
                                 #set sequence_type = $phylogenetic_trees_cond.sequence_type
                             #end if
                         #end if
@@ -58,54 +56,42 @@
             #end if
 
             python $__tool_directory__/phylogenomics_analysis.py
-            --num_threads \${GALAXY_SLOTS:-4}
-            #if str($input_format) == 'ptortho':
-                --orthogroup_faa '$input_format_cond.input_ptortho.extra_files_path'
-            #else:
-                --orthogroup_faa '$input_format_cond.input_ptorthocs.extra_files_path'
-                #if str($orthogroup_fna) == 'yes':
-                    --orthogroup_fna 'true'
-                #end if
-                #set multiple_codon_alignments = $input_format_cond.multiple_codon_alignments
-                #if str($multiple_codon_alignments) == 'yes':
-                    --codon_alignments 'true'
-                #end if
-            #end if
             --config_dir '$scaffold.fields.path'
             --scaffold '$scaffold.fields.path'
             --method $method
+            --num_threads \${GALAXY_SLOTS:-4}
 
-            #if str($options_type) == 'advanced':
-                #if str($multiple_sequence_alignments) == 'yes':
-                    --alignments_method $multiple_sequence_alignments_option
-                    #if str($multiple_sequence_alignments_option) == 'pasta_alignments':
-                        --pasta_script_path '$__tool_directory__/run_pasta.py'
-                        --pasta_iter_limit $multiple_sequence_alignments_option_cond.pasta_iter_limit
+            #if str($input_format) == 'ptortho':
+                --orthogroup_faa '$input_format_cond.input_ptortho.extra_files_path'
+                #if str($options_type) == 'advanced':
+                    @REMOVE_GAPPY_SEQUENCES_COND_CMD@
+                    #if str($phylogenetic_trees) == 'yes':
+                        @TREE_INFERENCE_COND_CMD@
+                        --sequence_type 'protein'
                     #end if
                 #end if
-
-                #if str($phylogenetic_trees) == 'yes':
-                    --tree_inference $tree_inference
-                    #if str($tree_inference) == 'raxml':
-                        #if str($rooting_order_file) == 'yes':
-                            --rooting_order '$rooting_order_file_cond.rooting_order'
-                            # No else block needed here because the default rooting_order
-                            # configuration will be used if the --rooting_order flag is missing.
+            #else:
+                ## str($input_format) == 'ptorthocs'
+                --orthogroup_faa '$input_format_cond.input_ptorthocs.extra_files_path'
+                #if str($orthogroup_fna) == 'yes':
+                    --orthogroup_fna 'true'
+                    #if str(options_type) == 'advanced':
+                        @REMOVE_GAPPY_SEQUENCES_COND_CMD@
+                        #if str($multiple_codon_alignments) == 'yes':
+                            --codon_alignments 'true'
                         #end if
-                        --bootstrap_replicates $tree_inference_cond.bootstrap_replicates
+                        #if str($phylogenetic_trees) == 'yes':
+                            @TREE_INFERENCE_COND_CMD@
+                            --sequence_type = $phylogenetic_trees_cond.sequence_type
+                        #end if
                     #end if
-                    --max_orthogroup_size $options_type_cond.phylogenetic_trees_cond.max_orthogroup_size
-                    --min_orthogroup_size $options_type_cond.phylogenetic_trees_cond.min_orthogroup_size
-                    --sequence_type $sequence_type
-                #end if
-
-                #if str($remove_gappy_sequences) == 'yes':
-                    #if str($remove_sequences_with_gaps) == 'yes':
-                        --remove_sequences $remove_sequences_with_gaps_cond.remove_sequences_with_gaps_of
-                    #end if
-                    --trim_type $trim_type_cond.trim_type
-                    #if str($trim_type_cond.trim_type) == 'gap_trimming':
-                        --gap_trimming $trim_type_cond.gap_trimming
+                #else:
+                    #if str(options_type) == 'advanced':
+                        @REMOVE_GAPPY_SEQUENCES_COND_CMD@
+                        #if str($phylogenetic_trees) == 'yes':
+                            @TREE_INFERENCE_COND_CMD@
+                            --sequence_type = $phylogenetic_trees_cond.sequence_type
+                        #end if
                     #end if
                 #end if
             #end if