title: Common genomic intervals in R
body: <p>I would like to infer shared genomic interval between different samples.</p>
  
  <p>My input:</p>
  
  <pre><code>sample    chr start end
  NE001      1   100  200
  NE001      2   100  200
  NE002      1   50   150
  NE002      2   50   150
  NE003      2   250  300
  </code></pre>
  
  <p>My expected output:</p>
  
  <pre><code>chr start end  freq
  1    100  150   2
  2    100  150   2
  </code></pre>
  
  <p>Where the "freq" is the how many samples have contribuited to infer the shared region. In the above example freq = 2 (NE001 and NE002).</p>
  
  <p>Cheers! </p>