Building Chimeras

exception builder.builder.BackboneClashError[source]
class builder.builder.Builder(hit: protlego.database.data.Hit)[source]

Graph constructor and visualizer

Examples

myhit= fetch_id(‘10002347’) a=Builder(myhit) aln=a.get_alignment(myhit.query,myhit.no) qPDB, sPDB = a.superimpose_structures(aln,partial_alignment=True) chimeras=a.build_chimeras(partial_alignment=True)

build_chimeras(partial_alignment: bool = False, cutoff_distance: float = 1)Dict[str, protlego.builder.chimera.Chimera][source]

Build all possible chimeras between the two proteins that fulfill these two criteria: 1) That the distance between the fusion points is below the cutoff distance 2) That the resulting chimera does not present any backbone clashes

Returns

A dictionary with all the possible chimeras

static find_nonstandards(pdb: moleculekit.molecule.Molecule)list[source]

Finds non-standard aminoacids :param pdb: Molecule or Chimera object where to find non-standard aminoacids. :return: list of non-standard residues

get_alignment(query: str, no: str)csb.bio.hmm.HHpredHitAlignment[source]

Obtain the HHS alignment ‘no’ for query ‘query’. Only the alignment from the fragment region is retrieved. This implies that when the fragment is not located in the N-terminus hit.q_start and the position in the output won’t be the same. For example, if q_start = 20, that aminoacid is in position 0 in aln.query.

Parameters
  • query – str. Domain query

  • no – int. Specifies the position in the file (alignment with subject)

Returns

HHpredHitAlignment. Alignment between query and subject for the fragment region.

static mutate_nonstandards(pdb: moleculekit.molecule.Molecule)moleculekit.molecule.Molecule[source]
Parameters

pdb – The pdb to mutate the residues to

Returns

The pdb with the mutated residues -if there are any-

plot_curves(query: str)[source]

Plots the distance between the alpha carbons in the structure for the fragment region along with the number of backbone clashes of the resulting chimera for each position

Parameters
  • dst – np.ndarray: an array containign the distance for each fragment position

  • bbContacts1 – an array containing the number of bb contacts for each fragment position for the resulting chimera of combination query-subject

  • bbContacts2 – an array containing the number of bb contacts for each fragment position for the resulting chimera of combination subject - query

Returns

a matplotlib.pyplot figure.

static remove_residue(pdb: moleculekit.molecule.Molecule, resid)[source]

Removes a specific residue by its name :param pdb: The pdb to mutate the residues to :param resid: :return: The pdb with the filtered residues

seq2pdbaln(sequence: str, pdb: moleculekit.molecule.Molecule)List[source]

Obtains the resid (positions in the PDB) of the aminoacids involved in the fragment.

Parameters
  • sequence – str. sequence of the fragment

  • pdb – Molecule. PDB from where to obtain the residues

Returns

mapping. The the PDB Positions of the fragment. A List of tuples of the form: (sequence aminoacid, pdb resid)

superimpose_structures(aln: csb.bio.hmm.HHpredHitAlignment, partial_alignment: bool = False)[source]
Moves the two molecules to the origin of coordinates.

Aligns the full structures according the fragment and obtains RMSDs and distances.

Parameters
  • qpairs – List of CA to be aligned in the query structure

  • spairs – List of CA to be aligned in the subject structure

Returns

exception builder.builder.NotCorrectPDBError[source]
exception builder.builder.NotDiverseChimeraError[source]

Chimera Class

class builder.chimera.Chimera(filename=None, name=None, **kwargs)[source]
calc_resid_dist(resid1: int, resid2: int)numpy.core.multiarray.array[source]

Returns the distance between the alpha carbons of two residues” :param resid1:index of residue 1 in the PDB structure :param resid2:index of residue 2 in the PDB structure

Returns

np.array.

compute_hydrogen_networks(sidechain_only: bool = True)[source]

Analyzes the hydrogen bonds following the Baker Hubbard algorithm and clusters them. (Two residues are in the same cluster if there’s a path of hydrogen networks between them). This function adds protons to the protein. between them :param sidechain_only: The whole residue or sidechain only. Note: Computing networks including backbone leads to very large clusters harder to visualize.

Returns

A representation for each network

compute_hydrophobic_clusters(chain: str = 'A', sel: str = 'protein and not backbone and noh and resname ILE VAL LEU', cutoff_area: float = 10)[source]
Parameters
  • chain – Chain in the PDB to compute the hydrophobic clusters. Examples: “A”, “A B C”. Default: “A”

  • sel – VMD selection on which to compute the clusters. Default is every sidechain heavy atom ILE, VAL and LEU residues. “protein and not backbone and noh and resname ILE VAL LEU”

Returns

A representation for each cluster

builder.chimera.get_FUZZLE_hhs(domain)[source]
Parameters

domain – str. The domain to download from Fuzzle as hhs

Returns

filepath: path where the file is located.

builder.chimera.get_SCOP_domain(domain)[source]
Parameters

domain – str. The SCOPe domain to download as pdb

Returns