This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extracting reads from multiple regions

Hi,

I want to extract reads from bam file using Samtools view from multiple regions.The regions I have are present in the VCF file,which I want to use.So there are not a small number of regions.Is there any way to do this in Samtools view.

for e.g inputting a file in some format in Samtools view?

Thanks

samtools-view samtools
samtools view -b -L ROI.bed  file.bam > ROI_file.bam

1 answer

Hello Ron!

Questions similar to yours can already be found at:

We have closed your question to allow us to keep similar content in the same thread.

If you disagree with this please tell us why in a reply below. We'll be happy to talk about it.

Cheers!

PS: duplicate of "Samtools And Region List"

Hi Pierre,

So,I can input VCF file instead of BED file or I have to do some conversions?

Log in to answer this question.