pestifer.objs.insertion module

Insertions are user-specified modifications in which a sequence of one or more amino acids is added to a protein chain.

class pestifer.objs.insertion.Insertion(*args, chainID: str, resid: ResID, sequence: str, integer_increment: bool | None = None)[source]

Bases: BaseObj

A class for handling insertions of amino acid residues within an otherwise fully resolved chain.

chainID: str
integer_increment: bool | None

Required attributes for an Insertion object. These attributes must be provided when creating an Insertion object.

  • chainID: The chain ID of the segment where the insertion occurs.

  • resid: The residue ID where the insertion is made, represented by a ResID object.

  • sequence: The one-letter amino acid sequence to be inserted.

Optional attributes for an Insertion object. These attributes can be provided to modify the behavior of the insertion. - integer_increment: Optional boolean indicating if the residue sequence number is incremented by 1 for each residue substituted.

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.

resid: ResID
sequence: str
shortcode() str[source]

Returns the shortcode representation of the Insertion object.

The shortcode format is: C,R,SSS where: - C is the chain ID - R is the residue number and insertion code - SSS is the one-letter amino acid sequence to insert after R

class pestifer.objs.insertion.InsertionList(initlist: Iterable[T] = ())[source]

Bases: BaseObjList[Insertion]

describe() str[source]

Describe the InsertionList.

Returns:

A string description of the InsertionList, including the number of insertions.

Return type:

str