view hyphy_sm19.xml @ 14:40e9160dbbbb draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hyphy/ commit adf0f20535bd585663c291f8f15137a7ba947949"
author iuc
date Fri, 21 Aug 2020 15:27:13 -0400
parents 638942ba8e37
children 2126c9e28ce6
line wrap: on
line source

<?xml version="1.0"?>
<tool id="hyphy_sm19" name="HyPhy-SM2019" version="@VERSION@+galaxy0">
    <description>Partition Tree using Modified Slatkin-Maddison Test</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        ln -s '$input_file' sm19_input.nhx &&
        @HYPHY_INVOCATION@ \$HYPHY_LIB/TemplateBatchFiles/SM-2019.bf ./sm19_input.nhx
        #for $n, $partition in enumerate($partitions):
            '${partition.label}'
            '${partition.regex}'
        #end for
        $replicates
        --output '$sm19_output'
        ]]></command>
    <inputs>
        <param name="input_file" type="data" format="nhx" label="Input tree"/>
        <repeat name="partitions" min="2" max="50" title="Partitions">
            <param name="label" type="text" label="Partition label"/>
            <param name="regex" type="text" label="Regular expression">
                <sanitizer>
                    <valid initial="string.printable">
                        <remove value="'"/>
                    </valid>
                    <mapping initial="none">
                        <add source="'" target="__sq__"/>
                    </mapping>
                </sanitizer>
            </param>
        </repeat>
        <param name="replicates" type="integer" min="1" max="1000000" value="100"/>
    </inputs>
    <outputs>
        <data name="sm19_output" format="hyphy_results.json" />
    </outputs>
    <tests>
        <test>
            <param name="input_file" ftype="fasta" value="sm19-in1.nhx"/>
            <param name="replicates" value="1000"/>
            <repeat name="partitions">
                <param name="label" value="Blood"/>
                <param name="regex" value="B[0-9]+"/>
            </repeat>
            <repeat name="partitions">
                <param name="label" value="Semen"/>
                <param name="regex" value="S[0-9]+"/>
            </repeat>
            <output name="sm19_output" file="sm19-out1.json" compare="sim_size"/>
        </test>
        <test>
            <param name="input_file" ftype="fasta" value="sm19-in2.nhx"/>
            <param name="replicates" value="1000"/>
            <repeat name="partitions">
                <param name="label" value="Blood"/>
                <param name="regex" value="B[0-9]+"/>
            </repeat>
            <repeat name="partitions">
                <param name="label" value="Semen"/>
                <param name="regex" value="S[0-9]+"/>
            </repeat>
            <output name="sm19_output" file="sm19-out2.json" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[

SM2019 : Structured Slatkin-Maddison
====================================

What does this do?
------------------

Test for evidence of genetically segregated populations, using a "detuned" version of
the Slatkin-Maddison test.

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

This analysis implements canonical and modified versions of the
Slatkin-Maddison phylogeny based test for population segregation. The
test estimates the minimum number of migration events using maximum
parsimony, and then evaluating whether or not this number is lower than
expected in a panmictic or unstructured population using permutation
tests

Input
-----

1. A phylogenetic tree in the *Newick* format

Note: assumes that leaf names that can be partitioned into sets using regular expressions

For example

::

    ((((((((x_US_x_A_01C:0.0125396,(((((x_US_x_A_01P:0.00887628,((
    x_US_x_A_08P:-0.000190918,x_US_x_A_11P:0.00313157):0.0106883,
    x_US_x_A_14C:0.0103815):0.00311658):0.00120812,x_US_x_A_09P:0.00320468):
    0.0108828,x_US_x_A_12P:0.00732672):0.00596663,x_US_x_A_07C:0.00449846):0
    .00639319,((((x_US_x_A_02P:-2.62303e-05,x_US_x_A_05P:0.00591507):0.
    000156788,x_US_x_A_04P:0.00576826):0.00907366,((x_US_x_A_03P:0.00941548,
    x_US_x_A_14P:0.00866127):0.00229499,x_US_x_A_13P:0.0209192):0.00469629):
    0.0146758,(x_US_x_A_10P:0.000156443,x_US_x_A_15P:0.00578946):0.00472532)
    :0.0103079):0.00733948):0.00228489,x_US_x_A_06P:0.00557974):0.00472981,
    x_US_x_A_04C:0.00478858):0.00105548,x_US_x_A_05C:0.0120259):0.0060905,
    x_US_x_A_12C:0.002911):2.90824e-05,x_US_x_A_11C:-5.79432e-06):4.34574e-
    06,x_US_x_A_13C:-4.34574e-06):4.34574e-06,((x_US_x_A_08C:0.0029538,
    x_US_x_A_09C:-1.31511e-05):0.00296627,x_US_x_A_10C:-8.69148e-06):4.
    34574e-06,x_US_x_A_15C:-4.34574e-06);

Which can be partitioned into two groups of leaves, those that end in "P", and those that
end in "C"

1. Reg-exp 1: `P^`
2. Reg-exp 2: `C^`


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/Slatkin for an example)

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

https://github.com/veg/hyphy-analyses/tree/master/SlatkinMaddison


    ]]></help>
    <expand macro="citations">
        <citation type="bibtex">
            @PUBLISHED{slatkin,
                author = "Slatkin M, Maddison WP",
                title = "A cladistic measure of gene flow inferred from the phylogenies of alleles",
                year = "1989",
                note = "Genetics 123(3):603-613",
                url = "https://www.ncbi.nlm.nih.gov/pubmed/2599370"}
        </citation>
    </expand>
</tool>