fedarko / strainFlye

Pipeline for analyzing (rare) mutations in metagenome-assembled genomes
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Switch minimap2 alignment preset based on installed version? #23

Closed fedarko closed 2 years ago

fedarko commented 2 years ago

See https://github.com/lh3/minimap2 -- asm20 (what we currently use) is the best option for HiFi reads in earlier versions of minimap2 (v2.18 or earlier), but map-hifi should be used for later versions (v2.19 or later).

From looking at the code:

https://github.com/lh3/minimap2/blob/e25aa5ee74dda69031ac53d8aca192e4e050164e/options.c#L108-L130

... It seems like the parameters adjusted based on these settings are slightly different. However, if we use map-hifi, this would instantly fix the minimum minimap2 version to 2.19, and I'm not sure that is worth it.

A solution to this minor dilemma: detect the minimap2 version, and then see if we can use map-hifi; if not, use asm20 (and mention this in the logging output).