Skip to content

Commit

Permalink
reduce extra threads for threadpool
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer committed Oct 27, 2023
1 parent bd66cc2 commit 98683d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion buscolite/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION = (0, 5, 1)
VERSION = (23, 10, 26)

__version__ = ".".join(map(str, VERSION))
6 changes: 3 additions & 3 deletions buscolite/busco.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def runbusco(
)
# run busco analysis using threadpool, limit io as much as possible
results = []
with concurrent.futures.ThreadPoolExecutor(max_workers=cpus + 4) as executor:
with concurrent.futures.ThreadPoolExecutor(max_workers=cpus + 2) as executor:
for k, v in coords.items():
busco_prlf = os.path.join(lineage, "prfl", "{}.prfl".format(k))
for i in v:
Expand Down Expand Up @@ -320,7 +320,7 @@ def runbusco(

# try thread pool
results = []
with concurrent.futures.ThreadPoolExecutor(max_workers=cpus + 4) as executor:
with concurrent.futures.ThreadPoolExecutor(max_workers=cpus + 2) as executor:
for k, v in coords2.items():
busco_prlf = os.path.join(lineage, "prfl", "{}.prfl".format(k))
for i in v:
Expand Down Expand Up @@ -438,7 +438,7 @@ def runbusco(
)
# now we can loop over the hmms in the lineage and run hmmer on each
results = []
with concurrent.futures.ThreadPoolExecutor(max_workers=cpus + 4) as executor:
with concurrent.futures.ThreadPoolExecutor(max_workers=cpus + 2) as executor:
for f in os.listdir(os.path.join(lineage, "hmms")):
if f.endswith(".hmm"):
hmmfile = os.path.join(lineage, "hmms", f)
Expand Down

0 comments on commit 98683d1

Please sign in to comment.