antibody_utils.structure.models¶
Antibody chains in a structure, and the Fvs that pair them.
These classes wrap a gemmi.Structure rather than copying it. Each AntibodyChain maps the numbered positions of its variable domain to residues of the structure, which keep their original numbering. Treat the structure as read-only while these objects are in use: adding or removing chains or residues invalidates the mapping.
Classes
|
A chain of a structure with a numbered antibody variable domain. |
|
A structure with its antibody chains identified and numbered. |
|
A variable fragment: a heavy and a light chain that pair. |
- class antibody_utils.structure.models.AntibodyChain(chain, numbered, indices)[source]¶
Bases:
objectA chain of a structure with a numbered antibody variable domain.
Only the residues of the variable domain are numbered. Any others on the chain (such as a constant domain, a tag, ligands or water) are left out here, but remain in the structure.
- property gemmi_chain: Chain¶
The whole chain in the structure, including unnumbered residues.
- property numbered: NumberedSequence¶
The numbered variable domain.
- region_residues(definition)[source]¶
Group the residues of the domain by region.
Regions are assigned with antibody_utils.regions.annotate_regions, as for antibody_utils.sequence.region_sequences.
- Parameters:
definition (
Definition|str) – The region definition to apply.- Return type:
- Returns:
The residues of each region present, in sequence order.
- class antibody_utils.structure.models.AntibodyStructure(structure, chains, scheme, model)[source]¶
Bases:
objectA structure with its antibody chains identified and numbered.
Create one with antibody_utils.structure.read_structure or antibody_utils.structure.from_gemmi.
- chains¶
The antibody chains, in the order they appear in the structure.
- property heavy_chains: tuple[AntibodyChain, ...]¶
The heavy chains.
- property light_chains: tuple[AntibodyChain, ...]¶
The light chains.
- property model: Model¶
The model that the antibody chains belong to.
- scheme¶
The numbering scheme.
- structure¶
The underlying GEMMI structure, with its original numbering.
- class antibody_utils.structure.models.Fv(heavy, light)[source]¶
Bases:
objectA variable fragment: a heavy and a light chain that pair.
Chains are not paired automatically: choose the pair yourself, for example from the structure’s metadata: Fv(structure[“H”], structure[“L”]).
- property heavy: AntibodyChain¶
The heavy chain.
- property light: AntibodyChain¶
The light chain.
- property numbered: tuple[NumberedSequence, NumberedSequence]¶
The numbered heavy and light domains.
These can be passed straight to antibody_utils.sequence.identity and antibody_utils.sequence.similarity.
- region_residues(definition)[source]¶
Group the residues of both domains by region.
- Parameters:
definition (
Definition|str) – The region definition to apply.- Returns:
the heavy chain’s, then the light chain’s.
- Return type: