What does the indel field of bam_pileup1_t mean?
2
0
Entering edit mode
9.9 years ago
kettleg ▴ 30

In the bam_pileup1_t struct there are two fields, is_del and indel. I think I understand is_del, it means that the read has a deletion at that point in the reference (corresponds to * in the mpileup output). But what does indel mean?

samtools c bam • 2.2k views
ADD COMMENT
2
Entering edit mode
9.9 years ago
kettleg ▴ 30

OK, I now understand. It's funny when you finally ask the question the answer can suddenly become clear. is_del = 1 means that at this position right here the current padded read is a deletion. indel = -k where k > 0 means that the current read is a deletion at the next k reference positions. indel = k where k > 0 makes more sense, it means there is an insertion in the current read between this position and the next position.

ADD COMMENT
0
Entering edit mode

Exactly.

ADD REPLY
0
Entering edit mode
9.9 years ago

From the source code:

@field  indel  indel length; 0 for no indel, positive for ins and negative for del
@field  is_del 1 iff the base on the padded read is a deletion
ADD COMMENT
1
Entering edit mode

So what's the difference between indel < 0 and is_del = 1?

ADD REPLY

Login before adding your answer.

Traffic: 1884 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6