diff samtools_sort.xml @ 6:191cec7b989b draft

planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
author devteam
date Tue, 13 Oct 2015 12:56:00 -0400
parents 346239545aa0
children 71d5c34fef4e
line wrap: on
line diff
--- a/samtools_sort.xml	Thu Oct 16 12:42:20 2014 -0400
+++ b/samtools_sort.xml	Tue Oct 13 12:56:00 2015 -0400
@@ -1,18 +1,17 @@
-<tool id="samtools_sort" name="sort" version="1.0.3">
-    <requirements>
-        <requirement type="package" version="1.1">samtools</requirement>
-    </requirements>
-    <description>a BAM file</description>
-    <version_command>samtools --version | head -n 1 | awk '{ print $2 }'</version_command>
-    <command>samtools sort $sort_mode "${input1}" -o "${output1}" -O bam -T dataset</command>
-    <stdio>
-        <exit_code range="1:" level="fatal" description="Error" />
-    </stdio>
+<tool id="samtools_sort" name="Sort" version="2.0">
+    <description>BAM dataset</description>
+    <macros>
+    <import>macros.xml</import>
+  </macros>
+  <expand macro="requirements"></expand>
+    <expand macro="stdio"></expand>
+    <expand macro="version_command"></expand>
+    <command>samtools sort $sort_mode -@ \${GALAXY_SLOTS:-1} -o "${output1}" -O bam -T dataset "${input1}"</command>
     <inputs>
         <param name="input1" type="data" format="bam" label="BAM File" />
         <param name="sort_mode" type="select" label="Sort by ">
             <option value="" selected="True">Chromosomal coordinates</option>
-            <option value="-n">Read names</option>
+            <option value="-n">Read names (-n)</option>
         </param>
     </inputs>
     <outputs>
@@ -23,22 +22,19 @@
             <param name="input1" value="1.bam" ftype="bam" />
             <output name="output1" file="1_sort.bam" ftype="bam" sort="True"/>
         </test>
+        <test>
+            <param name="input1" value="1.bam" ftype="bam" />
+            <param name="sort_mode" value="-n"/>
+            <output name="output1" file="1_sort_read_names.bam" ftype="bam" sort="True"/>
+        </test>
     </tests>
     <help>
 
 **What it does**
 
-This tool uses the SAMTools_ toolkit to sort alignments by leftmost coordinates or read names.
-
-.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
-
-------
+This tool uses ``samtools sort`` command to sort BAM datasets in coordinate or read name order.
 
-**Citation**
-
-For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. &lt;http://www.ncbi.nlm.nih.gov/pubmed/19505943&gt;`_
-
-If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
 
     </help>
+    <expand macro="citations"></expand>
 </tool>