view sortBed.xml @ 45:a1a923cd89e8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit d1ee301a39e9830693eedb6ca089456081540f28
author iuc
date Thu, 02 Mar 2023 08:52:08 +0000
parents 589e7e57fd6d
children 64e2edfe7a2c
line wrap: on
line source

<tool id="bedtools_sortbed" name="bedtools SortBED" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@">
    <description>order the intervals</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools" />
    <expand macro="requirements" />
    <expand macro="stdio" />
    <command><![CDATA[
sortBed
-i '$input'
$option
@GENOME_FILE@
> '$output'
    ]]></command>
    <inputs>
        <param name="input" argument="-i" type="data" format="@STD_BEDTOOLS_INPUTS@" label="Sort the following @STD_BEDTOOLS_INPUT_LABEL@ file" />
        <param name="option" type="select" label="Sort by">
            <!-- sort -k 1,1 -k2,2 -n a.bed -->
            <option value="">chromosome, then by start position (asc)</option>
            <option value="-sizeA">feature size in ascending order.</option>
            <option value="-sizeD">feature size in descending order.</option>
            <option value="-chrThenSizeA">chromosome, then by feature size (asc).</option>
            <option value="-chrThenSizeD">chromosome, then by feature size (desc).</option>
            <option value="-chrThenScoreA">chromosome, then by score (asc).</option>
            <option value="-chrThenScoreD">chromosome, then by score (desc).</option>
        </param>
        <expand macro="input_conditional_genome_file" optional="true" help="Sort according to the chromosomes declared in a genome file" />
    </inputs>
    <outputs>
        <data name="output" format_source="input" metadata_source="input" label="SortBed on ${input.name}"/>
    </outputs>
    <tests>
        <test>
            <param name="input" value="sortBed1.bed" ftype="bed" />
            <param name="option" value="" />
            <output name="output" file="sortBed_result1.bed" ftype="bed" />
        </test>
        <test>
            <param name="input" value="sortBed2.bed" ftype="bed" />
            <param name="option" value="" />
            <output name="output" file="sortBed_result2.bed" ftype="bed" />
        </test>
        <test>
            <param name="input" value="sortBed2.bed" ftype="bed" />
            <param name="option" value="" />
            <conditional name="genome_file_opts">
                <param name="genome_file_opts_selector" value="hist" />
                <param name="genome" value="mm9.len" ftype="bed" />
            </conditional>
            <output name="output" file="sortBed_result3.bed" ftype="bed" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Sorts a feature file by chromosome and other criteria.


.. class:: warningmark

It should be noted that sortBed is merely a convenience utility, as the UNIX sort utility
will sort BED files more quickly while using less memory. For example, UNIX sort will sort a BED file
by chromosome then by start position in the following manner: sort -k 1,1 -k2,2 -n a.bed

@REFERENCES@
    ]]></help>
    <expand macro="citations" />
</tool>