comparison Sambamba_sort.xml @ 0:78136e47065d draft default tip

planemo upload for repository https://github.com/biod/sambamba commit 99bb4ed496a9cce79ab0a7e613230cf63a44d9f9
author bgruening
date Mon, 10 Feb 2025 19:11:53 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:78136e47065d
1 <tool id="sambamba_sort" name="Sambamba sort" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="23.2" license="MIT">
2 <description>Tool to sort BAM files</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <command detect_errors="exit_code"><![CDATA[
8 sambamba sort
9 -o '${output}'
10 $sort_order
11 #if $filter
12 -F '${filter}'
13 #end if
14 -l $compression_level
15 '${input_bam}'
16 --tmpdir '\${TMPDIR:-.}'
17 --nthreads \${GALAXY_SLOTS:-4}
18 ]]></command>
19 <inputs>
20 <param name="input_bam" type="data" format="qname_input_sorted.bam,qname_sorted.bam,bam" label="Input BAM file"/>
21 <param name="sort_order" type="select" label="Select sorting mode">
22 <option value="" selected="true">Coordinate based</option>
23 <option value="-n">Sort by read name lexicographically</option>
24 </param>
25 <param argument="--compression-level" type="integer" value="5" min="0" max="9" label="Level of compression for merged BAM file, number from 0 to 9"/>
26 <param argument="--filter" type="text" optional="true" label="Keep only reads that satisfy this filter" help="You could select reads spanning a targeted region, by using the following filter: chr6:1000-5000"/>
27 </inputs>
28 <outputs>
29 <data name="output" format="bam">
30 <change_format>
31 <when input="sort_order" value="-n" format="qname_sorted.bam"/>
32 </change_format>
33 </data>
34 </outputs>
35 <tests>
36 <!--Test case of QNAME sorted BAM file-->
37 <test expect_num_outputs="1">
38 <param name="input_bam" value="1.bam" ftype="bam"/>
39 <param name="compression_level" value="5"/>
40 <param name="sort_order" value="-n"/>
41 <output name="output" file="1.qname.sorted.bam" ftype="qname_sorted.bam" lines_diff="4"/>
42 </test>
43 <!--Test case of Coordinate sorted BAM file-->
44 <test expect_num_outputs="1">
45 <param name="input_bam" value="1.bam" ftype="bam"/>
46 <param name="compression_level" value="5"/>
47 <param name="sort_order" value=""/>
48 <output name="output" file="1.coord.sorted.bam" ftype="bam" lines_diff="4"/>
49 </test>
50 </tests>
51 <help>
52 <![CDATA[
53
54 Sambamba sort performs sorting of BAM files.
55
56 BAM files can have either 'coordinate' or 'qname' sort order.
57 - 'coordinate' sorting order : Sorts Reads by (integer) reference ID, and for each reference sort corresponding reads by start coordinate.
58 - 'qname' sorting order : Reads are sorted lexicographically by their names.
59
60 ]]>
61 </help>
62 <expand macro="citations"/>
63 </tool>