text: user285: I have 7 biological replicate of a normal sample after peak-calling I converted it into bed files and now I want to find what are the common region between those .
  So i tried with bedtool intersect 
  my command is this 
  bedtools intersect -a SRR2920506.filtered.bed -b SRR2920531.filtered.bed SRR2920466.filtered.bed SRR2920478.filtered.bed SRR2920507.filtered.bed SRR2920532.filtered.bed  > answer.bed
  
  it says " the intersect tool can detect overlaps between a single -a file and multiple -b files (instead of just one previously). One simply provides multiple -b files on the command line."
  My doubt is the file that goes to "a" argument is not query which i have to detect overlaps against "b" files as these are all biological replicate. Am i doing the right way?
  Secondly I tried with bedops but the number of overlaps which is reported is really low when i compare the result which i get from bedtools intersect function.
  Any suggestion or help regarding how to intersect multiple would be really appreciated 
  
  user6273: If you want to find the intersection between ALL your bedfiles, you can try multiIntersectBed (available since bedtools 2.14.3).
  It should work like this :
  multiIntersectBed -i SRR2920506.filtered.bed SRR2920531.filtered.bed SRR2920466.filtered.bed SRR2920478.filtered.bed SRR2920507.filtered.bed SRR2920532.filtered.bed  > answer.bed
  
  To sort your bedfiles by chromosome then by start :
  sort -k 1,1 -k2,2n myfile.bed
  
  
original_text: 285: <p>I have 7 biological replicate of a normal sample after peak-calling I converted it into bed files and now I want to find what are the common region between those .</p>
  
  <p>So i tried with bedtool intersect </p>
  
  <pre><code>my command is this 
  bedtools intersect -a SRR2920506.filtered.bed -b SRR2920531.filtered.bed SRR2920466.filtered.bed SRR2920478.filtered.bed SRR2920507.filtered.bed SRR2920532.filtered.bed  &gt; answer.bed
  </code></pre>
  
  <p>it says " the intersect tool can detect overlaps between a single -a file and multiple -b files (instead of just one previously). One simply provides multiple -b files on the command line."</p>
  
  <p>My doubt is the file that goes to "a" argument is not query which i have to detect overlaps against "b" files as these are all biological replicate. Am i doing the right way?</p>
  
  <p>Secondly I tried with <code>bedops</code> but the number of overlaps which is reported is really low when i compare the result which i get from bedtools intersect function.</p>
  
  <p>Any suggestion or help regarding how to intersect multiple would be really appreciated </p>
   6273: <p>If you want to find the intersection between ALL your bedfiles, you can try <code>multiIntersectBed</code> (available since bedtools 2.14.3).</p>
  
  <p>It should work like this :</p>
  
  <pre><code>multiIntersectBed -i SRR2920506.filtered.bed SRR2920531.filtered.bed SRR2920466.filtered.bed SRR2920478.filtered.bed SRR2920507.filtered.bed SRR2920532.filtered.bed  &gt; answer.bed
  </code></pre>
  
  <p>To sort your bedfiles by chromosome then by start :</p>
  
  <pre><code>sort -k 1,1 -k2,2n myfile.bed
  </code></pre>
  