emap

class pyemap.emap(file_path, pdb_id, eta_moieties, chain_list, sequences)[source]

Manages the data generated at all stages of PyeMap analysis.

file_path

Crystal structure file being analyzed by PyeMap.

Type

str

eta_moieties

Non-protein eta moieties automatically identified at the parsing step.

Type

dict of str: Bio.PDB.Residue.Residue

chain_list

List of chains identified at the parsing step.

Type

list of str

sequences

Amino acid sequence for each chain in FASTA format

Type

dict of str, str

residues

Residues included in the graph after the process step.

Type

dict of str: Bio.PDB.Residue.Residue

user_residues

Custom residues specified by the user.

Type

dict of str: Bio.PDB.Residue.Residue

init_graph

Graph generated after the process step.

Type

networkx.Graph

branches

Branches found by PyeMap analysis

Type

dict of int: Branch

paths

Paths found by PyeMap sorted by lowest to highest score.

Type

dict of str: ShortestPath

paths_graph

Graph generated after the shortest paths step.

Type

networkx.Graph

__init__(file_path, pdb_id, eta_moieties, chain_list, sequences)[source]

Initializes emap object.

Parameters
  • file_path (str) – Name of file

  • eta_moieties (list of Bio.PDB.Residue.Residue) – Customized residue objects generated for automatically detected eta moieties

  • chain_list (list of str) – Chains identified by the parser

  • sequences (dict of str:str) – Key is chain id, value is sequence in fasta format

get_surface_exposed_residues()[source]

Returns list of surface exposed residues.

Returns

surface_exposed – List of surface exposed residues identified by pyemap

Return type

list of str

init_graph_to_Image()[source]

Returns PIL image of initial graph

Returns

img

Return type

PIL.Image.Image

init_graph_to_file(dest='')[source]

Saves image of graph generated by process step to file.

Parameters

dest (str) – Destination for writing to file.

paths_graph_to_Image()[source]

Returns PIL image of pathways graph

Returns

img

Return type

PIL.Image.Image

paths_graph_to_file(dest='')[source]

Saves image of graph generated by pathways step to file.

Parameters

dest (str) – Destination for writing to file.

report(dest='')[source]

Returns report of most probable pathways. Writes to file if destination is specified.

Parameters

dest (str, optional) – Destination for writing to file

Returns

output – Formatted report of pathways found

Return type

str

Raises

RuntimeError – Nothing to report

residue_to_Image(resname, scale=1.0)[source]

Returns PIL image of chemical structure. :param resname: Name of residue :type resname: str :param scale: Output scaling factor, default dimensions are (100,100) :type scale: float, optional

Returns

img

Return type

PIL.Image.Image

residue_to_file(resname, dest='', size=(100, 100))[source]

Saves image of residue to file in .svg format.

Parameters
  • resname (str) – Name of residue (node label) to be saved to file.

  • dest (str, optional) – destination to save the image

  • size ((float,float), optional) – dimensions of image saved to file

visualize_pathway_in_nglview(ptid, view)[source]

Visualize pathway in nglview widget

Parameters