From 4edefad4b6b9cedf53fa3cc74823a717ebd2b1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sophia=20M=C3=A4dler?= <15019107+sophiamaedler@users.noreply.github.com> Date: Mon, 3 Jun 2024 18:15:57 +0200 Subject: [PATCH] remove potential duplicates from cleanup function before processing dictionary --- src/sparcscore/processing/filtering.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sparcscore/processing/filtering.py b/src/sparcscore/processing/filtering.py index b8d06059..c6e31a6b 100644 --- a/src/sparcscore/processing/filtering.py +++ b/src/sparcscore/processing/filtering.py @@ -688,6 +688,8 @@ def cleanup_lookup_dictionary(self): if cytosol_id in self.cytosol_discard_list: _cleanup.append(nucleus_id) + #ensure we have no duplicate entries + _cleanup = list(set(_cleanup)) for nucleus in _cleanup: del self._nucleus_lookup_dict[nucleus]