Skip to content

Commit 62125ea

Browse files
committed
add thread option to prediction
1 parent 7d17878 commit 62125ea

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

maxatac/analyses/predict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def run_prediction(args):
102102
f"Output filename: {outfile_name_bigwig}"
103103
)
104104

105-
with Pool(int(multiprocessing.cpu_count())) as p:
105+
with Pool(args.threads) as p:
106106
forward_strand_predictions = p.starmap(make_stranded_predictions,
107107
[(regions_pool,
108108
args.signal,

maxatac/utilities/parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,12 @@ def get_parser():
330330
help="Skip calling peaks on prediction tracks"
331331
)
332332

333+
predict_parser.add_argument("--threads",
334+
dest="threads",
335+
type=int,
336+
default=24,
337+
help="Number of processes to run prediction in parallel. Default: 24"
338+
)
333339
#############################################
334340
# Train parser
335341
#############################################

0 commit comments

Comments
 (0)