prihoda / AbNumber

Convenience Python APIs for antibody numbering using ANARCI
MIT License
80 stars 11 forks source link

Custom CDR and FR definitions? #21

Open jon-cheng opened 4 months ago

jon-cheng commented 4 months ago

Hi,

Would it be possible to enable customization of CDR and framework boundary definitions as an input?

I believe it would involve just enabling the user to input a custom coordinate definition into SCHEME_BORDERS in https://github.com/prihoda/AbNumber/blob/master/abnumber/common.py

SCHEME_BORDERS = {
               # Start coordinates
               # CDR1, FR2, CDR2, FR3, CDR3, FR4
         'imgt': [27,  39,  56,   66,  105,  118, 129],
      'kabat_H': [31,  36,  50,   66,  95,   103, 114],
      'kabat_K': [24,  35,  50,   57,  89,    98, 108],
      'kabat_L': [24,  35,  50,   57,  89,    98, 108],
    'chothia_H': [26,  33,  52,   57,  95,   103, 114],
    'chothia_K': [24,  35,  50,   57,  89,    98, 108],
    'chothia_L': [24,  35,  50,   57,  89,    98, 108],
      'north_H': [23,  36,  50,   59,  93,   103, 114],
      'north_K': [24,  35,  49,   57,  89,    98, 108],
      'north_L': [24,  35,  49,   57,  89,    98, 108],
      'custom_def':[cdr1,fr2,cdr2,fr3,cdr3,fr4] # enter custom coordinates
}

Thanks for the very helpful package!

Jonathan