PyDyNo
Python Dynamic analysis of Biochemical Networks (PyDyNo) is an open source python library for the analysis of signal execution in network-driven biological processes. PyDyNo supports the analysis of PySB and SBML models.
Installation
From PyPI
> pip install pydyno
Installing the latest unreleased version
> pip install git+git:https://github.com/LoLab-VU/pydyno.git
Installing from source folder
- Download and extract pydyno
- Navigate into the pydyno directory
- Install (Python is necessary for this step):
> python setup.py install
How to use PyDyNo
Import libraries
import pydyno
import numpy as np
from os.path import dirname, join
from IPython.display import Image
from pydyno.examples.double_enzymatic.mm_two_paths_model import model
from pydyno.visualize_simulations import VisualizeSimulations
from pydyno.discretization import PysbDomPath
from pydyno.visualize_discretization import visualization_path
from pysb.simulator import ScipyOdeSimulator
%matplotlib inline
Load the calibrated parameters and simulate the model with 100 different parameter sets
# import calibrated parameters
module_path = dirname(pydyno.__file__)
pars_path = join(module_path, "examples", "double_enzymatic", "calibrated_pars.npy")
pars = np.load(pars_path)
# define time for the simulation and simulate model
tspan = np.linspace(0, 100, 101)
sim = ScipyOdeSimulator(model, tspan=tspan).run(param_values=pars[:100])
Visualize the dynamics of the model
vt = VisualizeSimulations(model, sim, clusters=None)
vt.plot_cluster_dynamics(components=[5])
# This saves the figure in the local folder with the filename comp0_cluster0.png
Obtain the dominant paths for each of the simulations¶
dp = PysbDomPath(model, sim)
signatures, paths = dp.get_path_signatures('s5', 'production', depth=2, dom_om=1)
signatures.sequences.head()
Obtain distance matrix and optimal number of clusters (execution modes)
signatures.dissimilarity_matrix()
signatures.silhouette_score_agglomerative_range(4)
# Select the number of cluster with highest silhouette score
signatures.agglomerative_clustering(2)
# Plot signatures
signatures.plot_sequences()
# File is saved to the local directory with the filename modal.png
paths
{2: [OrderedDict([('s5', [['s3'], ['s4']])]),
OrderedDict([('s3', [['s0', 's1']]), ('s4', [['s0', 's2']])])],
1: [OrderedDict([('s5', [['s4']])]), OrderedDict([('s4', [['s0', 's2']])])],
0: [OrderedDict([('s5', [['s3']])]), OrderedDict([('s3', [['s0', 's1']])])]}
Visualize execution modes
visualization_path(model,
path=paths[0],
target_node='s5',
type_analysis='production',
filename='path_0.png')
# Visualization is saved to local directory wit the filename path0.png
visualization_path(model,
path=paths[1],
target_node='s5',
type_analysis='production',
filename='path_1.png')
# Visualization is saved to local directory wit the filename path1.png
visualization_path(model,
path=paths[2],
target_node='s5',
type_analysis='production',
filename='path_2.png')
# Visualization is saved to local directory wit the filename path2.png
Metadata
Release files for pydyno 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydyno-0.1.2.tar.gz | 164.2 kB | Without provenance | Details for pydyno-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydyno-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.9+ x86-64 | Details for pydyno-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl |
Total release size: 346.8 kB
Release files / pydyno-0.1.2.tar.gz
| Download URL | pydyno-0.1.2.tar.gz |
|---|---|
| Size | 164.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d25eb16237081c8a92bafea1980811a56c201ef2ff29a0f67f7d9f682daa1445
|
|
BLAKE2b-256 checksum How to use checksums |
0e683a0f3ad8514b672e83af9f6f5cae6a4af7113df409586c6fd91d890b7969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.18
|
Release files / pydyno-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl
| Download URL | pydyno-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 182.6 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
b2260ecea5000e14f66b63351c2b3eb968d3db1b67da787b138c7abdc8ff7a42
|
|
BLAKE2b-256 checksum How to use checksums |
d76fd5144525d1441a6aa2c0b3ad210a596e90259088a678144fa2a3130d866c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.18
|
Security for pydyno 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.