view bed_sort_with_header.xml @ 1:9ac963d8d5a3 default tip

author xuebing
date Sat, 31 Mar 2012 23:24:58 -0400
parents 4f17738e0254
line wrap: on
line source

<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    
     <param name="input" type="data" format="bed" label="Input interval file"/>
     <param name="skip" type="integer" value="1" label="top lines to skip" help="output directly, not sorted"/>
    <data format="bed" name="output" />


Unix command used::

    head -n $skip $input > $output
    tail -n+`expr $skip + 1` $input | sort -k1,1 -k2,2g >> $output