philres / ngmlr

NGMLR is a long-read mapper designed to align PacBio or Oxford Nanopore (standard and ultra-long) to a reference genome with a focus on reads that span structural variations
MIT License
293 stars 40 forks source link

Tag NM in SAM #72

Closed Wuxy96 closed 4 years ago

Wuxy96 commented 4 years ago

Hi,

I got the output of ngmlr, and I have a question about NM in SAM file. does that mean the sum of insertion,deletion and mismatch of a alignment? if CIGAR=23S19M1I15M1I12M1I30M1D17M1D50M63S, and NM=22, so the count of mismatch is 22-1-1-1-1-1=17?

Thanks

fritzsedlazeck commented 4 years ago

Exactly, but the CIGAR does not encode mismatches. M is for both matches and mismatches by definition.

Thanks Fritz