diff gene_family_phylogeny_builder.xml @ 6:a7867769a706 draft

Uploaded
author greg
date Mon, 30 Oct 2017 09:53:46 -0400
parents 34ca28db0a5d
children c088c185f63f
line wrap: on
line diff
--- a/gene_family_phylogeny_builder.xml	Wed Aug 30 13:11:48 2017 -0400
+++ b/gene_family_phylogeny_builder.xml	Mon Oct 30 09:53:46 2017 -0400
@@ -1,13 +1,17 @@
-<tool id="plant_tribes_gene_family_phylogeny_builder" name="GeneFamilyPhylogenyBuilder" version="@WRAPPER_VERSION@.2.1">
+<tool id="plant_tribes_gene_family_phylogeny_builder" name="GeneFamilyPhylogenyBuilder" version="@WRAPPER_VERSION@.3.0">
     <description>builds phylogenetic trees of aligned orthologous gene family clusters</description>
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements_gene_family_phylogeny_builder" />
+    <requirements>
+        <requirement type="package" version="1.0.3">plant_tribes_gene_family_phylogeny_builder</requirement>
+    </requirements>
     <command detect_errors="exit_code"><![CDATA[
-#set input_format = $input_format_cond.input_format
+#set input_dir = 'input_dir'
 #set tree_inference = $tree_inference_cond.tree_inference
 #if str($tree_inference) == 'raxml':
+    #set scaffold = $tree_inference_cond.scaffold
+    #set method = $tree_inference_cond.method
     #set rooting_order_file_cond = $tree_inference_cond.rooting_order_file_cond
     #set rooting_order_file = $rooting_order_file_cond.rooting_order_file
     #if str($rooting_order_file) == 'yes':
@@ -15,38 +19,19 @@
     #end if
     #set bootstrap_replicates = $tree_inference_cond.bootstrap_replicates
 #end if
-
+mkdir $input_dir &&
+#for $i in $input:
+    #set filename = $i.file_name
+    #set name = $i.name
+    ln -s $filename $input_dir/$name &&
+#end for
 GeneFamilyPhylogenyBuilder
-#if str($input_format) == 'ptalign':
-    --orthogroup_aln '$input_format_cond.input_ptalign.extra_files_path'
-    --alignment_type aln
-    --sequence_type protein
-#else if str($input_format) == 'ptalignca':
-    --orthogroup_aln '$input_format_cond.input_ptalignca.extra_files_path'
-    --alignment_type aln
-    --sequence_type $input_format_cond.sequence_type
-#else if str($input_format) == 'ptalignfiltered':
-    --orthogroup_aln '$input_format_cond.input_ptalignfiltered.extra_files_path'
-    --alignment_type filter
-    --sequence_type protein
-#else if str($input_format) == 'ptalignfilteredca':
-    --orthogroup_aln '$input_format_cond.input_ptalignfilteredca.extra_files_path'
-    --alignment_type filter
-    --sequence_type $input_format_cond.sequence_type
-#else if str($input_format) == 'ptaligntrimmed':
-    --orthogroup_aln '$input_format_cond.input_ptaligntrimmed.extra_files_path'
-    --alignment_type trim
-    --sequence_type protein
-#else if str($input_format) == 'ptaligntrimmedca':
-    --orthogroup_aln '$input_format_cond.input_ptaligntrimmedca.extra_files_path'
-    --alignment_type trim
-    --sequence_type $input_format_cond.sequence_type
-#end if
---scaffold '$scaffold.fields.path'
---config_dir '$scaffold.fields.path'
---method $method
+--orthogroup_aln '$input_dir'
 --tree_inference $tree_inference
 #if str($tree_inference) == 'raxml':
+    --scaffold '$scaffold.fields.path'
+    --config_dir '$scaffold.fields.path'
+    --method $method
     #if str($rooting_order_file) == 'yes':
         --rooting_order '$rooting_order'
         ## No else block needed here because the default rooting_order
@@ -57,59 +42,18 @@
 --min_orthogroup_size $min_orthogroup_size
 --max_orthogroup_size $max_orthogroup_size
 --num_threads \${GALAXY_SLOTS:-4}
+&>proc.log
     ]]></command>
     <inputs>
