carolzhou / multiPhATE2

multiPhATE with comparative genomics
18 stars 10 forks source link

phate threads should allow ALL #7

Closed linsalrob closed 3 years ago

linsalrob commented 3 years ago

Per the documentation you should be able to set

phate_threads='ALL'

in the config file. This gives me this error:

Traceback (most recent call last):
  File "/home/edwa0468/multiphate2/multiPhATE2/multiPhate.py", line 2083, in <module>
    if int(phateThreads) == 0:
ValueError: invalid literal for int() with base 10: 'ALL'
jeffkimbrel commented 3 years ago

Thanks Rob, someone else also found this yesterday (#5). I thought it was as simple as the error suggests (trying to convert 'ALL' to an integer), but it may be a little more than that.

carolzhou commented 3 years ago

It was indeed as simple as that. An "int" check needed to be included, as I added an option to turn off phate threading altogether. "ALL" is accounted for. The number of threads allowed does not exceed os.cpu_count() or the number of genomes being processed.

linsalrob commented 3 years ago

This has been closed by commit 2ba6709