From df125c5c4f7cb0efb06239d8cda8a8308d024fb9 Mon Sep 17 00:00:00 2001 From: binho Date: Mon, 20 May 2024 17:02:03 -0500 Subject: [PATCH] No need to remove attr trans if there aren't any --- src/phylojunction/readwrite/pj_write.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/phylojunction/readwrite/pj_write.py b/src/phylojunction/readwrite/pj_write.py index be8ba42..9382d20 100644 --- a/src/phylojunction/readwrite/pj_write.py +++ b/src/phylojunction/readwrite/pj_write.py @@ -294,10 +294,12 @@ def recursively_collect_smaps(nd: dp.Node, # PJ keeps information for plotting) if clado_event is not None: clado_time = clado_event.global_time - at_time = at_list[0].global_time - if at_time == clado_time: - at_list = at_list[1:] + if len(at_list) > 0: + at_time = at_list[0].global_time + + if at_time == clado_time: + at_list = at_list[1:] for at in at_list: ana_at_str_list = [it_idx_str, nd_idx]