minimap2 will not run with --MD option

Created on 25 Oct 2018  路  9Comments  路  Source: lh3/minimap2

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

bug

All 9 comments

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.

  • Hi @lh3, that error message is from 2.12, which is what comes with the pbsv bioconda install. When I run using 2.13 I get an error like you posted.
  • Hi @tseemann, I have tried with both 2.12-r827 and 2.13-r850.
  • @wdecoster, the set of options I am using is what PacBio recommends for their SV detection pipeline pbsv. Although pbsv does not require the MD tag, I would like to use the same alignment for both pbsv and Sniffles.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fbemm picture fbemm  路  5Comments

tramaraj picture tramaraj  路  4Comments

SouthernCD picture SouthernCD  路  3Comments

aniram118 picture aniram118  路  5Comments

pterzian picture pterzian  路  3Comments