Giter VIP home page Giter VIP logo

deepcme's Introduction

DeepCME

A deep learning framework for computing solution statistics of the Chemical Master Equation

This is the code accompanying the manuscript titled DeepCME: A deep learning framework for computing solution statistics of the chemical master equation by Ankit Gupta, Christoph Schwab and Mustafa Khammash PLoS Comput Biol 17(12): e1009623, 2021.

It contains the following files:

  1. main.py: This is the main python script which requires a configuration JSON file as input (see below). Based on this configuration file, a reaction network example is selected (from ReactionNetworkExamples.py), a deep neural network is trained (if requested), simulation-based output and sensitivity values are estimated (if requested), and the desired plots are generated.

  2. CME_Solver.py: The file contains subroutines that construct and train the deep neural network (DNN) with a feedforward structure. The architecture of DNN is determined by the parameters defined in the configuration JSON file. The trained DNN is used for output estimation as well as the computation of its parameter sensitivities w.r.t. all reaction network parameters.

  3. ReactionNetworkClass.py: This file contains a Python class called "ReactionNetworkDefinition" to describe a generic reaction network.

  4. ReactionNetworkExamples.py: This file contains classes that encode reaction network examples by inheriting the "ReactionNetworkDefinition" class from (ReactionNetworkClass.py). Note that for each example, the output functions must be defined using TensorFlow operations. Currently the file includes the four examples from the manuscript: independent birth death, linear signalling cascade, nonlinear signalling cascade and linear signalling cascade with feedback. More examples can be easily added based on these examples.

  5. data_saving.py: This file contains subroutines for saving and retrieving training/validation trajectories, saving training history and DeepCME estimated sensitivity values.

  6. simulation_validation.py: This file contains subroutines for estimating outputs with Monte Carlo simulations (with the stochastic simulation algorithm (SSA)) and the parameter sensitivities (with the Bernoulli path algorithm (BPA)). See the manuscript for more details on these methods. The parameters required for these simulation-based methods are taken from the configuration JSON file.

  7. plotting.py: This file contains subroutines for plotting bar charts comparing DeepCME estimated outputs and sensitivity values with those obtained with simulation-based methods and also the exact values (if available). A subroutine for plotting the loss function trajectory is also provided.

  8. ConfigFileDescription.txt: This text file describes the configuration JSON file for an example. These configuration files are stored in the Configs subfolder.

Command Line Execution Example

python main.py independent_birth_death.json

Dependencies

If you have any questions regarding the code, please contact Ankit Gupta at [email protected].

deepcme's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

arthurtheuer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.