From 1109cebf62d2eca8fc067145c1da60aa61560921 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Thu, 22 Aug 2024 16:09:23 +0200 Subject: [PATCH] fix usage of random sample to be compatible with python 3.12 --- ppanggolin/nem/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppanggolin/nem/partition.py b/ppanggolin/nem/partition.py index 952ab583..ebd8531c 100644 --- a/ppanggolin/nem/partition.py +++ b/ppanggolin/nem/partition.py @@ -321,7 +321,7 @@ def evaluate_nb_partitions(organisms: set, output: Path = None, sm_degree: int = newtmpdir = tmpdir / "eval_partitions" if len(organisms) > chunk_size: - select_organisms = set(random.sample(set(organisms), chunk_size)) + select_organisms = set(random.sample(list(organisms), chunk_size)) else: select_organisms = set(organisms)