Skip to content

Commit

Permalink
Check requested number of threads is positive, resolves #567
Browse files Browse the repository at this point in the history
  • Loading branch information
davidemms committed Jun 29, 2021
1 parent 3aae449 commit 670c0e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts_of/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,14 @@ def ProcessArgs(prog_caller, args):
if options.nProcessAlg is None:
options.nProcessAlg = min(16, max(1, int(options.nBlast/8)))

if options.nBlast < 1:
print("ERROR: Number of '-t' threads cannot be fewer than 1, got %d" % options.nBlast)
util.Fail()

if options.nProcessAlg < 1:
print("ERROR: Number of '-a' threads cannot be fewer than 1, got %d" % options.nProcessAlg)
util.Fail()

# check argument combinations
if not (options.qStartFromFasta or options.qStartFromBlast or options.qStartFromGroups or options.qStartFromTrees):
print("ERROR: Please specify the input directory for OrthoFinder using one of the options: '-f', '-b', '-fg' or '-ft'.")
Expand Down

0 comments on commit 670c0e0

Please sign in to comment.