Skip to content

Commit 957a10f

Browse files
authored
Merge pull request #35 from LoLab-VU/update_readme
Update readme
2 parents eeacec3 + 11a7584 commit 957a10f

File tree

9 files changed

+1275
-631
lines changed

9 files changed

+1275
-631
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
recursive-include pydyno/lcs *.c *.h *.pxd *.pyx
22
include pydyno/examples/sbml_example/double_enzymatic_sbml.xml
3+
include pydyno/examples/double_enzymatic/calibrated_pars.npy
34
include versioneer.py
45
include pydyno/_version.py

README.md

Lines changed: 144 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,148 @@
44

55
# PyDyNo
66

7-
Python Dynamic analysis of Biochemical Networks
8-
9-
The advent of quantitative techniques to probe biomolecular-signaling processes have led to increased use of
10-
mathematical models to extract mechanistic insight from complex datasets. These complex mathematical models
11-
can yield useful insights about intracellular signal execution but the task to identify key molecular drivers
12-
in signal execution, within a complex network, remains a central challenge in quantitative biology. This challenge
13-
is compounded by the fact that cell-to-cell variability within a cell population could yield multiple signal
14-
execution modes and thus multiple potential drivers in signal execution. Here we present a novel approach to
15-
identify signaling drivers and characterize dynamic signal processes within a network. Our method, PyDyNo,
16-
combines physical chemistry, statistical clustering, and tropical algebra formalisms to identify interactions
17-
that drive time-dependent behavior in signaling pathways.
7+
Python Dynamic analysis of Biochemical Networks (PyDyNo) is an open source python library for the analysis of
8+
signal execution in network-driven biological processes. PyDyNo supports the analysis of [PySB](http://pysb.org/)
9+
and [SBML](http://sbml.org/Main_Page) models.
1810

11+
## Installation
12+
13+
### From PyPI
14+
15+
```bash
16+
> pip install pydyno
17+
```
18+
19+
### Installing the latest unreleased version
20+
21+
```bash
22+
> pip install git+git:https://github.com/LoLab-VU/pydyno.git
23+
```
24+
25+
### Installing from source folder
26+
27+
- Download and extract pydyno
28+
- Navigate into the pydyno directory
29+
- Install (Python is necessary for this step):
30+
31+
```bash
32+
> python setup.py install
33+
```
34+
35+
## How to use PyDyNo
36+
37+
# Import libraries
38+
39+
40+
```python
41+
import pydyno
42+
import numpy as np
43+
from os.path import dirname, join
44+
from IPython.display import Image
45+
from pydyno.examples.double_enzymatic.mm_two_paths_model import model
46+
from pydyno.visualize_simulations import VisualizeSimulations
47+
from pydyno.discretization import PysbDomPath
48+
from pydyno.visualize_discretization import visualization_path
49+
from pysb.simulator import ScipyOdeSimulator
50+
%matplotlib inline
51+
```
52+
53+
# Load the calibrated parameters and simulate the model with 100 different parameter sets
54+
55+
56+
```python
57+
# import calibrated parameters
58+
module_path = dirname(pydyno.__file__)
59+
pars_path = join(module_path, "examples", "double_enzymatic", "calibrated_pars.npy")
60+
pars = np.load(pars_path)
61+
```
62+
63+
64+
```python
65+
# define time for the simulation and simulate model
66+
tspan = np.linspace(0, 100, 101)
67+
sim = ScipyOdeSimulator(model, tspan=tspan).run(param_values=pars[:100])
68+
```
69+
70+
# Visualize the dynamics of the model
71+
72+
```python
73+
vt = VisualizeSimulations(model, sim, clusters=None)
74+
vt.plot_cluster_dynamics(components=[5])
75+
# This saves the figure in the local folder with the filename comp0_cluster0.png
76+
```
77+
![png](pydyno/examples/double_enzymatic/double_enzymatic_reaction_files/double_enzymatic_reaction_6_1.png)
78+
79+
# Obtain the dominant paths for each of the simulations¶
80+
81+
82+
83+
```python
84+
dp = PysbDomPath(model, sim)
85+
signatures, paths = dp.get_path_signatures('s5', 'production', depth=2, dom_om=1)
86+
signatures.sequences.head()
87+
```
88+
89+
# Obtain distance matrix and optimal number of clusters (execution modes)
90+
91+
```python
92+
signatures.dissimilarity_matrix()
93+
signatures.silhouette_score_agglomerative_range(4)
94+
```
95+
96+
```python
97+
# Select the number of cluster with highest silhouette score
98+
signatures.agglomerative_clustering(2)
99+
```
100+
101+
102+
```python
103+
# Plot signatures
104+
signatures.plot_sequences()
105+
# File is saved to the local directory with the filename modal.png
106+
```
107+
108+
![png](pydyno/examples/double_enzymatic/double_enzymatic_reaction_files/double_enzymatic_reaction_13_0.png)
109+
110+
```python
111+
paths
112+
```
113+
{2: [OrderedDict([('s5', [['s3'], ['s4']])]),
114+
OrderedDict([('s3', [['s0', 's1']]), ('s4', [['s0', 's2']])])],
115+
1: [OrderedDict([('s5', [['s4']])]), OrderedDict([('s4', [['s0', 's2']])])],
116+
0: [OrderedDict([('s5', [['s3']])]), OrderedDict([('s3', [['s0', 's1']])])]}
117+
118+
# Visualize execution modes
119+
120+
```python
121+
visualization_path(model,
122+
path=paths[0],
123+
target_node='s5',
124+
type_analysis='production',
125+
filename='path_0.png')
126+
# Visualization is saved to local directory wit the filename path0.png
127+
```
128+
129+
![png](pydyno/examples/double_enzymatic/double_enzymatic_reaction_files/path_0.png)
130+
131+
```python
132+
visualization_path(model,
133+
path=paths[1],
134+
target_node='s5',
135+
type_analysis='production',
136+
filename='path_1.png')
137+
# Visualization is saved to local directory wit the filename path1.png
138+
```
139+
140+
![png](pydyno/examples/double_enzymatic/double_enzymatic_reaction_files/path_1.png)
141+
142+
```python
143+
visualization_path(model,
144+
path=paths[2],
145+
target_node='s5',
146+
type_analysis='production',
147+
filename='path_2.png')
148+
# Visualization is saved to local directory wit the filename path2.png
149+
```
150+
151+
![png](pydyno/examples/double_enzymatic/double_enzymatic_reaction_files/path_2.png)

0 commit comments

Comments
 (0)