-        <conditional name="input_format_cond">
-            <param name="input_format" type="select" label="Orthogroup alignments">
-                <option value="ptalign">Proteins orthogroup alignments</option>
-                <option value="ptalignca">Protein and coding sequences orthogroup alignments</option>
-                <option value="ptalignfiltered">Filtered proteins orthogroup alignments</option>
-                <option value="ptalignfilteredca">Filtered protein and coding sequences orthogroup alignments</option>
-                <option value="ptaligntrimmed">Trimmed proteins orthogroup alignments</option>
-                <option value="ptaligntrimmedca">Trimmed protein and coding sequences orthogroup alignments</option>
-            </param>
-            <when value="ptalign">
-                <param name="input_ptalign" format="ptalign" type="data" label="Proteins orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-            </when>
-            <when value="ptalignca">
-                <param name="input_ptalignca" format="ptalignca" type="data" label="Protein and coding sequences orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-                <expand macro="param_sequence_type" />
-            </when>
-            <when value="ptalignfiltered">
-                <param name="input_ptalignfiltered" format="ptalignfiltered" type="data" label="Filtered proteins orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-            </when>
-            <when value="ptalignfilteredca">
-                <param name="input_ptalignfilteredca" format="ptalignfilteredca" type="data" label="Filtered protein and coding sequences orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-                <expand macro="param_sequence_type" />
-            </when>
-            <when value="ptaligntrimmed">
-                <param name="input_ptaligntrimmed" format="ptaligntrimmed" type="data" label="Trimmed proteins orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-            </when>
-            <when value="ptaligntrimmedca">
-                <param name="input_ptaligntrimmedca" format="ptaligntrimmedca" type="data" label="Trimmed protein and coding sequences orthogroup alignments">
-                    <validator type="empty_extra_files_path" />
-                </param>
-                <expand macro="param_sequence_type" />
-            </when>
-        </conditional>
-        <expand macro="param_scaffold" />
-        <expand macro="param_method" />
+        <param name="input" format="fasta" type="data_collection" collection_type="list" label="Proteins orthogroup alignments" />
         <conditional name="tree_inference_cond">
             <param name="tree_inference" type="select" label="Phylogenetic inference method">
                 <option value="raxml" selected="true">RAxML</option>
                 <option value="fasttree">FastTree</option>
             </param>
             <when value="raxml">
+                <expand macro="param_scaffold" />
+                <expand macro="param_method" />
                 <conditional name="rooting_order_file_cond">
                     <param name="rooting_order_file" type="select" label="Rooting order configuration">
                         <option value="no" selected="true">No</option>
@@ -137,10 +81,17 @@
         </collection>
     </outputs>
     <tests>
-        <!-- Test framework does not currently support inputs whose associated extra_files_path contains files to be analyzed.
         <test>
+            <param name="input">
+                <collection type="list">
+                    <element name="3722.faa.aln" value="3722.faa.aln"/>
+                </collection>
+            </param>
+            <param name="tree_inference" value="fasttree"/>
+            <output_collection name="tree" type="list">
+                <element name="3722.faa.aln.tree" file="3722.faa.aln.tree" ftype="nhx"/>
+            </output_collection>
         </test>
-        -->
     </tests>
     <help>
 This tool is one of the PlantTribes collection of automated modular analysis pipelines for comparative and evolutionary
@@ -152,17 +103,17 @@
 **Required options**
 
  * **Orthogroup alignments** - orthogroup alignment fasta files produced by the GeneFamilyAligner tool selected from your history.  Depending on how the GeneFamilyAligner tool was executed, these could either be pre-processed alignments, trimmed alignments or both trimmed and filtered alignments.
- * **Gene family scaffold** - one of the PlantTribes gene family scaffolds installed into Galaxy by the PlantTribes Scaffold Download Data Manager tool.
- * **Protein clustering method** - gene family scaffold protein clustering method as described in the AssemblyPostProcessor tool.
  * **Phylogenetic inference method** - method for estimating orthogroup maximum likelihood (ML) phylogenetic trees.  PlantTribes estimates ML phylogenetic trees using either RAxML or FastTree algorithms.
 
+  - **Gene family scaffold** - one of the PlantTribes gene family scaffolds installed into Galaxy by the PlantTribes Scaffold Download Data Manager tool.  This is used only if RAxML is selected as the phylogenetic inference method.
+  - **Protein clustering method** - gene family scaffold protein clustering method as described in the AssemblyPostProcessor tool.    This is used only if RAxML is selected as the phylogenetic inference method.
+
 **Other options**
 
  * **Rooting order configuration** - select 'Yes' to enable selection of a rooting order configuration file for RAxML.  Scaffold configuration templates (.rootingOrder.config) of how to customize the RAxML ML tree rooting order can be found in the scaffold data installed into Galaxy via the PlantTribes Scaffolds Download Data Manager tool, and is also available at the PlantTribes GitHub `repository`_.  Phylogenetic tree rooting order settings shown in these templates are used as defaults if 'No' is selected.
  * **Bootstrap replicates** - number of bootstrap replicates for RAxML to conduct a rapid bootstrap analysis and search for the best-scoring ML tree (default = 100).
  * **Maximum orthogroup size** - maximum number of sequences allowed in orthogroup alignments (default = 100).
  * **Minimum orthogroup size** - minimum number of sequences allowed in orthogroup alignments (default = 4).
- * **Output additional directory of phylogenetic tree files** - selecting 'Yes' will produce an additional output that has an associated directory of files that are copies of the  elements of the phylogenetic trees output dataset collection (this output will be used for future downstream tools).
 
 .. _repository: https://github.com/dePamphilis/PlantTribes/tree/master/config