Package: genexpsim
genexpsim – Gene expression simulation for circadian clock and coupled cellsInstallation from PyPIpip install genexpsim[full]IntroductionCurrently three observables (also called levels) are simulated:Number of active genes $n_\text{g}(t)\in[0,N_\text{gc}]$Number of mRNA molecules $n_\text{m}(t)$Number of protein molecules $n_\text{p}(t)$with gene copy number $N_\text{gc}=2$ (command-line option--ngc) and six processes with different rates:processrate $r_i(t)$default constantcommand-line optionDNA inactivation$k_\text{off}\cdot n_\text{g}(t)$$k_\text{off}=8,\text{h}^{-1}=\frac{1}{7.5,\text{min}}$--koffDNA activation$k_\text{on}\cdot\left(N_\text{gc}-n_\text{g}(t)\right)$$k_\text{on}=1.5,\text{h}^{-1}=\frac{1}{20,\text{min}}$--konmRNA transcription$k_\text{m}\cdot n_\text{g}(t)$$k_\text{m}=225,\text{h}^{-1}=3.75,\text{min}^{-1}$--kmmRNA degradation$\gamma_\text{m}\cdot n_\text{m}(t)$$\gamma_\text{m}=0.75,\text{h}^{-1}=\frac{\ln2}{55,\text{min}}$--gmprotein translation$k_\text{p}\cdot n_\text{m}(t)$$k_\text{p}=1.25,\text{h}^{-1}$--kpprotein degradation$\gamma_\text{p}\cdot n_\text{p}(t)$$\gamma_\text{p}=0.35,\text{h}^{-1}$--gpVariable rates are implemented either DNA activation, DNA inactivation or mRNA transcription. Then for the respective rate the constant $k_i$ is replaced byk_i\rightarrow k_i\left(1-\beta_i\cos(\omega_i t-\phi_i)\right)with frequency $\omega_i$, phase $\phi_i$ and amplitude $\beta_i\in[-1,1]$ which can be set via command-line options--omega,--phiand--betarespectively.UsageThe genexpsim package includes classes for different kinds of simulation:genexpsim.GES: single cell simulation with constant ratesgenexpsim.GESCircadianDNAActivation,genexpsim.GESCircadianDNAInactivation,genexpsim.GESCircadianRNATranscription: single cell simulation with variable rates for DNA activation, DNA inactivation or mRNA transcriptiongenexpsim.GESNetworkCircadian: multiple cell simulation with variable rates for DNA activation, DNA inactivation or mRNA transcriptiongenexpsim.GESMultiGenes: single cell simulation with multiple genes, variable rates for DNA activation, inactivation or mRNA transcription are possibleIt can be used withimportgenexpsimsim=genexpsim.GES(duration=120.0)sim.init_constants(koff=8.0,kon=1.5,km=225.0,gm=0.75,kp=1.25,gp=0.35)sim.run()sim.plot_rates()sim.plot_events_levels()sim.print_summary()The simulation object is firstly created (here with a duration of 120 hours). Then different constants are initialised and then the simulation is started withrun(). The functionsplot_rates()andplot_events_levels()are for plotting rates, events and levels. The functionprint_summary()prints a summary of rates and levels. These last three functions can take file names as input argument. If omitted, then the figures are shown interactively and the summary is printed on stdout. See details in the documentation of the class (e.g. withhelp(genexpsim.GES)).Command-line scriptThe scriptgenexpsimcan be used to run the different simulations. A single cell simulation with constant rates can be obtained withgenexpsim-dpsvsim0_1c_output_dirHere the options-d,-pand-sstand for dumping the simulation to a pickle (.pkl) file, plotting the results to.pngfiles and printing a summary in a.txtfile, respectively. The option-vis for increased verbosity (-vvincreases even more). The results are saved in the given directory (heresim0_1c_output_dir). All options can be seen withgenexpsim-hA multi-cell simulation, e.g. for variable DNA activation can be obtained withgenexpsim-dpsv-t120-n100--variable_processDNA_activation--domega0.01sim1_100c_output_dirwhere-tspecifies the duration of simulation in hours (default: 24.0) and-nthe number of coupled cells. The parameter--domegaspecifies the standard deviation on omega for the randomly chosen omega per cell.If the machine has several CPUs the number of CPUs to be used can be set with the option--n_cpus:genexpsim-dpsv-t120-n100--variable_processDNA_activation--domega0.01--n_cpus4sim1_100c_output_dirA previously saved simulation file can be plotted and summarised without rerunning the simulation withgenexpsim-psv--dump_filesim0_1c_output_dir/seed_None_24.0h.pklDependenciesmandatory for the package:matplotlib,numpyandpandasoptional for the script:argcompletefor bash completion of command-line optionsCopyrightCopyright 2021–2023 Robert Wolffmahlzahn@posteo.deThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program. If not, seehttps://www.gnu.org/licenses/.