Use the full MIDNSHP=X string whenever printing CIGAR strings

Define MM_CIGAR_STR to the full string of CIGAR operators (including
the 'B' operator as well) and use it throughout the C code.

It would be possible to use it from the Cython code too, but it's easier
to keep that as a Cython string literal to avoid adding extra runtime
code to handle locale conversion.
This commit is contained in:
John Marshall
2021-04-09 19:34:53 +01:00
committed by Heng Li
parent 459ce04c84
commit 177eef259d
6 changed files with 10 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ cdef class Alignment:
@property
def cigar_str(self):
return "".join(map(lambda x: str(x[0]) + 'MIDNSH'[x[1]], self._cigar))
return "".join(map(lambda x: str(x[0]) + 'MIDNSHP=XB'[x[1]], self._cigar))
def __str__(self):
if self._strand > 0: strand = '+'