diff mytools/bedsort.xml @ 9:87eb5c5ddfe9

Uploaded
author xuebing
date Fri, 09 Mar 2012 20:01:43 -0500
parents f0dc65e7f6c0
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mytools/bedsort.xml	Fri Mar 09 20:01:43 2012 -0500
@@ -0,0 +1,23 @@
+<tool id="bedsort" name="sort">
+  <description>a interval file by chr and start</description>
+  <command> head -n $skip $input > $output
+  &amp;&amp; tail -n+`expr $skip + 1` $input | sort -k1,1 -k2,2g >> $output    
+  </command>
+  <inputs>
+     <param name="input" type="data" format="bed" label="Input interval file"/>
+     <param name="skip" type="integer" value="0" label="top lines to skip" help="output directly, not sorted"/>
+  </inputs>
+  <outputs>
+    <data format="bed" name="output" />
+  </outputs>
+  <help>
+
+**Description**
+
+Unix command used::
+
+    head -n $skip $input > $output
+    tail -n+`expr $skip + 1` $input | sort -k1,1 -k2,2g >> $output
+
+  </help>
+</tool>