mirror of
https://github.com/lh3/minimap2.git
synced 2026-09-15 13:07:55 +08:00
mappy creates a CIGAR string by default (`-c` flag) and so is incompatible with indexes that are created using the `--idx-no-seq` flag. The previous implementation of mappy did not check for the `MM_I_NO_SEQ` flag and would seg fault when attempting to map a read or retrieve a reference sequence from the index. This patch adds a check to both `mappy.Aligner.seq` and `mappy.Aligner.map` and returns `None` if there is no index sequences. I've chose `None` as this is inline with the behaviour of mappy for reads that do not align/retreiving sequences that aren't in the index, however it might be better to raise an exception so that this error is distinct and can be communicated to the caller.
8.6 KiB
8.6 KiB