Hi,
I am trying to use Minimap2 for alignment and subsequent SV calling with Sniffles. Minimap2 works just fine without the --MD option, but if I include this option I get the following error:
minimap2: format.c:190: write_MD_core: Assertion `op >= 0 && op <= 2' failed.
I have tested minimap2 versions 2.12-r827 and 2.13-r850. This is my command:
minimap2 --MD -x map-pb -a -t $PBS_NUM_PPN --eqx -L -O 5,56 -E 4,1 -B 5 --secondary=no -z 400,50 -r 2k -Y -R "@RG\tID:rg1a\tSM:sample1" $REF $READS | samtools sort -@ $PBS_NUM_PPN -o minimap_sort.bam
I know about the samtools calmd option, but I wondered if there is a way to make minimap include the MD tag natively.
Thanks,
Guilherme
The current format.c:190 is:
assert(op >= 0 && op <= 3);
Perhaps you are using a wrong version. Nonetheless, it is still strange that you see this given that you are not using the splice mode.
@gbdias the current version is 2.13 --- see https://github.com/lh3/minimap2/releases
FWIW --MD just works for our data. We do not run it with that specific combination of options though.
2.12-r827 and 2.13-r850.This could be a hidden bug, but I need an example. You may run minimap2 with
minimap2 -t1 --print-qname
Then you can find the name of the read that triggers the assertion failure. Thanks.
I found a read which replicates this with the settings described by @gbdias cullprit_35972.fastq.txt
NA19240, PromethION
What's the genome? And what's the command line? Thanks. Tried on GRCh38 with -a -x map-ont --MD. Didn't see the assertion failure.
Oh, I see now. With @gbdias' command line.
This is a bug as --eqx and --MD/--cs don't work together. Now fixed via 9ed56b4. Thanks.