prihoda / AbNumber

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

Unusual behavior for Chain as the input sequence gets modified when providing the output #8

Closed ahmadpgh closed 2 years ago

ahmadpgh commented 2 years ago

Hi,

Running the snippet below, I expected to see a similar chain.seq to the input sequence but it seems the order of amino acids is modified. Specifically GSEHR is replaced by RHESG. May I ask why we see this change?


from abnumber import Chain

seq = "AVQLVDSGGGTLQAGKSLRLSCAISGLAFDGGAMGSEHRLTAGAMGWFRQAPGKDREFVAAISPRTDETYYAESLEGRFSVSRDAAATMVFLQADNVRLDDTASYYCAADEDVTPRVMGVIPHADHWGQGTLVTVSS"
chain = Chain(seq, scheme='imgt')
print("Sequence:\n", seq)
print("Chain:\n", chain)
assert chain.seq==seq

Thanks for your reply in advance

prihoda commented 2 years ago

Hi @ahmadpgh thanks for reporting this. Turns out we had a bug in ordering the IMGT CDR1 33 and CDR2 61 positions.

Fixed in https://github.com/prihoda/AbNumber/pull/9, the new 0.3.0 abnumber release will be available on Bioconda soon.