Skip to content

Commit

Permalink
Support empty dict in batch
Browse files Browse the repository at this point in the history
  • Loading branch information
prihoda committed Jun 12, 2024
1 parent a8c1bba commit 89e4b97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions abnumber/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def batch(cls, seq_dict: dict, scheme: str, cdr_definition=None, assign_germline
:return: tuple with (dict of Chain objects, dict of error strings)
"""
assert isinstance(seq_dict, dict), f'Expected dictionary of sequences, got: {type(seq_dict).__name__}'
if not seq_dict:
return {}, {}
names = list(seq_dict.keys())
seq_list = list(seq_dict.values())
all_results = _anarci_align(seq_list, scheme=scheme, allowed_species=allowed_species, assign_germline=assign_germline)
Expand Down

0 comments on commit 89e4b97

Please sign in to comment.