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

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

<tool id="bwbinavg" name="bigwig summary">
  <description>for intervals</description>
  <command interpreter="python"> $input $output $score_type $bwfile $nbin $strand $outplot $span</command>
      <param name="input" format="interval" type="data" label="Interval file"/>
      <param name="bwfile" format="bigwig" type="data" label="BigWig file"/>
      <param name="score_type" type="select" label="Select score summary type" >
		  <option value="mean" selected="true">mean</option>
		  <option value="max">maximum</option>
		  <option value="min">minimum</option>
		  <option value="std">standard deviation</option>
		  <option value="coverage">coverage:fraction covered</option>
      <param name="nbin" type="integer" value="1" label="number of bins"/>          
        <param name="strand" type="integer" value="0" label="Specify the strand column" help="leave 0 to ignore strand information. Only matters if using more than 1 bin"/>   
        <param name="span" size="10" type="float" value="0.1" label="loess span: smoothing parameter" help="value less then 0.1 disables smoothing"/>
     <data format="pdf" name="outplot" label="${} on ${on_string}[plot]"/>
    <data format="interval" name="output" label="${} on ${on_string}[data]"/>

.. class:: infomark

Each interval is binned and the average base-resolution score/coverage/density in the bigwig file is added as new columns appended at the end of the original file .


If your original data has the following format:


and you choose to divide each interval into 3 bins and return the mean scores of each bin, your output will look like this: