From 32f0edceb5289c08301e40df285ad38c03578562 Mon Sep 17 00:00:00 2001 From: chriscrsmith Date: Tue, 3 Oct 2023 11:20:21 -0700 Subject: [PATCH] update stairway.py --- workflows/stairway.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/workflows/stairway.py b/workflows/stairway.py index fa110d8..5d1ea11 100644 --- a/workflows/stairway.py +++ b/workflows/stairway.py @@ -73,9 +73,10 @@ def ts_to_stairway(self, ts_path, pop_name, mask_intervals, num_bootstraps=1): class_muts = {} for dfe in ts.metadata["stdpopsim"]["DFEs"]: for mt in dfe["mutation_types"]: - mid = mt["slim_mutation_type_id"] - if not mid in class_muts: - class_muts[mid] = "neutral" if mt["is_neutral"] else "non_neutral" + mids = mt["slim_mutation_type_id"] + for mid in mids: + if not mid in class_muts: + class_muts[mid] = "neutral" if mt["is_neutral"] else "non_neutral" site_class = np.empty(ts.num_sites, dtype=object)