Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 4.25 KB

README.md

File metadata and controls

54 lines (44 loc) · 4.25 KB

typhon

automatized generation of optimized Gillespie algorithm ###########################################################################################

TYPHON - FORTRAN90 STOCHASTIC SIMULATOR FOR BIOCHEMICAL REGULATORY NETWORKS Copyright (C) 2018 Quentin Vanhaelen

###########################################################################################

Instruction for installing and using the simulator (initially the code was used on a MAC OS, with gcc compiler).

  1. GENERATING THE SOURCE CODE FOR THE FORTRAN PROGRAM
  • You should copy the directory "STOCHASTIC-SIMULATOR" and all its content in a proper location on your computer.
  • The initial version of the "R-CODE-TYPHON-GENERATOR" routine was written using R 2.14.2, the version available here was edited using R 3.3.1 (in both cases on Window operatoring system), the routine does not require any particular package and use only basic algebric and algorithmic operations for matrices and vectors.
  • Inside the "R-CODE-TYPHON-GENERATOR" routine, you need to adapt the path to the directorY containing the source codes of the simulator and the path to the directory containing the files with the description of the kinetic model. By default the path is "C:\Users\Quentin\Documents\MY FUTURE PROJECT\CODE-ARXIV\", this should be adapted to your own installation.
  • Once the paths have been properly replaced, open your R program and copy paste the content of the file "R-CODE-TYPHON-GENERATOR" The routine wills tart automatically. Depending on the size of the network, several steps of the building process can take longer and eventually the program can get frozen for a short amount of time.
  1. RUNNNING THE FORTRAN PROGRAM
  • Once the "R-CODE-TYPHON-GENERATOR" is completed, go to the directory "CODE-TYPHON/SRC". Here all the source files generated are located. You should go to the source file called "SSA_output_data.f90" and "output_statistics.f90" and check the paths for the output files which will be generated by the typhon code. There is a path sets by default, but it should be adapted to your own installation.
  • There is a "makefile" where the path "LIBDIR = $(HOME)/Unix/fftw/lib" (line 43) should be adapted to your own installation.
  • Once these adaptations have been done, you can compile the code using your FORTRAN compiler. For that you need to popen a shell, go to the "CODE-TYPHON" directory and use the command "make typhon" (The code was used on a MAC OS with gcc compiler).
  • The directory "CODE-TYPHON/OBJ" containts the files generated after compilation.
  • The executable is available in the directory "CODE-TYPHON".
  • Once the compilation is done and successful, the code can be started on the same shell using the command line "./typhon"
  • The code will display the progression of the simulation in terms of number of runs and physical time of the simulation.
  1. IMPORTANT NOTE:
  • Once the source files have been generated, it is possible to modify several parameters directly inside the source files. This is useful if one wants to run several simulations with different initial conditions (changes should be done in the file SSA_scaling_set_up.f90) or with different kinetic rate values for a given reaction for example (in that case, the modification should be done in SSA_input_data.f90)
  • It is also possible to modify the values of the delay, however the user should keep the following facts in mind: The code is using a different distribution and procedure for selecting the reactions with a delay and the ones without delay. It means that once you have encoded a non-zero delay for a given reaction in the file "reaction-max.csv", this reaction will be treated as a delayed reaction even if you set the delay to zero within the source file SSA_input_data.f90 afterward. Setting a delay to zero for a delayed reaction will lead to algorithmic errors. Thus rather than setting a non zero delay to strictly zero, you should choose a very small value like 0.00001. Finally, if you want to add a delay to a reaction for which the delay was set to zero when generating the source file, the only way to do it properly is to
    modify the value of the delay inside the "reaction-max.csv" file and generate the source file again.