Skip to content

Commit

Permalink
Merge pull request #1207 from mild-blue/fix_set_manipulation
Browse files Browse the repository at this point in the history
fix: set modification
  • Loading branch information
kubantjan authored May 14, 2023
2 parents a183bf3 + 0e7f51f commit 2f30e3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions txmatching/utils/hla_system/hla_crossmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,13 @@ def _add_undecidable_crossmatch_type(antibodies: List[HLAAntibody],


def _add_theoretical_crossmatch_type(positive_matches: Set[AntibodyMatch]):
matches_to_remove = set()
for match in positive_matches:
if match.hla_antibody.type == HLAAntibodyType.THEORETICAL and match.match_type != AntibodyMatchTypes.UNDECIDABLE:
positive_matches.remove(match)
positive_matches.add(AntibodyMatch(match.hla_antibody, AntibodyMatchTypes.THEORETICAL))
matches_to_remove.add(match)
for match in matches_to_remove:
positive_matches.remove(match)
positive_matches.add(AntibodyMatch(match.hla_antibody, AntibodyMatchTypes.THEORETICAL))


def _add_none_crossmatch_type(antibodies: List[HLAAntibody],
Expand Down

0 comments on commit 2f30e3c

Please sign in to comment.