view stacks_stats.xml @ 4:a0c52b82b9d3 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit 74ee33c6e30744a6da8deb7116d431d80ee80edb
author iuc
date Fri, 07 Apr 2023 22:04:12 +0000
parents 93b16407d6e9
children
line wrap: on
line source

<tool id="stacks_stats" name="Stacks: statistics" version="@WRAPPER_VERSION@.0">
    <description>on stacks found for multiple samples</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <command><![CDATA[
        mkdir stacks_inputs

        &&

        #for $input_file in $input_col
            #set $ext = ""
            #if not str($input_file.element_identifier).endswith('.tsv')
                #set $ext = ".tsv"
            #end if
            ln -s '${input_file}' 'stacks_inputs/${input_file.element_identifier}${ext}' &&
        #end for

        stacks_summary.py --stacks-prog '$program' --res-dir stacks_inputs --logfile '$logfile' --summary summary.html
    ]]></command>

    <inputs>

        <param name="program" type="select" argument="--stacks-prog" label="Program which generated the stacks">
            <option value="ustacks">ustacks (denovo)</option>
            <option value="pstacks">pstacks (refmap)</option>
        </param>

        <param argument="--logfile" format="txt" type="data" label="Log generated by the program" />

        <param name="input_col" format="tabular,txt" type="data_collection" collection_type="list" label="Output from ustacks or pstacks" />
    </inputs>

    <outputs>
        <data format="html" name="output_summary" label="Summary from ${tool.name} on ${on_string}" from_work_dir="summary.html" />
    </outputs>

    <tests>
        <test>
            <param name="program" value="ustacks"/>
            <param name="logfile" ftype="txt" value="ustacks/ustacks.out"/>
            <param name="input_col">
                <collection type="list">
                    <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" />
                    <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" />
                    <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" />
                    <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" />
                    <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" />
                    <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" />
                    <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" />
                    <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" />
                    <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" />
                    <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" />
                    <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" />
               </collection>
            </param>

            <output name="output_summary">
                <assert_contents>
                    <has_text text="Stacks Statistics" />
                </assert_contents>
            </output>
        </test>
    </tests>

    <help>
<![CDATA[
.. class:: infomark

**What it does**

When given the output of ustacks or pstacks, this will generate a report containing various statistics about the detected stacks in a set of samples.

@STACKS_INFOS@
]]>
    </help>
    <expand macro="citation" />
</tool>