From 9c5abd52667e0885f5ccda9dbe9ac4c25a1acc4d Mon Sep 17 00:00:00 2001 From: Ryan Lim Date: Fri, 26 Jul 2024 16:56:00 +0000 Subject: [PATCH] fix getting the length of a generator --- lib/idseq_utils/idseq_utils/batch_run_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/idseq_utils/idseq_utils/batch_run_helpers.py b/lib/idseq_utils/idseq_utils/batch_run_helpers.py index e68b712a..cf817bd9 100644 --- a/lib/idseq_utils/idseq_utils/batch_run_helpers.py +++ b/lib/idseq_utils/idseq_utils/batch_run_helpers.py @@ -321,7 +321,7 @@ def run_alignment( ] for chunk_id, db_chunk in enumerate(_db_chunks(db_bucket, db_prefix)) ) - with Pool(len(chunks)) as p: + with Pool(len(list(chunks))) as p: p.starmap(_run_chunk, chunks) run(["s3parcp", "--recursive", chunk_dir, "chunks"], check=True) if os.path.exists(os.path.join("chunks", "cache")):