I'd like to output a figure in +/-1kb around a center using computeMatrix 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.


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.

  • $\begingroup$ 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 $\endgroup$
    – Xue Cheng
    Jan 26 '18 at 19:59
  • $\begingroup$ The default is mean, so unless you change it that's what you're getting. $\endgroup$
    – Devon Ryan
    Feb 6 '18 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.