diff hyphy_fubar.xml @ 6:3285fd1f4bde draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hyphy/ commit 8d5ae1d04c43988fdcc458f4f08376a15e72db8e"
author iuc
date Thu, 20 Feb 2020 18:10:47 -0500
parents 93a0cf4ea5fc
children 3db56014322f
line wrap: on
line diff
--- a/hyphy_fubar.xml	Mon Feb 17 14:52:11 2020 -0500
+++ b/hyphy_fubar.xml	Thu Feb 20 18:10:47 2020 -0500
@@ -12,29 +12,19 @@
             --alignment ./fubar_input.fa
             --tree ./fubar_input.nhx
             --code '$gencodeid'
-            --method '$posterior'
+            --method '$posteriorEstimationMethod.method'
             --grid '$grid_points'
-            --chains '$mcmc'
-            --chain-length '$chain_length'
-            --burn-in '$samples'
-            --samples '$samples_per_chain'
+            @posteriorEstimationMethod_cmd@
             --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"/>
-        <param name="posterior" type="select" label="Posterior estimation method">
-            <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 argument="--grid" name="grid_points" type="integer" value="20" min="5" max="50" label="Grid points" />
+        <expand macro="conditional_posteriorEstimationMethod" />
+        <param argument="--concentration_parameter" 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"/>
@@ -49,13 +39,91 @@
         </test>
     </tests>
     <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.
+
+FUBAR : Faste Unbiased Bayesian AppRoximation
+=============================================
+
+What question does this method answer?
+--------------------------------------
+
+Which site(s) in a gene are subject to pervasive, i.e. consistently across the entire phylogeny, diversifying selection?
+
+Recommended Applications
+------------------------
+
+The phenomenon of pervasive selection is generally most prevalent in pathogen evolution and any biological system influenced by evolutionary arms race dynamics
+(or balancing selection), including adaptive immune escape by viruses. As such, FUBAR is ideally suited to identify sites under positive selection which
+represent candidate sites subject to strong selective pressures across the entire phylogeny.
+
+FUBAR is our recommended method for detecting pervasive selection at individual sites on large (> 500 sequences) datasets for which other methods have prohibitive runtimes, unless you have access to a computer cluster.
+
+Brief description
+-----------------
 
-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.
+Perform a Fast Unbiased AppRoximate Bayesian (FUBAR) analysis of a
+coding sequence alignment to determine whether some sites have been
+subject to pervasive purifying or diversifying selection. There are three methods
+for estimating the posterior distribution of
+grid weights: collapsed Gibbs MCMC (faster), 0-th order Variation
+Bayes approximation (fastest), full Metropolis-Hastings (slowest).
+
+Input
+-----
+
+1. A *FASTA* sequence alignment.
+2. A phylogenetic tree in the *Newick* format
+
+Note: the names of sequences in the alignment must match the names of the sequences in the tree.
+
+
+Output
+------
+
+A JSON file with analysis results (http://hyphy.org/resources/json-fields.pdf).
 
-See the online documentation_ for more information.
+A custom visualization module for viewing these results is available (see http://vision.hyphy.org/FUBAR for an example)
+
+Further reading
+---------------
+
+http://hyphy.org/methods/selection-methods/#FUBAR
+
+
+Tool options
+------------
+::
+
+
+    --code             Which genetic code to use
+
+    --grid             The number of grid points
+                        Smaller : faster
+                        Larger : more precise posterior estimation but slower
+                        default value: 20
 
-.. _documentation: http://hyphy.org/methods/selection-methods/#fubar
+    --method           Inference method to use
+                            Variational-Bayes : 0-th order Variational Bayes approximation; fastest [default]
+                            Metropolis-Hastings : Full Metropolis-Hastings MCMC algorithm; orignal method [slowest]
+                            Collapsed-Gibbs  : Collapsed Gibbs sampler [intermediate speed]
+
+
+    --chains           How many MCMC chains to run (does not apply to Variational-Bayes)
+                            default value: 5
+
+    --chain-length     MCMC chain length (does not apply to Variational-Bayes)
+                            default value: 2,000,000
+
+    --burn-in          MCMC chain burn in (does not apply to Variational-Bayes)
+                            default value: 1,000,000
+
+    --samples          MCMC samples to draw (does not apply to Variational-Bayes)
+                            default value: 1,000
+
+    --concentration_parameter
+                        The concentration parameter of the Dirichlet prior
+                        default value: 0.5
+
+
     ]]></help>
     <expand macro="citations">
         <citation type="doi">10.1093/molbev/mst030</citation>