I have been using minimap2 for a few month now and I just found a code that follow these steps :

minimap2 [-x preset] -d target.mmi target.fa
minimap2 -a [-x preset] target.mmi query.fa > output.sam

when I never saw this .mmi index. I always went directly like this :

minimap2 -a [-x preset] target.fa query.fastq > output.sam

So my question is why should I index my reference genome before mapping ? Meaning is it only for speed up ? Will it up speed my code if I do it ? Or it is already done without specifying it ?

  • $\begingroup$ It's a suggestion for reducing the mapping time. It's the same approach like others mappers e.g. BWA, Bowtie2, etc. $\endgroup$
    – zorbax
    Mar 4 '20 at 14:49

If you don't provide an index, minimap2 will just generate the index on the fly (so, yes, it's done without specifying it). As such the mapping step will take longer. However, index generation is supposed to be very fast in minimap2 (a few minutes for the human genome), so it probably won't matter much.

Doing it separately will therefore also not speed up your code unless you end up using the pre-generated index multiple times.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.