view pretext_map.xml @ 1:02831bf9e95f draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pretext commit 663ac3c3df3458f3bd5f1c9d49b3ebf9cd97f52c"
author iuc
date Thu, 20 May 2021 07:57:57 +0000
parents 7c2e9bc2123b
children 8fef980d48b5
line wrap: on
line source

<tool id="pretext_map" name="PretextMap" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
    <macros>
        <token name="@TOOL_VERSION@">0.1.6</token>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">pretextmap</requirement>
        <requirement type="package" version="1.12">samtools</requirement>
    </requirements>
    <version_command>PretextMap --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
        #if $input.is_of_type("bam"):
            samtools view -h '${input}' |
        #else
            cat '${input}' |
        #end if
        PretextMap
        #if $sorting.sortby == "length":
            --sortby length
            --sortorder $sorting.sortorder
        #elif $sorting.sortby == "name":
            --sortby name
            --sortorder $sorting.sortorder
        #end if
        #if $map_qual:
            --mapq $map_qual
        #end if
        #if $filter.filter_type == "in":
            --filterInclude '$filter.filter_list'
        #elif $filter.filter_type == "out":
            --filterExclude '$filter.filter_list'
        #end if 
        -o output.pretext
    ]]></command>
    <inputs>
        <param name="input" type="data" format="sam,bam" label="Input dataset in SAM or BAM format"/>
        <conditional name="sorting">
            <param argument="--sortby" type="select" label="Sort by">
                <option value="nosort" selected="true">Don't sort</option>
                <option value="length">Length</option>
                <option value="name">Name</option>
            </param>
            <when value="nosort"/>
            <when value="length">
                <param argument="--sortorder" type="select" label="Sort order: ">
                    <option value="ascend">Ascending</option>
                    <option value="decend">Decending</option>
                </param>
            </when>
            <when value="name">
                <param argument="--sortorder" type="select" label="Sort order: ">
                    <option value="ascend">Ascending</option>
                    <option value="descend">Decending</option>
                </param>
            </when>
        </conditional>
        <param name="map_qual" type="integer" label="Minimum mapping quality:" min="0" optional="true"/>
        <conditional name="filter">
            <param name="filter_type" type="select" label="How to filter: ">
                <option value="" selected="true">No filter</option>
                <option value="in">Filter to include only specified sequence names</option>
                <option value="out">Filter to exclude specified sequence names</option>
            </param>
            <when value=""/>
            <when value="in">
                <param name="filter_list" type="text" label="Filter list" help="Comma separated list of sequence names to use as a filter" value="seq_1,seq_2">
                    <sanitizer>
                        <valid initial="string.ascii_letters,string.digits">
                            <add value="_"/>
                            <add value=","/>
                        </valid>
                    </sanitizer>
                </param>
            </when>
            <when value="out">
                <param name="filter_list" type="text" label="Filter list" help="Comma separated list of sequence names to use as a filter" value="seq_1,seq_2">
                    <sanitizer>
                        <valid initial="string.ascii_letters,string.digits">
                            <add value="_"/>
                            <add value=","/>
                        </valid>
                    </sanitizer>
                </param>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="pretext" name="pretext_map_out" from_work_dir="output.pretext" label="${tool.name} on ${on_string}"/>
    </outputs>
    <tests>
        <test>
            <param name="input" ftype="bam" value="test.bam"/>
            <conditional name="sorting">
                <param name="sortby" value="length"/>
                <param name="sortorder" value="ascend"/>
            </conditional>
            <conditional name="filter">
                <param name="filter_type" value="in"/>
                <param name="filter_list" value="ref"/>
            </conditional>
            <param name="map_qual" value="10"/>
            <output name="pretext_map_out" file="output_1.pretext"/>
        </test>
        <test>
            <param name="input" ftype="sam" value="test.sam"/>
            <conditional name="sorting">
                <param name="sortby" value="name"/>
                <param name="sortorder" value="descend"/>
            </conditional>
            <conditional name="filter">
                <param name="filter_type" value="out"/>
                <param name="filter_list" value="chrM,chr8,chr9"/>
            </conditional>
            <output name="pretext_map_out" file="output_2.pretext"/>
        </test>
    </tests>
    <help><![CDATA[

**What is does**

The Paired REad TEXTure Mapper converts aligned read pairs into genome contact maps.
Pretext has no special requirement on the alignment files
process your alignments however you want before feeding to PretextMap.

    ]]></help>
    <citations>
        <citation type="bibtex">
            @misc{Harry_et_al,
            Author={Harry, E},
            title={Paired REad TEXTure Snapshot: Command line image generator for Pretext contact maps.},
            url = {https://github.com/wtsi-hpag/PretextSnapshot},}
        </citation>
    </citations>
</tool>