I'm trying to write code to index BAM files, and picard ValidateSamFile is complaining about some index bin values, and I'm not sure why. The algorithm I'm using to generate the bin index is:
if read is mapped: reg2bin(pos, pos + len)
else if mate is mapped: reg2bin(mate_pos, mate_pos + 1)
else: reg2bin(-1, 0)
Are there other criteria?
For example, in some cases samtools index on the same file uses reg2bin(mate_pos, mate_pos+1), even though the are both mapped with high confidence.
Thanks,
Ravi Pandya
Microsoft Research
if read is mapped: reg2bin(pos, pos + len)
else if mate is mapped: reg2bin(mate_pos, mate_pos + 1)
else: reg2bin(-1, 0)
Are there other criteria?
For example, in some cases samtools index on the same file uses reg2bin(mate_pos, mate_pos+1), even though the are both mapped with high confidence.
Thanks,
Ravi Pandya
Microsoft Research