Identify and count gaps in sam/bam files
Is there a straightforward way to identify and tally the gaps in a sam/bam file created by bwa? A glance at the mapping using IGV suggests that there are virtually no gaps in a mapping that I recently generated, which is problematic. I would like to know if there are any gaps at all.
Is there some way to doing this using a samtools function, or perhaps some other application?
• 1,426 views
•
link
0 answers
No answers yet.
Log in to answer this question.
And with gap, you mean a portion of the genome that has no aligned reads?
I'm referring to gaps corresponding to indels.
You need to do variant calling.
samtools depth -aashould do what you're after. It outputs a tab de limited file. Then use your favorite tool to compute visualize.