Branch

Branches are stored in the branches dictionary of the emap object. The keys are the branch numbers.

>>> print(my_emap.branches[1])
>>> Branch: W356(A)
>>> 1a: ['FAD510(A)-2', 'W356(A)'] 9.48
    >>> 1b: ['FAD510(A)-2', 'W356(A)', 'W213(A)'] 15.31
    >>> 1c: ['FAD510(A)-2', 'W356(A)', 'W213(A)', 'W61(A)'] 23.95
    >>> 1d: ['FAD510(A)-2', 'W356(A)', 'Y432(A)', 'W436(A)'] 26.44
    >>> 1e: ['FAD510(A)-2', 'W356(A)', 'W213(A)', 'W62(A)', 'W217(A)'] 34.72
class pyemap.Branch(branch_id, target)[source]

Data structure used to group shortest paths with a common first surface exposed residue.

Shortest paths are classified into branches based on the first surface exposed residue reached during the course of the pathway. For example, given a source node A, and surface exposed nodes B and C, the paths [A,F,B] and [A,F,B,C] will both be part of the “B” branch. The path [A,E,C] would be part of its own ‘C” branch.

branch_id

Unique identifier for a branch

Type:

str

target

Target node which a branch corresponds to

Type:

str

paths

List of ShortestPath objects that make up a branch

Type:

list of ShortestPath

__str__()[source]

String representation of Branch. First line is: “Branch: branch_id” and subsequent lines are the string representations of each ShortestPath object comprising the Branch.

add_path(path)[source]

Adds a path to the branch and sets the path_id.

Each time a path is added, the paths in the branch are sorted. After sorting, each path is assigned a path id composed of the branch id and its location in the paths list. For example, the shortest path in branch 12 would be assigned the id ‘12a’, the second shortest ‘12b’ and so on.

Parameters:

path (ShortestPath) – A ShortestPath from source to a surface exposed residue