I'm leveraging minimap2 to map select genes from short-read microbial fastq metagenomics zip files.
minimap2 --heap-sort=yes --splice-flank=no metagenome.fastq.gz fastaDB.fas
What I noticed is the low tolerance of mismatch when I need to maximise mismatch because microbes have loads of genetic diversity. Thus the collection of references sequences are never really a reference, in fact the "microbe reference genome" is a misnomer, because in situ diversity of microbes is huge.
Question How do you relax the mapping stringency criteria for minimap2? If you are familiar with Blast parameters this would help alot here. I know blast but I've never parameterised it.
The options are this are:
-A Matching score 
-B INT Mismatching penalty 
-O INT1[,INT2] Gap open penalty [4,24].
-s INT Minimal peak DP alignment score to output .
--score-N INT Score of a mismatch involving ambiguous bases 1
Anything else that is relevant.
Note, -f is a famous option, not sure it helps here.
I'm going to code up a hyperparameterisation unit-test, but understanding the parameters first would really, really help.
Alternative approaches welcome as well.
Plugging minimap2. I code high performance (hadoop-style, back-tracking, graph, traverse tall buildings in a stride etc ...). The coder that wrote minimap has knowledge beyond, i.e. very fast run times directly from gzip file. I assume they are indexing then chunking the raw zip file then unzipping each 'chunk' JIT (just in time).
Thanks @MaximilianPress great answer. I'll fill in the backstory.
I'm trapping total genetic diversity across Genbank and the metagenomes. My protocol to do both:
- Blasting out Genbank and then
- piping the output across metagenomes via in this case minimap2.
Hence speed is key. So I ain't replacing Blast with minimap2 but leveraging minimap2 via the output of blast.
However on reflection of @MaximilianPress's discussion the answer is to generate a gold standard of diversity to assess alternative approaches.