Skip to content

Commit

Permalink
if threads are > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche committed Nov 1, 2024
1 parent 8b55d59 commit f6d849c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/genomicarrays/build_genomicarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,13 @@ def build_genomicarray(
)
for idx, bwpath in enumerate(files)
]
with Pool(num_threads) as p:
p.map(_wrapper_extract_bwinfo, all_bws_options)

if num_threads > 1:
with Pool(num_threads) as p:
p.map(_wrapper_extract_bwinfo, all_bws_options)
else:
for opt in all_bws_options:
_wrapper_extract_bwinfo(opt)

if optimize_tiledb:
uta.optimize_tiledb_array(_cov_uri)
Expand Down

0 comments on commit f6d849c

Please sign in to comment.