rrwick / Trycycler

A tool for generating consensus long-read assemblies for bacterial genomes
GNU General Public License v3.0
306 stars 28 forks source link

muscle command in msa.py missing -threads argument #42

Closed marade closed 2 years ago

marade commented 2 years ago

The lines in question are:

muscle_command = ['muscle', '-in', input_filename, '-out', output_filename]

muscle_command = ['muscle', '-align', input_filename, '-output', output_filename]

Since the multiprocessing module is already controlling threads here, and muscle defaults to using all cores (up to 20), if you specify trycycler msa --threads 16 it will try to use num_cores*16 threads instead of just 16, yes?

rrwick commented 2 years ago

Thanks - that's a good catch! It seems to only affect Muscle v5 (I don't think Muscle v3) uses threads when aligning. This may also explain the memory issues described in #35.

I've just pushed a fix for this (886fdd5), though in my testing, this only improves memory usage, not runtime. So despite the fix, I still find Muscle v3 to be much faster, so I recommend users stick with the old version (read more here).

Ryan