changeset 1:96e6283e4745 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gubbins commit d55207b02be0d64287be1629fb28056d31a98823
author iuc
date Wed, 24 Aug 2022 07:37:39 +0000
parents 637ec5d5368c
children
files gubbins.xml
diffstat 1 files changed, 140 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/gubbins.xml	Fri Jun 23 08:29:43 2017 -0400
+++ b/gubbins.xml	Wed Aug 24 07:37:39 2022 +0000
@@ -1,7 +1,14 @@
-<tool id="gubbins" name="Gubbins" version="0.1.0">
+<tool id="gubbins" name="Gubbins" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
     <description>Recombination detection in Bacteria</description>
+    <macros>
+        <token name="@TOOL_VERSION@">3.2.1</token>
+        <token name="@VERSION_SUFFIX@">0</token>
+    </macros>
+    <xrefs>
+        <xref type="bio.tools">gubbins</xref>
+    </xrefs>
     <requirements>
-        <requirement type="package" version="2.2.1">gubbins</requirement>
+        <requirement type="package" version="@TOOL_VERSION@">gubbins</requirement>
     </requirements>
     
     <version_command>run_gubbins.py --version</version_command>
@@ -14,49 +21,44 @@
         
         --threads \${GALAXY_SLOTS:-1}
         
-        #if $adv.iters
-            -i '$adv.iters'
-        #end if
-        
-        #if $adv.conv_meth
-            -z '$adv.conv_meth'
-        #end if
-        
+        -i '$adv.iterations'
+        -z '$adv.converge_method'
+        $adv.extensive_search
+
         #if $adv.outgroup
             -o '$adv.outgroup'
         #end if
         
-        #if $really_adv.tree_builder
-            -t '$really_adv.tree_builder'
-        #end if
-        
-        #if $really_adv.min_snps
-            -m '$really_adv.min_snps'
-        #end if
-        
-        #if $really_adv.filter_percentage
-            -f '$really_adv.filter_percentage'
-        #end if
-        
-        #if $really_adv.min_window_size
-            -a '$really_adv.min_window_size'
-        #end if
-        
-        #if $really_adv.max_window_size
-            -b '$really_adv.max_window_size'
-        #end if
-        
-        $really_adv.remove_duplicates
-        
+        -t '$really_adv.tree_builder'
+        -m '$really_adv.min_snps'
+        -f '$really_adv.filter_percentage'
+        -a '$really_adv.min_window_size'
+        -b '$really_adv.max_window_size'
+        -p '$really_adv.p_value'
+        --trimming-ratio '$really_adv.trimming_ratio'
+        $really_adv.remove_identical_sequences
+
         foo.aln
-        
+
+        ## Requited because the p-value is included as prefix
+
+        && mv *branch_base_reconstruction.embl branch_base_reconstruction.embl
+        && mv *filtered_polymorphic_sites.fasta filtered_polymorphic_sites.fasta
+        && mv *filtered_polymorphic_sites.phylip filtered_polymorphic_sites.phylip
+        && mv *node_labelled.final_tree.tre node_labelled.final_tree
+        && mv *final_tree.tre final_tree.tre
+        && mv *per_branch_statistics.csv per_branch_statistics.csv
+        && mv *recombination_predictions.embl recombination_predictions.embl
+        && mv *recombination_predictions.gff recombination_predictions.gff
+        && mv *summary_of_snp_distribution.vcf summary_of_snp_distribution.vcf
+
     ]]></command>
     <inputs>
         <!-- Just the data set.. -->
         <param type="data" name="alignment_file" format="fasta" label="Whole genome alignment file" help="Whole genome alignment file in fasta format"/>
       
         <!-- output file picker -->
