Skip to content

Commit

Permalink
remove potential duplicates from cleanup function before processing d…
Browse files Browse the repository at this point in the history
…ictionary
  • Loading branch information
sophiamaedler committed Jun 3, 2024
1 parent f23b9a0 commit 4edefad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sparcscore/processing/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 4edefad

Please sign in to comment.