Entering edit mode
5.3 years ago
xiaoguang
▴
160
How to get an exact match from the bam comparison file, it is well known that M in the cigar character is completely consistent or there is mismatch, but how do I get a completely consistent sequence?
That is not true, a M can also be a mismatch as xiaoguang correctly says. M only says that these was neither insertion nor deletion but a single base found at that position. A possible strategy could be no check the MD tag which should contain the position of mismatches. If it is 0 there should not be one, check the SAM documentation and other threads to confirm this https://samtools.github.io/hts-specs/SAMtags.pdf
Thanks for the clarification. So for the example, we should expect it as MD:Z:100 ?
https://samtools.github.io/hts-specs/SAMtags.pdf says