Skip to content

Commit 98683d1

Browse files
author
Jon Palmer
committed
reduce extra threads for threadpool
1 parent bd66cc2 commit 98683d1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

buscolite/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
VERSION = (0, 5, 1)
1+
VERSION = (23, 10, 26)
22

33
__version__ = ".".join(map(str, VERSION))

buscolite/busco.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def runbusco(
216216
)
217217
# run busco analysis using threadpool, limit io as much as possible
218218
results = []
219-
with concurrent.futures.ThreadPoolExecutor(max_workers=cpus + 4) as executor:
219+
with concurrent.futures.ThreadPoolExecutor(max_workers=cpus + 2) as executor:
220220
for k, v in coords.items():
221221
busco_prlf = os.path.join(lineage, "prfl", "{}.prfl".format(k))
222222
for i in v:
@@ -320,7 +320,7 @@ def runbusco(
320320

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

0 commit comments

Comments
 (0)