PacificBiosciences / pbbioconda

PacBio Secondary Analysis Tools on Bioconda. Contains list of PacBio packages available via conda.
BSD 3-Clause Clear License
243 stars 44 forks source link

What's the difference of = and X cigar of pbmm2? #696

Closed leon945945 closed 1 month ago

leon945945 commented 1 month ago

Hi, I saw that pbmm2 substitute the M cigar of minimap2 with = or X #217, and I saw that = and X present together in CIGAR field like this:

133=1X145=1D72=1X

My question is that, = and X both represent match, what's the difference of = and X?

leon945945 commented 1 month ago

And it seems that usually a 1 before X? What is that mean.

zeeev commented 1 month ago

Hi @leon945945,

This is addressed in the sam/bam specification: https://samtools.github.io/hts-specs/SAMv1.pdf

X's represent mismatches, whereas = are a match or mismatch.

leon945945 commented 1 month ago

Thanks, it's clear.