Extract Reads From A Bam File That Fall OUTSIDE A Given Region
Using samtools view -L FILE command we can extract reads which are in the FILE regions. Is there a way to extract reads which are OUTSIDE of the FILE regions?
Thanks
• 1,030 views
•
link
1 answer
samtools view -L in.bed --unoutput out.bam in.bam > /dev/null
• 0 views
•
link
Log in to answer this question.
I would suggest 2 options: 1) Create a bed file with the complementary regions to your current region file and run samtools with that new bed file. 2) Use
bedtools intersect, applying-vargument.