FIX: metaphlan4 bowtie2-build --threads flag bug #229
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
metaphlan4 bowtie2-build "--threads" flag bug
Software details
metaphlan4 version: MetaPhlAn version 4.1.1 (11 Mar 2024)
bowtie2-build version: bowtie2-build version 2.2.3 64-bit, compiled with gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)
Issue
Traceback output
In the "./metaphlan/metaphlan.py" file, on line 445, in the subprocess call, the script calls the "bowtie2-build" command with the flag "--threads" to enable multithreading/multiprocessing. The "--threads" doesn't exists, rather the correct switch for multi-cores seems to be "-p".
It's probably a case of poor documentation, as of the current "--help" flag gives the following output:
Command to reproduce
Submitted fix
Substitute line 445 in ./metaphlan/metaphlan.py FROM:
TO:
If the "--threads" flag was used, then at some point it was working correctly with older versions of Bowtie2. This way there's backwards compatibility.