Ability to specify threads

This commit is contained in:
Kevin Wu
2023-10-22 16:28:08 -07:00
parent d0dcbc3b6c
commit fb5bc22929

View File

@@ -71,6 +71,9 @@ def build_parser() -> argparse.ArgumentParser:
"input_fasta_dir", type=str, help="Input dir containing .fasta files"
)
parser.add_argument("output_pdb_dir", type=str, help="Output dir for .pdb files")
parser.add_argument(
"--threads", "-t", type=int, default=mp.cpu_count(), help="Num threads to use"
)
return parser
@@ -105,7 +108,7 @@ def main():
)
)
with mp.Pool(mp.cpu_count()) as pool:
with mp.Pool(args.threads) as pool:
pool.starmap(run_faspr, arg_tuples, chunksize=10)