Skip to main content

A tool for the computation of steady states and exploration of dynamics in ternary intracellular biological networks.

Project description

SteadyCellPhenotype

A tool for the computation of steady states and exploration of dynamics in intracellular biological networks.

Developers and Research Team

Adam Knapp (Developer), Julia Chifman (PI), Luis Sordo-Vieira (Co-PI), Reinhard Laubenbacher (Co-PI)

Funding by College of Arts and Sciences Mellon Fund, American University. (2019)

Background on Ternary models and Examples

See https://steadycellphenotype.github.io/docs.html

Installation and Operation

The app is implemented in Python 3 with the help of a variety of packages including flask, matplotlib, networkx, numba, pathos, and attrs. Some of these may be installed by default if you have installed the standard anaconda distribution. Others need to use pip to install it. If the version of python on your system is version 3 (check using python --version) you can install these dependencies using

python -m pip install -r requirements.txt

from the steadycellphenotype directory. Commonly, such as on Mac or Linux-based systems, Python 3.x is installed as python3 and you will need to run

python3 -m pip install -r requirements.txt

Then, on Mac or linux, the site can then be started by

./start_scp.sh

You can also install SteadyCellPhenotype as a python package via pip:

python3 -m pip install -e .

This will add two executables to your path, start_scp.sh and scp_converter.py. You can also install SteadyCellPhenotype in a virtual environment, see below, which may help with package versioning issues.

Assuming that you are in the top directory of this project. This will open up a web server on the loopback address on port 5000. If that's gibberish, what I mean is that

  • It won't be accessible to the broader internet and
  • On the same machine, you can point your web browser at http://localhost:5000 and access the site.

The flask documentation contains info on how to get the thing working for remote users. Flask documentation

Note:

Instructions on obtaining Macaulay2 are here. In particular, here is where you can get Debian packages.

Using a virtual environment

If you encounter compatibility errors between various python and package versions on your computer, it may be useful to create a virtual environment with project-specific versions. (e.g. as of this writing there are issues with the current versions of numba and python 3.9 on macOS.) To create a virtual environment, first find the desired version of python on your machine. (We assume 3.8 below.) Hint: On macOS and Linux, we can use

find / -name python3.8 2>&1 | grep -v "Permission denied"

to find all copies of the python 3.8 executable on the system. Then, using the desired copy of python, run

/whatever/path/to/python/you/found/python3.8 -m venv stdy-cll-phntyp-venv

replacing stdy-cll-phntyp-venv with whatever folder name you desire the virtual environment to reside in. (Often we choose venv inside of the source directory.) All packages which we install will reside in this directory. Then whenever we want to enter the virtual environment, we run

source stdy-cll-phntyp-venv/bin/activate

Now run

python3 -m pip install -e .

Command line tool, scp_converter.py

In addition to the browser interface, SteadyCellPhenotype provides a command line tool: scp_converter.py for advanced users. This tool allows the user to perform various transformations to a MAX/MIN/NOT/polynomial model, including:

  • generation of a pure-polynomial model, (i.e. conversion of MAX/MIN/NOT formulae to the corresponding polynomial)

  • conversion of some or all formulae to the corresponding continuous version,

  • generation of a "self-power" of the system, i.e. $F^n = \underbrace{F \circ \cdots \circ F}_{n}$ suitable for computing cycles as fixed points of the composed system.

  • generation of several C language programs derived from the model:

    • a simulator which runs the system on a random sample of initial conditions, searching for attractors
    • a simulator which does a complete state space search of the system, searching for attractors
    • a simulator which creates a graph representation of the update function on state space

    Each of these generated programs can be compiled using recent versions of gcc and require the header files (*.h) included in the steady_cell_phenotype directory. Output is in JSON format.

Commands line options for scp_converter.py are shown by running scp_converter.py --help which displays:

usage: scp_converter.py [-h] [-i INPUTFILE] [-o OUTPUTFILE] [-n] [-no-polys] [-sim] [-graph] [-complete_search] [-init-val INIT_VAL [INIT_VAL ...]]
                        [--count COUNT] [-c] [-comit CONTINUOUS_OMIT [CONTINUOUS_OMIT ...]] [-power SELF_POWER]

Converter from MAX/MIN/NOT formulae to either low-degree polynomials over F_3 or a C-language simulator

optional arguments:
  -h, --help            show this help message and exit
  -i INPUTFILE, --inputfile INPUTFILE
                        input filename containing MAX/MIN/NOT formulae. required.
  -o OUTPUTFILE, --outputfile OUTPUTFILE
                        output filename for the polynomial formulae. if not provided, stdout is used
  -n, --non_descriptive
                        use non-descriptive names for variables
  -no-polys             do not output polynomials, used by default when output is by simulator
  -sim                  output C-language simulator program
  -graph                use the graph-creation simulator
  -complete_search      completely search the state-space
  -init-val INIT_VAL [INIT_VAL ...]
                        for simulators, fix initial values got some variables Ex: -init-val LIP 1
  --count COUNT         number of random points tried by the simulator, default 1,000,000. Ignored if the -sim flag is not used
  -c, --continuous      generate polynomials for continuous system, applied before the self-power operation
  -comit CONTINUOUS_OMIT [CONTINUOUS_OMIT ...], --continuous-omit CONTINUOUS_OMIT [CONTINUOUS_OMIT ...]
                        list of variables to _not_ apply continuity operation to
  -power SELF_POWER, --self-power SELF_POWER
                        gets polynomials for a power of the system. i.e. self-composition, power-1 times (default: 1) ignored for simulator Warning: This can
                        take a long time!

Python package

Upload Python Package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steady_cell_phenotype-0.3.5.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steady_cell_phenotype-0.3.5-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file steady_cell_phenotype-0.3.5.tar.gz.

File metadata

  • Download URL: steady_cell_phenotype-0.3.5.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for steady_cell_phenotype-0.3.5.tar.gz
Algorithm Hash digest
SHA256 09cc34bf5855d21c7028d785ca24b648ef91f577d2dda49ab006ff6ac3abcd63
MD5 cb859ee46dbd7954854895945c565809
BLAKE2b-256 4f58853d0599165202d7e92ad205200e1bf8571d0d58188e6dbe77b4c8e30b19

See more details on using hashes here.

File details

Details for the file steady_cell_phenotype-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: steady_cell_phenotype-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for steady_cell_phenotype-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2e5b7bf43272a58b3eb9b0419f7a54f7d03424f27dd16bf6ef218b29815caa28
MD5 2c76317389d1412568540030414d1e06
BLAKE2b-256 f825bfdf6fa56d921fc456d49a5293a11301a7e390fa1824be4399c946d1e49a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page