Answers.Body: <p>Please don't send things like this to the deepTools mailing list and post them here.</p>
  
  <p>As I mentioned on the list, what you're likely being surprised by is that computeMatrix is not summing values, but taking the average in each bin. You can change this with the <code>--averageTypeBins</code> option (the default is <code>mean</code>, you presumably want <code>sum</code>).</p>
  
  <p><strong>Update</strong>: For those wondering the cause of the confusion was due to not using <code>--missingDataAsZero</code>. In other words, including or not including NAs will lead to different results, since different numbers of values will be included.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-26T19:59:49.103Z
Answers.Text: Hi, Ryan,
       The plot for is bin window=10bp to average in another way is attached. Please note the y-axis. The peak (>0.2) is much larger than the one (~0.05) with binsize=10bp from computeMatrix. I'm confused on this. Is the value in with binsize=10bp from computeMatrix really mean or median or some other ways?
      sorry I can not attach the figure here.
      Thanks
Answers.UserDisplayName: Xue Cheng
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-06T17:56:47.557Z
Answers.Text: The default is `mean`, so unless you change it that's what you're getting.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-26T18:42:38.913Z
Answers.LastActivityDate: 2018-01-27T11:54:34.637Z
Answers.LastEditDate: 2018-01-27T11:54:34.637Z
Answers.UserDisplayName: Devon Ryan
Body: <p>I'd like to output a figure in +/-1kb around a center using <a href="http://deeptools.readthedocs.io/en/latest/content/tools/computeMatrix.html" rel="nofollow noreferrer">computeMatrix</a> as following command:  </p>
  
  <pre><code>computeMatrix reference-point -S data.bw -R centers.bed -a 1000 -b 1000 -bs=10 -out newdata10.gz --referencePoint center
  </code></pre>
  
  <p>The bed file is like:</p>
  
  <pre><code>chr1 100 101
  </code></pre>
  
  <p>If I change <code>-bs=1</code>, two outputs of the same input newdata10.gz are quite different. Which's correct with my commands? Maybe I don't understand the meaning of binsize option. </p>
  
Tags: <deeptools>
Title: Different outputs of computeMatrix depending on binsize
ThreadText: # Different outputs of computeMatrix depending on binsize
  
  (Asked by: username_0 on 2018-01-26)
  
  I'd like to output a figure in +/-1kb around a center using [computeMatrix](http://deeptools.readthedocs.io/en/latest/content/tools/computeMatrix.html) as following command:
  
  ```
  computeMatrix reference-point -S data.bw -R centers.bed -a 1000 -b 1000 -bs=10 -out newdata10.gz --referencePoint center
  
  ```
  
  The bed file is like:
  
  ```
  chr1 100 101
  
  ```
  
  If I change `-bs=1`, two outputs of the same input newdata10.gz are quite different. Which's correct with my commands? Maybe I don't understand the meaning of binsize option.
  
  **Tags:** deeptools
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-26. Score: 1
  
  Please don't send things like this to the deepTools mailing list and post them here.
  
  As I mentioned on the list, what you're likely being surprised by is that computeMatrix is not summing values, but taking the average in each bin. You can change this with the `--averageTypeBins` option (the default is `mean`, you presumably want `sum`).
  
  **Update**: For those wondering the cause of the confusion was due to not using `--missingDataAsZero`. In other words, including or not including NAs will lead to different results, since different numbers of values will be included.
  
  > **Comments:**
  > **username_0**: Hi, username_1,      The plot for is bin window=10bp to average in another way is attached. Please note the y-axis. The peak (>0.2) is much larger than the one (~0.05) with binsize=10bp from computeMatrix. I'm confused on this. Is the value in with binsize=10bp from computeMatrix really mean or median or some other ways?     sorry I can not attach the figure here.     Thanks  
  > **username_1**: The default is `mean`, so unless you change it that's what you're getting.  
  
  ---
  
  