text: user2186: I have a very large bam file and I want to filter it to keep only a handfull of positions as defined in a bed file. Can I do this with sambamba or do i need another tool?
  Thanks
  
  user2186: I think it is possible:
  sambamba view --regions regions.bed --with-header --format=bam reads.bam  > filtered.bam
  
  
original_text: 2186: <p>I have a very large bam file and I want to filter it to keep only a handfull of positions as defined in a bed file. Can I do this with sambamba or do i need another tool?</p>
  <p>Thanks</p>
   2186: <p>I think it is possible:</p>
  <pre><code>sambamba view --regions regions.bed --with-header --format=bam reads.bam  &gt; filtered.bam
  </code></pre>
  