Question: How To Identify/Flag The Presence Of Indels On The Read Level Nearby A Given Position In A Bam File?
gravatar for Anders Bergström
7.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.7k views
ADD COMMENTlink modified 7.2 years ago by Pierre Lindenbaum128k • written 7.2 years ago by Anders Bergström60
gravatar for Pierre Lindenbaum
7.2 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum128k 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:="""" 4356276.js"="" rel="nofollow">"></script>

ADD COMMENTlink written 7.2 years ago by Pierre Lindenbaum128k
Please log in to add an answer.


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