Skip to content

Commit

Permalink
Support is_in_vernier with Kabat cdr_definition or scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
prihoda committed Jul 26, 2024
1 parent c3e869a commit 55ace7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion abnumber/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.5'
__version__ = '0.3.6'
9 changes: 6 additions & 3 deletions abnumber/position.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,13 @@ def is_in_cdr(self):
return self.get_region().lower().startswith('cdr')

def is_in_vernier(self):
if self.cdr_definition != 'kabat':
if self.scheme == 'kabat':
return self.number in SCHEME_VERNIER.get(f'{self.scheme}_{self.chain_type}', [])
elif self.cdr_definition == 'kabat':
return self.cdr_definition_position in SCHEME_VERNIER.get(f'{self.cdr_definition}_{self.chain_type}', [])
else:
raise NotImplementedError('Vernier zone identification is currently supported '
f'only with Kabat CDR definitions, got: {self.cdr_definition}')
return self.cdr_definition_position in SCHEME_VERNIER.get(f'{self.cdr_definition}_{self.chain_type}', [])
f'only with Kabat numbering or CDR definitions, got: {self.scheme}+{self.cdr_definition}')

@classmethod
def from_string(cls, position, chain_type, scheme):
Expand Down

0 comments on commit 55ace7f

Please sign in to comment.