diff hyphy_fubar.xml @ 1:0f108ee932ea draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hyphy/ commit 2c7a7ff8a55e7584e84335baa3159a63ce7a590c"
author iuc
date Wed, 21 Aug 2019 12:24:34 -0400
parents fe399429a5d2
children 6943fbec145c
line wrap: on
line diff
--- a/hyphy_fubar.xml	Thu Jan 17 04:22:54 2019 -0500
+++ b/hyphy_fubar.xml	Wed Aug 21 12:24:34 2019 -0400
@@ -4,59 +4,55 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements" />
-    <expand macro="version_command" />
-    <command detect_errors="exit_code">
-    <![CDATA[
-    ln -s '$input_file' fubar_input.fa &&
-    ln -s '$input_nhx' fubar_input.nhx &&
-    echo $gencodeid > tool_params &&
-    echo `pwd`/fubar_input.fa >> tool_params &&
-    echo `pwd`/fubar_input.nhx >> tool_params &&
-    echo '$grid_points' >> tool_params &&
-    echo '$posterior' >> tool_params &&
-    echo '$mcmc' >> tool_params &&
-    echo '$chain_length' >> tool_params &&
-    echo '$samples' >> tool_params &&
-    echo '$samples_per_chain' >> tool_params &&
-    echo '$concentration' >> tool_params &&
-    @HYPHY_INVOCATION@ \$HYPHY_LIB/TemplateBatchFiles/SelectionAnalyses/FUBAR.bf > '$fubar_log'
-    ]]>
-    </command>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+        ln -s '$input_file' fubar_input.fa &&
+        ln -s '$input_nhx' fubar_input.nhx &&
+        @HYPHY_INVOCATION@ fubar
+            --alignment ./fubar_input.fa
+            --tree ./fubar_input.nhx
+            --code '$gencodeid'
+            --method '$posterior'
+            --grid '$grid_points'
+            --chains '$mcmc'
+            --chain-length '$chain_length'
+            --burn-in '$samples'
+            --samples '$samples_per_chain'
+            --concentration_parameter '$concentration'
+            > '$fubar_log'
+    ]]></command>
     <inputs>
-        <expand macro="inputs" />
-        <expand macro="gencode" />
-        <param name="grid_points" type="integer" value="20" min="5" max="50" label="Grid points" />
+        <expand macro="inputs"/>
+        <expand macro="gencode"/>
+        <param name="grid_points" type="integer" value="20" min="5" max="50" label="Grid points"/>
         <param name="posterior" type="select" label="Posterior estimation method">
-            <option value="1">Full Metropolis-Hastings MCMC algorithm</option>
-            <option value="2">Collapsed Gibbs sampler</option>
-            <option value="3">0-th order Variational Bayes approximations</option>
+            <option value="Metropolis-Hastings">Full Metropolis-Hastings MCMC algorithm</option>
+            <option value="Collapsed-Gibbs">Collapsed Gibbs sampler</option>
+            <option value="Variational-Bayes">0-th order Variational Bayes approximations</option>
         </param>
-        <param name="mcmc" type="integer" value="5" min="2" max="20" label="Number of MCMC chains" />
-        <param name="chain_length" type="integer" value="2000000" min="500000" max="50000000" label="Length of each chain" />
-        <param name="samples" type="integer" value="1000000" min="100000" max="1900000" label="Samples to use for burn-in" />
-        <param name="samples_per_chain" type="integer" value="100" min="50" max="1000000" label="Samples to draw from each chain" />
-        <param name="concentration" type="float" value="0.5" min="0.001" max="1" label="Concentration parameter of the Dirichlet prior" />
+        <param name="mcmc" type="integer" value="5" min="2" max="20" label="Number of MCMC chains"/>
+        <param name="chain_length" type="integer" value="2000000" min="500000" max="50000000" label="Length of each chain"/>
+        <param name="samples" type="integer" value="1000000" min="100000" max="1900000" label="Samples to use for burn-in"/>
+        <param name="samples_per_chain" type="integer" value="100" min="50" max="1000000" label="Samples to draw from each chain"/>
+        <param name="concentration" type="float" value="0.5" min="0.001" max="1" label="Concentration parameter of the Dirichlet prior"/>
     </inputs>
     <outputs>
-        <data name="fubar_log" format="txt" />
-        <data name="fubar_output" format="json" from_work_dir="fubar_input.fa.FUBAR.json" />
+        <data name="fubar_log" format="txt"/>
+        <data name="fubar_output" format="hyphy_results.json" from_work_dir="fubar_input.fa.FUBAR.json"/>
     </outputs>
     <tests>
         <test>
-            <param name="input_file" ftype="fasta" value="fubar-in1.fa" />
-            <param name="input_nhx" ftype="nhx" value="fubar-in1.nhx" />
-            <param name="posterior" value="1" />
-            <output name="fubar_output" file="fubar-out1.json" compare="sim_size" />
+            <param name="input_file" ftype="fasta" value="fubar-in1.fa"/>
+            <param name="input_nhx" ftype="nhx" value="fubar-in1.nhx"/>
+            <param name="posterior" value="Variational-Bayes"/>
+            <output name="fubar_output" file="fubar-out1.json" compare="sim_size"/>
         </test>
     </tests>
-    <help>
-        <![CDATA[
+    <help><![CDATA[
 Model-based selection analyses (such as those performed by PAML and HyPhy) can be slow, becoming impractical for large alignments. We present a method to model and detect selection much faster than existing methods and to leverage Bayesian MCMC to robustly account for parameter estimation errors.
 
 Results: By exploiting some commonly used approximations, FUBAR can perform detection of positive selection under a model that allows rich site- to-site rate variation about 30 to 50 times faster than existing random effects likelihood methods, and 10 to 30 times faster than existing fixed effects likelihood methods. We introduce an ultra-fast MCMC routine that allows a flexible prior specification, with no parametric constraints on the prior shape. Furthermore, our method allows us to visualize Bayesian inference for each site, revealing the model supported by the data.
-        ]]>
-    </help>
+    ]]></help>
     <expand macro="citations">
         <citation type="doi">10.1093/molbev/mst030</citation>
     </expand>