antibody_utils.liabilities

Find sequence liabilities in antibody variable domains.

Liabilities are sequence motifs that may affect developability: chemical modification such as oxidation, deamidation or isomerisation, glycosylation, fragmentation, or unwanted binding. The motifs, and the regions in which they count, are listed in antibody_utils/data/liabilities.toml.

Matches are found in IMGT-numbered domains, and assigned to regions under the North definition (North, Lehmann and Dunbrack 2011).

Functions

find_liabilities([heavy, light, cpu])

Find sequence liabilities in a heavy and a light variable domain.

Classes

Liability(name, chain, residues, start, end, ...)

A match to a sequence-liability motif.

class antibody_utils.liabilities.Liability(name, chain, residues, start, end, positions)[source]

Bases: object

A match to a sequence-liability motif.

name

The liability, such as “Asn deamidation (NG NS NT)”.

chain

The chain that the match is on.

residues

The matched residues.

start

The index of the match’s first residue in the chain’s numbered domain sequence.

end

The index just past the match’s last residue.

positions

The IMGT position of each matched residue.

antibody_utils.liabilities.find_liabilities(heavy=None, light=None, *, cpu=False)[source]

Find sequence liabilities in a heavy and a light variable domain.

Either domain may be omitted, for example for a single-domain antibody, but liabilities that need both chains (such as N-terminal glutamate on both) are then never found.

Parameters:
  • heavy (NumberedSequence | str | None) – The heavy-chain domain, numbered in IMGT, or its sequence to be numbered with ANARCII (which needs the numbering extra).

  • light (NumberedSequence | str | None) – The light-chain domain, likewise.

  • cpu (bool) – When numbering sequences, run on the CPU even if a GPU is available.

Return type:

list[Liability]

Returns:

The liabilities found, in the order of liabilities.toml, then heavy before light, then by position.

Raises: