This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bam file to bed fie

Excuse me:

I got bam file from targeted resequencing. So how do I know the start and end region from the bam file?

Thanks for your help.

sequence-alignment next-gen-sequencing

1 answer

You won't know the exact boundaries since some reads will extend beyond the targeted region(s). But you should get a rough idea.

So how could i get the position range?

You can parse the BAM file and look at the POS/TLEN fields. If this is a common genome, with a BED annotation file available, then you could use coverageBED from BEDTools to get a rough idea of what regions are covered.

Log in to answer this question.