-        <param type="select" name="outfiles" multiple="true" display="checkboxes" label="Select the required output files" help="Default selections are the Final Tree in Newick format, the Recombination Predictions in gff3 format and the Summary of SNP Distribution">
+        <param name="outfiles" type="select" multiple="true" display="checkboxes" label="Select the required output files" help="Default selections are the Final Tree in Newick format, the Recombination Predictions in gff3 format and the Summary of SNP Distribution">
             <option value="ftree" selected="true">Final Tree in newick format</option>
             <option value="gff" selected="true">Recombination Predictions in gff3 format</option>
             <option value="vcf" selected="true">Summary of SNP Distribution in vcf format</option>
@@ -69,61 +71,77 @@
       
         <!-- A semi advanced section, really shouldn't have to change anything. -->
         <section name="adv" title="Advanced options" expanded="True">
-            <param name="iters" type="integer" label="Iterations" value="5" help="Maximum No. of iterations, default is 5" />
-            <param name="conv_meth" type="select" label="Model Conversion Options" help="Criteria to use to know when to halt iterations">
+            <param argument="--iterations" type="integer" label="Iterations" min="0" value="5" help="Maximum No. of iterations, default is 5" />
+            <param argument="--converge-method" type="select" label="Model conversion Options" help="Criteria to use to know when to halt iterations">
                 <option value="weighted_robinson_foulds" selected="True">Weighted Robinson Foulds</option>
                 <option value="robinson_foulds">Robinson Foulds</option>
                 <option value="recombination">Recombination</option>
             </param>
-            <param name="outgroup" type="text" label="Outgroup" value="" help="Outgroup name for rerooting. A list of comma separated names can be used if they form a clade."/>
+            <param argument="--outgroup" type="text" label="Outgroup" value="" help="Outgroup name for rerooting. A list of comma separated names can be used if they form a clade.">
+                <sanitizer invalid_char="">
+                    <valid initial="string.letters,string.digits">
+                        <add value="+" />
+                        <add value="-" />
+                        <add value=" " />
+                        <add value="_" />
+                    </valid>
+                </sanitizer>
+            </param>
+            <param argument="--extensive-search" type="boolean" truevalue="--extensive-search" falsevalue="" checked="false" label="Extensive search " help="Default: False" />
         </section>
       
         <!-- a really advanced section, play with this at your peril! -->
         <section name="really_adv" title="Really advanced options - change these if you really know what you are doing." expanded="false">
-            <param name="tree_builder" type="select" label="Tree builder" help="Application to use for tree building, default RAxML">
+            <param argument="--tree-builder" type="select" label="Tree builder" help="Application to use for tree building, default RAxML">
                 <option value="raxml" selected="true">RAxML</option>
+                <option value="raxmlng">RAxML-NG</option>
+                <option value="iqtree">IQ-TREE</option>
                 <option value="fasttree">FastTree</option>
                 <option value="hybrid">Hybrid</option>
+                <option value="rapidnj">RapidNJ</option>
             </param>
-            <param name="min_snps" type="integer" label="Minimum SNPS" value="3" help="Min SNPs to identify a recombination block, default is 3" />
-            <param name="filter_percentage" type="integer" label="Filter Percentage" value="25" help="Filter out taxa with more than this percentage of gaps, default is 25" />
-            <param name="min_window_size" type="integer" label="Minimum Window Size" value="100" help="Minimum window size, default 100" />
-            <param name="max_window_size" type="integer" label="Maximum Window Size" value="10000" help="Maximum window size, default 10000" />
-            <param name="remove_duplicates" type="boolean" label="Remove identical sequences" falsevalue="" truevalue="-d" />
+            <param argument="--min-snps" type="integer" label="Minimum SNPs" min="0" value="3" help="Min SNPs to identify a recombination block. Default: 3" />
+            <param argument="--filter-percentage" type="float" label="Filter percentage" min="0" value="25" help="Filter out taxa with more than this percentage of gaps. Default: 25" />
+            <param argument="--min-window-size" type="integer" label="Minimum window size" min="0" value="100" help="Minimum window size. Default: 100" />
+            <param argument="--max-window-size" type="integer" label="Maximum window size" min="0" value="10000" help="Maximum window size. Default: 10000" />
+            <param argument="--remove-identical-sequences" type="boolean" label="Remove identical sequences" falsevalue="" truevalue="-d" />
+            <param argument="--p-value" type="float" min="0" max="1" value="0.05" label="p-Value" help="p-Value for detecting recombinations. Default: 0.05" />
+            <param argument="--trimming_ratio" type="float" min="0" value="1" label="Trimming ration" help="Ratio of log probabilities used to trim recombinations. Default: 1" />
+        
         </section>
       
     </inputs>
     
     <outputs>
