From 3b6a7362b8a96a7497545cf60fccf5eb13c6cbba Mon Sep 17 00:00:00 2001 From: kapoorlab Date: Sat, 27 Apr 2024 14:53:08 +0000 Subject: [PATCH] local cell density --- src/napatrackmater/Trackmate.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/napatrackmater/Trackmate.py b/src/napatrackmater/Trackmate.py index c4ed9965..23cd756c 100644 --- a/src/napatrackmater/Trackmate.py +++ b/src/napatrackmater/Trackmate.py @@ -477,7 +477,7 @@ def _create_generations(self, all_source_ids: list): root_leaf = [] root_root = [] root_splits = [] - root_leaf_source = [] + # Get the root id for source_id in all_source_ids: @@ -496,9 +496,10 @@ def _create_generations(self, all_source_ids: list): root_leaf.append(target_target_id[0]) - #if len(list(self.oneat_dividing_tracks.keys())) > 1: - # for cell_id in list(self.oneat_dividing_tracks.keys()): - # root_splits.append(cell_id) + if len(list(self.oneat_dividing_tracks.keys())) > 1: + for cell_id in list(self.oneat_dividing_tracks.keys()): + if cell_id in all_source_ids: + root_splits.append(cell_id) return root_root, root_splits, root_leaf