Skip to main content

AbNumber

Build & Test BioConda Install Docs

Convenience Python APIs for antibody numbering and alignment using ANARCI

Try it out in your browser using Binder: Binder

Features:

  • Streamlined Python API using Chain object
  • Identifying CDR regions, e.g. using chain.regions or chain.cdr3_seq
  • Indexing and slicing, e.g. using chain['5'] or chain['H2':'H5']
  • Pairwise and multiple sequence alignment in the given numbering using chain.align(another)
  • Alignment to nearest human germline using chain.align(chain.find_merged_human_germline())
  • Humanization using CDR grafting by chain.graft_cdrs_onto_human_germline()

See AbNumber Documentation for the full reference.

Installation

Install using Bioconda:

conda install -c bioconda abnumber

Note: Windows is not supported due to HMMER dependency. AbNumber is currently only available on UNIX & MacOS.

Examples

from abnumber import Chain

seq = 'QVQLQQSGAELARPGASVKMSCKASGYTFTRYTMHWVKQRPGQGLEWIGYINPSRGYTNYNQKFKDKATLTTDKSSSTAYMQLSSLTSEDSAVYYCARYYDDHYCLDYWGQGTTLTVSSAKTTAPSVYPLA'
chain = Chain(seq, scheme='imgt')

chain
# QVQLQQSGAELARPGASVKMSCKASGYTFTRYTMHWVKQRPGQGLEWIGYINPSRGYTNYNQKFKDKATLTTDKSSSTAYMQLSSLTSEDSAVYYCARYYDDHYCLDYWGQGTTLTVSS
#                          ^^^^^^^^                 ^^^^^^^^                                      ^^^^^^^^^^^^

chain.cdr3_seq
# ARYYDDHYCLDY

chain.print(numbering=True)
# 0        1        2         3     4         5         6       7        8         9         10        11       12       
# 12345678912345678901234567890567890123456789012345678923456789012456789012345678901234567890123456789023456789012345678
# QVQLQQSGAELARPGASVKMSCKASGYTFTRYTMHWVKQRPGQGLEWIGYINPSRGYTNYNQKFKDKATLTTDKSSSTAYMQLSSLTSEDSAVYYCARYYDDHYCLDYWGQGTTLTVSS
#                          ^^^^^^^^                 ^^^^^^^^                                      ^^^^^^^^^^^^           

Chain can be iterated:

for pos, aa in chain:
    print(pos, aa)
# H1  Q
# H2  V
# H3  Q
# H4  L
# H5  Q

Chain can also be indexed and sliced using scheme numbering:

chain['5']
# 'Q'
for pos, aa in chain['H2':'H5']:
    print(pos, aa)
# H2  V
# H3  Q
# H4  L
# H5  Q

For all methods see AbNumber Documentation

Credits

See ANARCI on GitHub and the ANARCI paper: ANARCI: antigen receptor numbering and receptor classification

Release files for abnumber 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abnumber 0.4.4
File Size Uploaded
abnumber-0.4.4.tar.gz 37.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for abnumber 0.4.4
File Interpreter ABI Platform
abnumber-0.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 72.0 kB

Release files / abnumber-0.4.4.tar.gz

Download URL abnumber-0.4.4.tar.gz
Size 37.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4c5fd9d33087dea23088bd2de08937aa66a561f2fd34cd420ce48e16512a0131
BLAKE2b-256 checksum
How to use checksums
eba8a1881776938806d52e31d39b6d5e4d8780af5586c3bed01e664a694bd42e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release files / abnumber-0.4.4-py3-none-any.whl

Download URL abnumber-0.4.4-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eed2c47e24fb5c77d7f80e77241a344372d1030c8ae9dfdb393f72b880ea84f3
BLAKE2b-256 checksum
How to use checksums
50ceb1d59036791e26eb20e17704500b2cbf04abadf46a5bff95ad92e524f7c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release history Release notifications | RSS feed

This release

0.4.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page