Process File

Once you have an emap object generated by a successful parse, you can construct the graph model of your protein crystal structure. The way this graph is constructed is extremely flexible and customizable. Each edge connecting two vertices is assigned a weight:

\[P'=-log_{10}(\epsilon)\]

where \(\epsilon\) is a distance-dependent hopping penalty function:

\[\epsilon = \alpha \exp(-\beta(R-R_{offset}))\]

You can specify custom fragments atom by atom using the “custom” optional argument, which takes a string formatted in pyemap’s custom fragment selection syntax, which is based on PDB atom serial number. The syntax is summarized below:

Syntax

“,”

defines discrete range of atoms

“-”

defines continuous range of atoms

“()”

encloses atom range

“(…),(…)”

defines multiple custom fragments

Process

pyemap.process(emap, chains=None, eta_moieties=None, dist_def='COM', sdef='RSA', edge_prune='PERCENT', include_residues=['Y', 'W'], custom='', distance_cutoff=20, max_degree=4, percent_edges=1.0, num_st_dev_edges=1.0, rd_thresh=3.03, rsa_thresh=0.2, coef_alpha=1.0, exp_beta=2.3, r_offset=0.0)[source]

Constructs emap graph theory model based on user specs, and saves it to the emap object.

Parameters
  • emap (emap) – Object for storing state of emap analysis.

  • chains (list of str) – List of strings corresponding to chains included in analysis

  • eta_moieties (list of str) – List of strings corresponding to residue names of eta moieties

  • dist_def (str, optional) – Definition of distance matrix. ‘COM’ for center of mass, ‘CATM’ for closest atom

  • sdef (str, optional) – Algorithm to use for surface exposure. ‘RD’ for residue depth, ‘RSA’ for relative solvent accessibility

  • edge_prune (str, optional) – Algorithm for pruning edges. ‘DEGREE’ for degree, ‘PERCENT’ for percent

  • include_residues (list of str) – Included amino acids specified by 1 letter code

  • custom (str, optional) – Custom atom string specified by user

  • distance_cutoff (float) – Defines a pure distance threshold. PyeMap will only keep edges with distances less than or equal distance_cutoff.

  • max_degree (int, optional) – Maximum degree of any vertex. Only used when edge_prune is set to ‘DEGREE’.

  • percent_edges (float, optional) – Percent of edges to keep for each node. Only used when edge_prune is set to ‘PERCENT’.

  • num_st_dev_edges (float, optional) – Number of standard deviations of edges to keep. Only used when edge_prune is set to ‘PERCENT’.

  • rd_thresh (float, optional) – Threshold for buried/surface exposed for residue depth

  • rsa_thresh (float, optional) – Threshold for buried/surface exposed for relative solvent accessbility

  • coef_alpha (float, optional) – Penalty function parameters.

  • exp_beta (float, optional) – Penalty function parameters.

  • r_offset (float, optional) – Penalty function parameters.

Raises

RuntimeError: – Not enough residues to construct a graph

Example

>>> import pyemap
>>> my_emap = pyemap.fetch_and_parse("1u3d")
>>> pyemap.process(my_emap,eta_moieties=["ANP511(A)"],custom="(3960-3969),(3970-3980,3982,3984-3987)")
>>> my_emap.init_graph_to_Image().show()
../../_images/custom.png