changeset 0:87c1b543c4c4 draft default tip

planemo upload for repository https://github.com/biod/sambamba commit 13ed0b409cf2c5de007e0a6fa93391cbbb21795d
author bgruening
date Wed, 12 Jun 2024 15:01:40 +0000
parents
children
files Sambamba_sort.xml macros.xml test-data/1.bam test-data/1.coord.sorted.bam test-data/1.qname.sorted.bam test-data/2.bam test-data/2.markdup.bam test-data/2.markdup_removed.bam test-data/coordinate_sorted.bam test-data/coordinate_sorted_merged.bam test-data/qname_sorted.bam test-data/qname_sorted_merged.bam
diffstat 12 files changed, 80 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sambamba_sort.xml	Wed Jun 12 15:01:40 2024 +0000
@@ -0,0 +1,63 @@
+<tool id="sambamba_sort" name="Sambamba sort" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="23.2" license="MIT">
+    <description>Tool to sort BAM files</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+        sambamba sort 
+            -o '${output}'
+            $sort_order
+            #if $filter
+                -F '${filter}'
+            #end if 
+            -l $compression_level
+            '${input_bam}'
+            --tmpdir '\${TMPDIR:-.}'
+            --nthreads \${GALAXY_SLOTS:-4}
+    ]]></command>
+    <inputs>
+        <param name="input_bam" type="data" format="qname_input_sorted.bam,qname_sorted.bam,bam" label="Input BAM file"/>
+        <param name="sort_order" type="select" label="Select sorting mode">
+            <option value="" selected="true">Coordinate based</option>
+            <option value="-n">Sort by read name lexicographically</option>
+        </param>
+        <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"/>
+        <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"/>
+    </inputs>
+    <outputs>
+        <data name="output" format="bam">
+            <change_format>
+                <when input="sort_order" value="-n" format="qname_sorted.bam"/>
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <!--Test case of QNAME sorted BAM file-->
+        <test expect_num_outputs="1">
+            <param name="input_bam" value="1.bam" ftype="bam"/>
+            <param name="compression_level" value="5"/>   
+            <param name="sort_order" value="-n"/> 
+            <output name="output" file="1.qname.sorted.bam" ftype="qname_sorted.bam" lines_diff="4"/>
+        </test>
+        <!--Test case of Coordinate sorted BAM file-->
+        <test expect_num_outputs="1">
+            <param name="input_bam" value="1.bam" ftype="bam"/>
+            <param name="compression_level" value="5"/>   
+            <param name="sort_order" value=""/> 
+            <output name="output" file="1.coord.sorted.bam" ftype="bam" lines_diff="4"/>
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+
+Sambamba sort performs sorting of BAM files.
+
+BAM files can have either 'coordinate' or 'qname' sort order.
+  - 'coordinate' sorting order : Sorts Reads by (integer) reference ID, and for each reference sort corresponding reads by start coordinate.
+  - 'qname' sorting order : Reads are sorted lexicographically by their names.
+
+]]>
+    </help>
+    <expand macro="citations"/>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Jun 12 15:01:40 2024 +0000
@@ -0,0 +1,17 @@
+<macros>
+    <token name="@TOOL_VERSION@">1.0.1</token>
+    <token name="@SUFFIX_VERSION@">1</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="1.0.1">sambamba</requirement>
+            <yield/>
+        </requirements>
+    </xml>
+    
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1093/bioinformatics/btv098</citation>
+            <yield />
+        </citations>
+    </xml>
+</macros>
Binary file test-data/1.bam has changed
Binary file test-data/1.coord.sorted.bam has changed
Binary file test-data/1.qname.sorted.bam has changed
Binary file test-data/2.bam has changed
Binary file test-data/2.markdup.bam has changed
Binary file test-data/2.markdup_removed.bam has changed
Binary file test-data/coordinate_sorted.bam has changed
Binary file test-data/coordinate_sorted_merged.bam has changed
Binary file test-data/qname_sorted.bam has changed
Binary file test-data/qname_sorted_merged.bam has changed