-        <data format="txt" name="final_tree" label="${tool.name} on ${on_string} Final Tree" from_work_dir="foo.final_tree.tre" >
+        <data format="txt" name="final_tree" label="${tool.name} on ${on_string} Final Tree" from_work_dir="final_tree.tre" >
             <filter>outfiles and 'ftree' in outfiles</filter>
         </data>
-        <data format="gff3" name="recomb_pred_gff" label="${tool.name} on ${on_string} Recombinations Prediction gff" from_work_dir="foo.recombination_predictions.gff" >
+        <data format="gff3" name="recomb_pred_gff" label="${tool.name} on ${on_string} Recombinations Prediction gff" from_work_dir="recombination_predictions.gff" >
             <filter>outfiles and 'gff' in outfiles</filter>
         </data>
-        <data format="embl" name="recomb_pred_embl" label="${tool.name} on ${on_string} Recombinations Prediction embl" from_work_dir="foo.recombination_predictions.embl" >
+        <data format="embl" name="recomb_pred_embl" label="${tool.name} on ${on_string} Recombinations Prediction embl" from_work_dir="recombination_predictions.embl" >
             <filter>outfiles and 'recomb_embl' in outfiles</filter>
         </data>
-        <data format="fasta" name="filt_polymorph_fna" label="${tool.name} on ${on_string} Filtered Polymorphic Sites fasta" from_work_dir="foo.filtered_polymorphic_sites.fasta" >
+        <data format="fasta" name="filt_polymorph_fna" label="${tool.name} on ${on_string} Filtered Polymorphic Sites fasta" from_work_dir="filtered_polymorphic_sites.fasta" >
             <filter>outfiles and 'fpoly' in outfiles</filter>
         </data>
-        <data format="phylip" name="filt_polymorph_phy" label="${tool.name} on ${on_string} Filtered Polymorphic Sites phylip" from_work_dir="foo.filtered_polymorphic_sites.phylip" >
+        <data format="phylip" name="filt_polymorph_phy" label="${tool.name} on ${on_string} Filtered Polymorphic Sites phylip" from_work_dir="filtered_polymorphic_sites.phylip" >
             <filter>outfiles and 'ppoly' in outfiles</filter>
         </data>
-        <data format="csv" name="per_b_stat_csv" label="${tool.name} on ${on_string} Per Branch Statistics csv" from_work_dir="foo.per_branch_statistics.csv" >
+        <data format="csv" name="per_b_stat_csv" label="${tool.name} on ${on_string} Per Branch Statistics csv" from_work_dir="per_branch_statistics.csv" >
             <filter>outfiles and 'stats' in outfiles</filter>
         </data>
-        <data format="vcf" name="sum_snp_vcf" label="${tool.name} on ${on_string} Summary of SNP Distribution vcf" from_work_dir="foo.summary_of_snp_distribution.vcf" >
+        <data format="vcf" name="sum_snp_vcf" label="${tool.name} on ${on_string} Summary of SNP Distribution vcf" from_work_dir="summary_of_snp_distribution.vcf" >
             <filter>outfiles and 'vcf' in outfiles</filter>
         </data>
-        <data format="embl" name="base_branch_embl" label="${tool.name} on ${on_string} Branch Base Reconstruction embl" from_work_dir="foo.branch_base_reconstruction.embl" >
+        <data format="embl" name="base_branch_embl" label="${tool.name} on ${on_string} Branch Base Reconstruction embl" from_work_dir="branch_base_reconstruction.embl" >
             <filter>outfiles and 'baseb' in outfiles</filter>
         </data>
     </outputs>
     
     
     <tests>
