view pretext_map.xml @ 3:d256a51a656b draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pretext commit 66f812cf66b8e2f26ca4c4a607c621576ce4ed42"
author iuc
date Mon, 13 Sep 2021 10:49:00 +0000
parents 8fef980d48b5
children bbe19ef04a74
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.8</token>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">pretextmap</requirement>
        <requirement type="package" version="1.13">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>