pestifer.objs.seqadv module¶
SEQADV (PDB) and seq_dif (mmCIF) records declare differences between the actual sequence of the molecule and the sequence
of its database reference. This is how authors report things like accidental mutations (conflicts),
engineered mutations, and other differences. These records are residue-specific.
- class pestifer.objs.seqadv.Seqadv(*args, idCode: str, resname: str, chainID: str, resid: ResID, database: str | None = None, dbAccession: str | None = None, dbRes: str | None = None, dbSeq: int | None = None, typekey: str | None = None, pdbx_ordinal: int | None = None, pdbx_auth_seq_num: int | None = None, residue: Residue = None, pdbx_stash: dict | None = None)[source]¶
Bases:
BaseObjA class for handling SEQADV/seq_dif records in input structure files
- assign_residue(Residues: ResidueList)[source]¶
Assigns the residue attribute of the seqadv to the corresponding Residue object This method searches through the provided list of Residues to find a match based on the attributes of the seqadv object. If a match is found, the residue attribute is set to the corresponding Residue object. If no match is found, the residue attribute remains None.
- Parameters:
Residues (list) – A list of Residue objects to search for the corresponding residue.
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': False}¶
Configuration for
pydantic.BaseModel.
- model_post_init(context: Any, /) None¶
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pdb_line()[source]¶
Write the seqadv as it would appear in a PDB file
- Returns:
The PDB line for the seqadv record.
- Return type:
- class pestifer.objs.seqadv.SeqadvList(initlist: Iterable[T] = ())[source]¶
Bases:
BaseObjList[Seqadv]A class for handling lists of Seqadvs.
- assign_residues(Residues: ResidueList) SeqadvList[source]¶
Assigns residues to each Seqadv in the list from the provided Residues. This method iterates over each Seqadv in the list and calls its
assign_residuemethod with the provided Residues. After assigning residues, it creates a new SeqadvList containing the Seqadv objects that have no assigned residue (i.e., theirresidueattribute is None). It then removes these Seqadv objects from the original list.- Parameters:
Residues (list) – A list of Residue objects to assign to the Seqadv objects.
- Returns:
A new SeqadvList containing the Seqadv objects that could not be assigned a residue.
- Return type:
- describe()[source]¶
Abstract method to describe the contents of the BaseObjList. Subclasses should implement this method to provide a meaningful description.
- classmethod from_cif(parsed: DataContainer) SeqadvList[source]¶
Create a SeqadvList from a DataContainer (mmCIF format).
- Parameters:
parsed (DataContainer) – The parsed mmCIF data container.
- Returns:
A new SeqadvList instance containing Seqadv objects created from the mmCIF data.
- Return type:
- classmethod from_pdb(parsed: PDBRecordDict) SeqadvList[source]¶
Create a SeqadvList from a PDBRecordDict.