-        <test>
+        <test expect_num_outputs="3">
             <param name="alignment_file" value="multiple_recombinations.aln" ftype="fasta" />
             <output name="recomb_pred_gff">
                 <assert_contents>
@@ -137,9 +155,9 @@
             </output>
         </test>
       
-        <test>
+        <test expect_num_outputs="3">
             <param name="alignment_file" value="multiple_recombinations.aln" ftype="fasta" />
-            <param name="iters" value="3"/>
+            <param name="iterations" value="3"/>
             <output name="recomb_pred_gff">
                 <assert_contents>
                     <has_text text="##gff-version 3" />
@@ -152,9 +170,9 @@
             </output>
         </test>
       
-        <test>
+        <test expect_num_outputs="3">
             <param name="alignment_file" value="multiple_recombinations.aln" ftype="fasta" />
-            <param name="conv_meth" value="recombination" />
+            <param name="converge_method" value="recombination" />
             <output name="recomb_pred_gff">
                 <assert_contents>
                     <has_text text="##gff-version 3" />
@@ -167,9 +185,9 @@
             </output>
         </test>
       
-        <test>
+        <test expect_num_outputs="8">
             <param name="alignment_file" value="multiple_recombinations.aln" ftype="fasta" />
-            <param name="conv_meth" value="recombination" />
+            <param name="converge_method" value="recombination" />
             <param name="outfiles" value="gff,vcf,ftree,recomb_embl,fpoly,ppoly,stats,baseb"/>
             <output name="recomb_pred_gff">
                 <assert_contents>
@@ -212,6 +230,70 @@
                 </assert_contents>
             </output>
         </test>
+        <!-- Test new options-->
+        <test expect_num_outputs="8" >
+            <param name="alignment_file" value="multiple_recombinations.aln" ftype="fasta" />
+            <param name="outfiles" value="ftree,gff,vcf,recomb_embl,fpoly,ppoly,stats,baseb"/>
+            <section name="adv">
+                <param name="expensive_research" value="true"/>
+            </section>
+            <section name="really_adv">
+                <param name="tree_builder" value="fasttree"/>
+                <param name="remove_identical_sequences" value="true"/>
+            </section>
+            <output name="recomb_pred_gff">
+                <assert_contents>
+                    <has_text text="##gff-version 3" />
+                    <has_text text="sequence_4" />
+                </assert_contents>
+            </output>
+            <output name="sum_snp_vcf">
+                <assert_contents>
+                    <has_text text="##fileformat=VCFv4.2" />
+                </assert_contents>
+            </output>
+            <output name="base_branch_embl">
+                <assert_contents>
+                    <has_n_lines n="1638"/>
+                    <has_text text="sequence_8" />
+                </assert_contents>
+            </output>
+            <output name="final_tree">
+                <assert_contents>
+                    <has_n_lines n="1"/>
+                    <has_text text="sequence_10" />
+                </assert_contents>
+            </output>
+            <output name="recomb_pred_embl">
+                <assert_contents>
+                    <has_n_lines n="24"/>
+                    <has_text text="sequence_2" />
+                </assert_contents>
+            </output>
+            <output name="filt_polymorph_fna">
+                <assert_contents>
+                    <has_n_lines n="18"/>
+                    <has_text text="GAAAA" />
+                </assert_contents>
+            </output>
+            <output name="filt_polymorph_phy">
+                <assert_contents>
+                    <has_n_lines n="10"/>
+                    <has_text text="GAAAA" />
+                </assert_contents>
+            </output>
+            <output name="per_b_stat_csv">
+                <assert_contents>
+                    <has_n_lines n="18"/>
+                    <has_text text="Number of SNPs Inside Recombinations" />
+                </assert_contents>
+            </output>
+            <output name="sum_snp_vcf">
+                <assert_contents>
+                    <has_text text="ID=1,length=242" />
+                </assert_contents>
+            </output>
+        </test>
     </tests>