Skip to content

popellab/SPQSP_IO_TNBC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QSP FILES - SBML CONVERSION

This section first examines the Systems Biology Markup Language (SBML) files and converts them to C++ files which are compatible with SUNDIAL/CVODE package. All required files for SBML conversion are available at https://github.com/popellab/SPQSP_IO/tree/main/sbml_cvode and https://github.com/popellab/SPQSP_IO_TNBC (Wang_QSP_Model.xml and vct_simulation.xml). Nevertheless, in order to use the spatial QSP model, this step is not necessary since the SBML conversion has already been performed by the developer.

  1. Start program to at package directory.
    Replace <pkg_dir> with package directory.
    $ cd <pkg_dir>
    $ python converter_gui.py

  2. Import SBML model file (Wang_QSP_Model.xml).

  3. Click “Load setting” button and load the default configuration file (vct_simulation.xml).
    a. The configuration help to specify simulation time, relative, and absolute tolerance (ignore the hash mismatch error).
    b. Recommend: Click “Validate units” and select “convert units”.

  4. Deactivate “Use extra adjustable variables” and click “Analyze model” to apply the configuration to C++ files. Select the output directory and type in the Namespace (Cancer_VCT).

  5. Export files (type ODE_system in the Export space) that are necessary for spQSP model, including:
    ODE_system.h/ODE_system.cpp: QSP model class header and implementation files (derived from class CVODEBase).
    Param.h/Param.cpp: model parameter classes (derived from class ParamBase).
    ODE_system_params.xml: model parameter file.

The generated outputs must be slightly modified to be able to run the spatial QSP model. Their final form, ready to use, can be found at https://github.com/popellab/SPQSP_IO_TNBC/tree/main/TNBC/SP_QSP_TNBC/ode and https://github.com/popellab/SPQSP_IO_TNBC/tree/main/TNBC/TNBC_sim/resource (param_all.xml).


Spatial QSP SIMULATION

(The following instructions are similar to the guidelines written by Shuming Zhang for a different spatial QSP model: https://github.com/popellab/spQSP-omics-2021)

Ubuntu Operating System Configuration (Only required for Windows User)

This step helps to setup the Ubuntu operating system in for Windows user via virtual machine.

  1. The virtual machine host: VirtualBox is available at https://www.virtualbox.org/ 2 . The Ubuntu Desktop image (Latest version 20.04.2) is available at http://www.releases.ubuntu.com/20.04/
  2. Enter the “Oracle VM VirtualBox Manager”, press “New” to create the virtual machine with all default settings. (Recommend allocate 20 GB for storage and 2 GB of RAM)

Notice: All following operations should be done in the Linux operating systems (the virtual machine), NOT Windows.

Required Library Installation

Libraries: SUNDIALS: version:4.0.1; Boost: version 1.70.0

-SUNDIALS

  1. Download is available at: https://computing.llnl.gov/projects/sundials/sundials-software
    The following files are downloaded: sundials-4.0.1.tar.gz

  2. Decompress Archieve:
    $ tar xzf sundials-4.0.1.tar.gz

  3. Install cmake if not already available:
    $ sudo apt install cmake-curses-gui

  4. Create install and build directories:
    $ mkdir -p ~/lib/sundials-4.0.1 $ mkdir -p ~/Downloads/sundials-build $ cd ~/Downloads/sundials-build

  5. Configuration
    $ ccmake ~/Downloads/sundials-4.0.1
    Press c key to enter configuration interface Set install directory: CMAKE_INSTALL_PREFIX set to ~/lib/sundials-4.0.1 Set example install directory: EXAMPLE_INSTALL_PATH set to ~/lib/sundials-4.0.1/examples Press c repeatedly to process configuration; press g to generate Makefile and exit configuration.

  6. Build
    From ~/Downloads/sundials-build/
    $ make
    $ make install

-Boost Version 1.70.0

  1. Source code available at: https://www.boost.org/users/history/version_1_70_0.html
    The following files are downloaded:
    boost_1_70_0.tar.gz

  2. Decompress the archive:
    $ tar xzf boost_1_70_0.tar.gz

Official instructions is available at: https://www.boost.org/doc/libs/1_70_0/more/getting_started/unix-variants.html

  1. Building separately-compiled boost libraries
    $ cd ~/Downloads/boost_1_70_0
    $ ./bootstrap.sh --prefix=$HOME/lib/boost_1_70_0
    $ ./b2 install

Model Simulation

The Makefile of this model is available at: ~/TNBC/TNBC_sim/linux/

To prepare spQSP for a simulation, write: $ make TNBC_sim

Then, to show all options to configure the simulation: $ ./TNBC_sim -h

It will show the following options:

-h [ --help ] || produce help message
-s [ --seed ] arg (=0) || seed value
-t [ --time ] arg (=0) || total number of steps
-p [ --param-file ] arg || parameter file name
-o [ --output-path ] arg (=defaultOut)
|| output file base path
--outParam arg (=outParam.xml) || save a copy of parameter file
-B [ --brief ] || print brief tracking info to stdout
-S [ --stats ] || whether to print stats
--stats-interval arg (=1) || interval to save stats
-G [ --grid ] arg (=0) || whether to print grid info. 0: nothing;
|| 1: cell only; 2: grid only; 3: both.
--grid-interval arg (=1) || interval to print grid information
--save-state-start arg || save state starting slice
--save-state-interval arg || save state interval
--load-state arg || load save state file

Example of a line that runs a simulation and creates a set of output files in a folder called Outputs:

$ ./TNBC_sim -t 1600 -p ../resource/param_all.xml -o Outputs -B -S -G 1

It is recommended to run $ clean
before running $ make TNBC_sim
if the code has been modified in between simulations.

About

Code of the extended spQSP version for TNBC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published