view hyphy_fade.xml @ 35:d593926e5b71 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hyphy/ commit d97b1b98a3a621c93a7ed9e7db16bda47eefcb92
author iuc
date Tue, 07 Oct 2025 20:37:49 +0000
parents 2246695d4539
children
line wrap: on
line source

<tool id="hyphy_fade" name="HyPhy-FADE" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>: FUBAR* Approach to Directional Evolution (*Fast
    Unconstrained Bayesian Approximation)</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        @SYMLINK_FILES@
        hyphy fade
            --alignment $input_file
            @INPUT_TREE@
            @branch_options@
            --model '$model'
            --method '$advanced_options.posteriorEstimationMethod.method'
            @posteriorEstimationMethod_cmd@
            --grid '$advanced_options.grid_points'
            --concentration_parameter '$advanced_options.concentration'
            --output '$fade_output'
            > fade_stdout.md 
        @ERRORS@
    ]]></command>
    <inputs>
        <expand macro="inputs"/>
        <expand macro="branches"/>
        <expand macro="substitution" argument="--model"/>
        <section name="advanced_options" title="Advanced Options" expanded="false">
            <expand macro="conditional_posteriorEstimationMethod" />
            <param argument="--grid" name="grid_points" type="integer" value="20" min="5" max="50" label="Grid points" help="The number of grid points." />
            <param argument="--concentration_parameter" name="concentration" type="float" value="0.5" min="0.001" max="1" label="Concentration parameter of the Dirichlet prior" help="The concentration parameter of the Dirichlet prior." />
        </section>
    </inputs>
    <outputs>
        <data name="fade_output" format="hyphy_results.json" />
        <data name="fade_md_report" format="markdown" from_work_dir="fade_stdout.md" label="FADE Report (Markdown) for ${tool.name} on ${on_string}" />
    </outputs>
    <tests>
        <test expect_num_outputs="2">
            <param name="input_file" ftype="fasta" value="fade-in1.fa"/>
            <param name="input_nhx" ftype="nhx" value="fade-in1.nhx"/>
            <param name="model" value="WAG"/>
            <section name="advanced_options">
                <conditional name="posteriorEstimationMethod">
                    <param name="method" value="Variational-Bayes"/>
                </conditional>
                <param name="grid_points" value="20"/>
                <param name="concentration" value="0.5"/>
            </section>
            <output name="fade_output">
                <assert_contents>
                    <has_text text="Empiricial Bayes Factor for substitution bias"/>
                    <has_text text="Substitution history on selected branches"/>
                </assert_contents>
            </output>
            <output name="fade_md_report">
                <assert_contents>
                    <has_text text="FADE analysis summary. Evidence for directional selection evaluated using empirical Bayes factor threshold of 100"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[

FADE : FUBAR Approach to Directional Evolution
==============================================

What question does this method answer?
--------------------------------------

Which site(s) in an alignment evolve towards to or away from a particular residue.

Recommended Applications
------------------------

Screen protein sequence alignments where the direction of evolution can be resolved
(via tree rooting, e.g. using an outgroup) to find sites which evolve differently from
a standard protein model (selected by the user), or a gene-average model (GTR) to find
evidence of directional selection.

Brief description
-----------------

FADE (FUBAR Approach to Directional Evolution) is a fast method to test whether or not a subset of sites in a protein alignment evolve towards a particular residue along a subset of branches at accelerated rates compared to a reference model. FADE uses a random effects model and latent Dirichlet allocation (LDA)-inspired approximation methods to allocate sites to rate classes.

The intuition behind FADE is to detect directional selection, where amino acid substitutions are consistently biased towards a particular residue type. This can be indicative of adaptation to new functional constraints or environments. By comparing the observed substitution patterns to a null model (e.g., a standard protein substitution model or a gene-average model), FADE identifies sites that exhibit significant directional bias in their evolutionary trajectory.

Input
-----

1. A *FASTA* sequence alignment of protein sequences.
2. A *rooted* 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).

A custom visualization module for viewing these results is available (see http://vision.hyphy.org/FADE for an example)

Further reading
---------------

http://hyphy.org/methods/selection-methods/#FADE


Tool options
------------

::


    --model            The baseline substitution model to use
                            [default] use GTR

    --branches          Which branches should be tested for selection?
                            All [default] : test all branches

                            Internal : test only internal branches (suitable for
                            intra-host pathogen evolution for example, where terminal branches
                            may contain polymorphism data)

                            Leaves: test only terminal (leaf) branches

                            Unlabeled: if the Newick string is labeled using the {} notation,
                            test only branches without explicit labels
                            (see http://hyphy.org/tutorials/phylotree/)

    --grid             The number of grid points
                        Smaller : faster
                        Larger : more precise posterior estimation but slower
                        default value: 20

    --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

    Output
    ------

    A JSON file with analysis results (http://hyphy.org/resources/json-fields.pdf).

    A custom visualization module for viewing these results is available (see http://vision.hyphy.org/FADE for an example)

    A Markdown file with a summary of the analysis.

    ]]>
</help>
    <expand macro="citations">
    </expand>
</tool>