view structureharvester.xml @ 1:8dc371b783eb draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/structureharvester commit 1d35c5c412b5702049917e54649960474595786c"
author iuc
date Thu, 17 Sep 2020 09:35:06 +0000
parents 8a7390c4d6bf
children 28b9809c4002
line wrap: on
line source

<tool id="structureharvester" name="structureHarvester" version="0.6.94">
    <description>for parsing STRUCTURE outputs and for performing the Evanno method</description>
    <requirements>
        <requirement type="package" version="0.6.94">structureharvester</requirement>
    </requirements>
    <version_command><![CDATA[
        structureHarvester.py --version
    ]]></version_command>
    <command detect_errors="exit_code"><![CDATA[
        mkdir inputs &&
        #for $input in $inputs
            ln -s '$input' 'inputs/$input.element_identifier' &&
        #end for
        structureHarvester.py --dir inputs/ --out . $evanno $clumpp &&
        mv summary.txt '$summary'
        #if $evanno
            && mv evanno.txt $evanno
        #end if
        #if $clumpp
            && mkdir clumpp_indfile clumpp_popfile
            && mv *.indfile clumpp_indfile/
            && mv *.popfile clumpp_popfile/
        #end if
    ]]></command>
    <inputs>
        <param name="inputs" type="data" format="txt" multiple="true" label="STRUCTURE outputs" />
        <param argument="--evanno" type="boolean" checked="false" truevalue="--evanno" falsevalue="" label="If possible, performs the Evanno 2005 method." help="You must test at least 3 values of K. K values must be sequential. The number of replicates per K > 1."/>
        <param argument="--clumpp" type="boolean" checked="false" truevalue="--clumpp" falsevalue="" label="Generates one K*.indfile for each value of K run, for use with CLUMPP." />
    </inputs>
    <outputs>
        <data name="summary" format="txt" label="Structure Harvester summary"/>
        <data name="evanno" format="txt" label="Evann method output">
            <filter>evanno</filter>
        </data>
        <collection name="clumpp_indfile" type="list" label="Clumpp K*.indfile">
            <filter>clumpp</filter>
            <discover_datasets pattern="__name__" format="txt" directory="clumpp_indfile" />
        </collection>
        <collection name="clumpp_popfile" type="list" label="Clumpp K*.popfile">
            <filter>clumpp</filter>
            <discover_datasets pattern="__name__" format="txt" directory="clumpp_popfile" />
        </collection>
    </outputs>
    <tests>
        <test>
            <param name="inputs" value="example_harvester_archive/Admix_run_001_f,example_harvester_archive/Admix_run_002_f,example_harvester_archive/Admix_run_004_f,example_harvester_archive/Admix_run_005_f,example_harvester_archive/Admix_run_007_f,example_harvester_archive/Admix_run_008_f,example_harvester_archive/K1ReRun_run_1_f,example_harvester_archive/K1ReRun_run_2_f" />
            <param name="evanno" value="false" />
            <param name="clumpp" value="true" />
            <output name="summary">
                <assert_contents>
                    <has_line line="1&#009;2&#009;-4329.950000&#009;0.070711" />
                    <has_line line="4&#009;2&#009;-2773.550000&#009;0.212132" />
                    <has_line line="K1ReRun_run_2_f&#009;2&#009;1&#009;-4330.0&#009;-4300.2&#009;59.7" />
                    <has_line line="Admix_run_008_f&#009;008&#009;4&#009;-2773.4&#009;-2678.8&#009;189.2" />
                    <has_line line="Core version: vA.2 July 2014" />
                </assert_contents>
            </output>
            <output_collection name="clumpp_indfile" type="list" count="4">
                <element name="K1.indfile">
                    <assert_contents>
                       <has_text text="  1" />
                       <has_n_lines n="192" />
                    </assert_contents>
                </element>
                <element name="K4.indfile">
                    <assert_contents>
                       <has_text text="  1" />
                       <has_n_lines n="192" />
                    </assert_contents>
                </element>
            </output_collection>
            <output_collection name="clumpp_popfile" type="list" count="4">
                <element name="K1.popfile">
                    <assert_contents>
                       <has_text text="  1" />
                       <has_n_lines n="34" />
                    </assert_contents>
                </element>
                <element name="K4.popfile">
                    <assert_contents>
                       <has_text text="  1" />
                       <has_n_lines n="34" />
                    </assert_contents>
                </element>
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[

Structure_Harvester_ is a program for parsing the output of Pritchard's STRUCTURE_ and for performing the Evanno method.

.. _Structure_Harvester: http://taylor0.biology.ucla.edu/structureHarvester/
.. _STRUCTURE: http://web.stanford.edu/group/pritchardlab/structure.html

    ]]></help>
    <citations>
        <citation type="doi">10.1007/s12686-011-9548-7</citation>
        <citation type="doi">10.1111/j.1365-294X.2005.02553.x</citation>
        <citation type="doi">10.1093/bioinformatics/btm233</citation>
    </citations>
</tool>