Question: How To Identify/Flag The Presence Of Indels On The Read Level Nearby A Given Position In A Bam File?
2
gravatar for Anders Bergström
6.2 years ago by
Anders Bergström60 wrote:

Let's say I have list of genomic positions, e.g. SNP calls in a VCF file, and a BAM file with read alignments. What would be the best way to, for each of those positions, determine if in the BAM file there are reads with indels either at/overlapping the position, or in the vicinity of the position, say 5 bp upstream or downstream. This is a read level query, it's not indel calling. Basically I want to for a given position consider the ±5 bp window around the position and ask if there are any indels within this window, at the level of reads, and if so count the number of indels in the window.

I think the CIGAR strings of the BAM file probably holds all the information needed, but the question is how to do this in a simple, practical way.

indel cigar bam • 2.4k views
ADD COMMENTlink modified 6.2 years ago by Pierre Lindenbaum120k • written 6.2 years ago by Anders Bergström60
2
gravatar for Pierre Lindenbaum
6.2 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum120k wrote:

You could use the program I previously wrote for biostar. This program produces a XML description of the Reads overlapping a given genomic region. See the CIGAR elements under the 'align' tag.

position of mismatches per read from a sam/bam file

<script src="&lt;a href=" http:="" gist.github.com="" 4356276.js"="" rel="nofollow">http://gist.github.com/4356276.js"></script>

ADD COMMENTlink written 6.2 years ago by Pierre Lindenbaum120k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1571 users visited in the last hour