changeset 0:4f17738e0254

Uploaded
author xuebing
date Sat, 31 Mar 2012 14:03:03 -0400
parents
children 9ac963d8d5a3
files bed_sort_with_header.xml
diffstat 1 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bed_sort_with_header.xml	Sat Mar 31 14:03:03 2012 -0400
@@ -0,0 +1,23 @@
+<tool id="bed_sort_with_header" name="bed_sort_with_header">
+  <description>sort intervals with header lines</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>