Allowing bowtie2 memory mapping in metaphlan

Hi,

Like probably many users we often run metaphlan on large numbers of samples in parallel. Bowtie2 has a cool feature where it is able to share the database in memory with several other bowtie2 process (--mm flag). This limits memory usage massively. For 20 parallel jobs it will reduce RAM consumption by a factor of 20 for example. Additionally, the database then only has to be read by the first bowtie2 process and all following processes will usually use the memory-mapped db, completely caching away the database reading.

So it would be cool if that flag could be exposed in metaphlan. I’d be happy to send in a PR if that seems useful.

Best

Hi @cdiener
Thanks for the suggestion, I will test the sharing memory feature and try to add the option in the next metaphlan minor version

Awesome, I’d be happy to try out a branch and test.