Skip to content

minimap2

Peter Ebert edited this page Jan 25, 2023 · 2 revisions
author date tags
PE 2023-01-19 software, minimap2, control, parameters

minimap2

Default long read and contig aligner.

Citable sources

  • 2021 (v2.19+) update:
    Heng Li, New strategies to improve minimap2 alignment accuracy
    Bioinformatics, Volume 37, Issue 23, 1 December 2021, Pages 4572–4574
    
  • 2018 initial release:
    Heng Li, Minimap2: pairwise alignment for nucleotide sequences
    Bioinformatics, Volume 34, Issue 18, 15 September 2018, Pages 3094–3100
    

FAQ

Can minimap2 be forced to produce non-overlapping alignments?

Yes, in the query (= the read or contig being aligned). The following options control this behavior (at least since minimap2 v2.23):

"Segments on a query may overlap by up to 50%.
The threshold is controlled by -M/--mask-level.
[...]
Minimap2 has another heuristic hard coded
to avoid leaving long query sequences unmapped."

(changed in r846: added --hard-mask-level for #244

Man page v2.23 (r1111)

-M FLOAT:
    Mark as secondary a chain that overlaps with a better chain
    by FLOAT or more of the shorter chain [0.5]
--hard-mask-level:
    Honor option -M and disable a heurstic to save unmapped
    subsequences and disables --mask-len.
--mask-len NUM:
    Keep an alignment if dropping it leaves an unaligned region
    on query longer than INT [inf].
    Effective without --hard-mask-level.

Setting -M 0 --hard-mask-level enforces non-overlapping intervals on the query.

Sources:

What definition of sequence identity is implemented in minimap2?

Minimap2 outputs the Gap-compressed identity at the de:f tag. This type of sequence identity compresses consecutive gaps and counts them as one difference; e.g., A---C is counted as this A-C.