view stacks_sstacks.xml @ 1:e58e2ecb6285 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit c300b84615660459bb0020fa74ccd3b874d329a4"
author iuc
date Mon, 30 Sep 2019 14:14:39 -0400
parents b7babdb3c219
children 0b8c84a7fdb5
line wrap: on
line source

<tool id="stacks2_sstacks" name="Stacks2: sstacks" profile="@PROFILE@" version="@STACKS_VERSION@+galaxy@WRAPPER_VERSION@">
    <description>Match samples to the catalog</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_cmd"/>
    <command detect_errors="aggressive"><![CDATA[
#import re

mkdir stacks_inputs stacks_outputs

&&

@LINK_STACKS_INPUT@
@LINK_CAT_INPUT@

sstacks

-p \${GALAXY_SLOTS:-1}

#if $popmap
    -P stacks_inputs
    -M '$popmap'
#else
    -c stacks_inputs/
    #for $sample in $samples
        -s 'stacks_inputs/$sample'
    #end for
    -o stacks_outputs
#end if

$x

@GAP_OPTIONS_ONOFF@
@TEE_APPEND_LOG@
@CAT_LOG_TO_STDERR@

#if $popmap
    ## When using a popmap, stacks write to the input dir
    && mv stacks_inputs/*matches.tsv stacks_outputs/
#end if
    ]]></command>

    <inputs>
        <expand macro="input_stacks_macro"/>
        <expand macro="input_cat_macro"/>
        <param name="popmap" type="data" format="tabular,txt" label="Population map" help="If set, matching will be done only for samples listed in this file" optional="true" argument="-M" />
        <param argument="-x" type="boolean" checked="true" truevalue="" falsevalue="-x" label="Verify haplotype of matching locus" />
        <expand macro="gap_options_onoff"/>
        <expand macro="in_log"/>
    </inputs>

    <outputs>
        <expand macro="out_log"/>
        <expand macro="sstacks_outputs_macro"/>
    </outputs>

    <tests>
        <!-- test w default parameters and popmap -->
        <test>
            <param name="input_cat">
                <collection type="list">
                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
               </collection>
            </param>
            <param name="input_stacks">
                <collection type="list">
                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
               </collection>
            </param>
            <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" />
            <param name="add_log" value="yes" />
            <assert_command>
                <not_has_text text="-x" />
                <not_has_text text="--disable-gapped" />
                <has_text text="-M" />
            </assert_command>
            <output name="output_log" ftype="txt" file="sstacks/sstacks.log"/>
            <output_collection name="matches" type="list">
                <element name="PopA_01.matches" file="sstacks/PopA_01.matches.tsv" ftype="tabular" lines_diff="2"/>
                <element name="PopA_02.matches" file="sstacks/PopA_02.matches.tsv" ftype="tabular" lines_diff="2"/>
            </output_collection>
        </test>
        <!-- test w default parameters -->
        <test>
            <param name="input_cat">
                <collection type="list">
                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
               </collection>
            </param>
            <param name="input_stacks">
                <collection type="list">
                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
               </collection>
            </param>
            <param name="add_log" value="yes" />
            <assert_command>
                <not_has_text text="-x" />
                <not_has_text text="--disable-gapped" />
                <not_has_text text="-M" />
            </assert_command>
            <output name="output_log" ftype="txt"><assert_contents><has_text text="done." /></assert_contents></output>
            <output_collection name="matches" type="list" count="2">
                <element name="PopA_01.matches"><assert_contents><has_text text="generated on " /></assert_contents></element>
                <element name="PopA_02.matches"><assert_contents><has_text text="generated on " /></assert_contents></element>
            </output_collection>
        </test>

        <!-- test w non default parameters and popmap-->
        <test>
            <param name="input_cat">
                <collection type="list">
                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
               </collection>
            </param>
            <param name="input_stacks">
                <collection type="list">
                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
               </collection>
            </param>
            <param name="gapped|use_gapped" value="yes" />
            <param name="x" value="-x" />
            <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" />
            <param name="add_log" value="yes" />
            <assert_command>
                <has_text text="-x" />
                <not_has_text text="--disable-gapped" />
                <has_text text="-M" />
            </assert_command>
            <output name="output_log" ftype="txt"><assert_contents><has_text text="done." /></assert_contents></output>
            <output_collection name="matches" type="list" count="2">
                <element name="PopA_01.matches"><assert_contents><has_text text="generated on " /></assert_contents></element>
                <element name="PopA_02.matches"><assert_contents><has_text text="generated on " /></assert_contents></element>
            </output_collection>
        </test>
    </tests>

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

**What it does**

Sets of stacks constructed by ustacks can be searched against a catalog produced by cstacks. In the case of a genetic map, stacks from the progeny would be matched against the catalog to determine which progeny contain which parental alleles.

--------

**Input files**

Output from denovo_map, refmap or cstacks/ustack

**Output files**

- XXX.tags.tsv file:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

Notes: For the tags file, each stack will start in the file with a consensus sequence for the entire stack followed by the flags for that stack. Then, each individual read that was merged into that stack will follow. The next stack will start with another consensus sequence.


- XXX.snps.tsv file:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.


- XXX.alleles.tsv file:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

- XXX.matches.tsv file:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

Notes: Each line in this file records a match between a catalog locus and a locus in an individual, for a particular haplotype. The Batch ID plus the Catalog ID together represent a unique locus in the entire population, while the Sample ID and the Stack ID together represent a unique locus in an individual sample.

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