view tools/mytools/resize.xml @ 1:cdcb0ce84a1b

author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
line wrap: on
line source

<tool id="resize" name="resize">
  <command interpreter="python"> $infile  $outfile $expr_start $expr_end $strand </command>
    <param name="infile" format="interval" type="data" label="Original file"/>
    <param name="expr_start" size="20" type="text" value="start-0" label="start=" help="e.g. start+10, start-10, end-100"/>
    <param name="expr_end" size="20" type="text" value="end+0" label="end=" help="e.g. end-100, start+10"/>
    <param name="strand" label="Enforce strandness" type="boolean" truevalue="strand" falsevalue="ignore" checked="False"/>  
    <data format="input" name="outfile" />

**What it does**

This tool changes start and end of each row in an interval file. When strandness is enforced, chromosome start and end are treated as the 5' and 3' end for intervals on the '+' strand, and the opposite for intervals on the '-' strand. In the expression such as 'start=start-1000', 'start' and 'end' are interpreted as the 5' and 3' end, respectively, and the operator '+' and '-' means moving downsteam and upsteam, respectively. For example, when enforcing strandness,

**start=start-1000**: extend 1000 bp on the 5' end (moving start upstream)

**start=start+1000**: trancate 1000 bp on the 5' end (moving start downsteam)

**end=end+1000**: extend 1000 bp on the 3' end (moving end downsteam)

**end=start+1000**: moving the end to 1000 bp downsteam of the start (return the first 1000 bp on the 5' end)

**end=start+1**: taking the 5' end of the interval

**start=end-1**: taking the 3' end of the interval