minimap2
minimap2 copied to clipboard
Mappy fails when using MD tag
Here you can find two sequences. If you align them directly using minimap2
minimap2 -ax asm20 1.fa 2.fa --MD -o test.sam
it works without problems.
If you run it in mappy, specifically with preset='asm20' and with MD=True, it fails with segmentation fault.
import mappy
def load_seq(filename):
with open(filename) as inp:
next(inp)
return ''.join(map(str.strip, inp))
seq1 = load_seq('1.fa')
seq2 = load_seq('2.fa')
aln = mappy.Aligner(seq=seq1, preset='asm20')
list(aln.map(seq=seq2))
print('It worked (1)')
list(aln.map(seq=seq2, MD=True))
print('It worked (2)')
will give
It worked (1)
[1] 16112 segmentation fault (core dumped) ./test.py