mfrpy is a Python package for finding the minimal functional routes of signal transduction networks. The package builds on work done at Pennsylvania State University by Réka Albert, Rui-Sheng Wang, and others. This is part of the rtmod pipeline for calculating the modulus of a family of routes. This is done in two parts - first, the graph is expanded by the update_expand.py method. Our approach sees expansion mediated by an update table, simplifying computations in lieu of graph-theoretic expansion "by hand". For users interested in expansion, see [1]. Secondly, the minimal functional routes, minimal subgraphs of the expanded graph, are found using sgmfr.py, an algorithm adopted into Python from [2]. After computation, the minimal routes are returned in terms of original graph vertices and edges to the user. The following is meant to be an introduction to the package for novel users. For a more thorough explanation, refer to rtmod tutorial.ipynb. For more information on signal transduction networks in general, see [3].
from mfrpy import sgmfr
from mfrpy.examplegraphs import igraph_graph
acyclic example
acyclic = igraph_graph.dag
cyclic example
cyclic = igraph_graph.dcg
user can also import their own graphs by standard igraph commands. For GraphML files
myGraph = Graph.Read_GraphML("myGraph.xml")
myGraph.vs["name"] = myGraph.vs["id"]
Call the get_mfrs() method:
sgmfr.get_mfrs(acyclic, [0], 9, True, "el")
or
sgmfr.get_mfrs(cyclic, [0], 7, True, "el")
The parameters of the get_mfrs method are as follows:
get_mfrs(
graph -- *igraph* Graph object,
source node indices -- list,
target node index -- int,
option to display mfrs -- defaults to False,
output option -- defaults to "es"
)
Supported output options:
"em" -- returns edge matrices
"el" -- returns edge lists
"es" -- returns edge sequence indices
acyclic example
acyclic.es["synergy"] = [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 0, 2, 0]
Here edges 4 and 5 are dependent on one another and so are edges 10 and 13. However, edges 4 and 10, for example, are independent.
0 represents no synergy (regular edge)
Edges with the same value for the synergy attribute are dependent on one another
To do the same for inhibition,
acyclic.es["inhibition"] = [0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0]
Where 1 indicates an inhibitory edge while 0 indicates activation
[1] Wang and Albert: Elementary signaling modes predict the essentiality of signal transduction network components. BMC Systems Biology 2011 5:44
[2] Wang et al.: Minimal functional routes in directed graphs with dependent edges. International Transactions in Operational Research 2013
[3] Albert and Robeva: Signaling Networks : Asynchronous Boolean Models. Algebraic and Discrete Mathematical Methods for Modern Biology. Elsevier, 2015. pp. 65-91