text: user8543: I have 3 histone marks,I have used Macs2 for peak calling and diffBind to analyze the peaks. I was wondering if you know any way to calculate the peak numbers of one specific histone mark that occur for example within 2kb of peaks belong to another histone mark.
  Much appreciated
  
  user4017: You can use windowBed from bedtools with -c if you just want counts. Or use -wa -wb and then use groupBy for any other operations.
  
original_text: 8543: <p>I have 3 histone marks,I have used Macs2 for peak calling and diffBind to analyze the peaks. I was wondering if you know any way to calculate the peak numbers of one specific histone mark that occur for example within 2kb of peaks belong to another histone mark.<br />
  Much appreciated</p>
   4017: <p>You can use <a href="https://bedtools.readthedocs.io/en/latest/content/tools/window.html" rel="nofollow noreferrer">windowBed</a> from bedtools with <code>-c</code> if you just want counts. Or use <code>-wa</code> <code>-wb</code> and then use <a href="https://bedtools.readthedocs.io/en/latest/content/tools/groupby.html" rel="nofollow noreferrer">groupBy</a> for any other operations.</p>
  