DavisLaboratory / SimulatorGRN

1 stars 2 forks source link

how to generate time-series data with this simulator #1

Open intekhab8 opened 4 years ago

intekhab8 commented 4 years ago

@bhuvad,@gbass

Could you kindly explain how the time-constant (tau) here can be used to generate time-series data? Currently the simulated dataset has steady-state levels of gene-expression, but I want to use the package to generate multiple datasets (i.e. gene-expression at time = 1, 2, ... 10).

bhuvad commented 4 years ago

Hi Intekab,

I would like to first clarify that modifying the time-constant will not allow you to generate time-series data. The time constant in this system represents the steps required for a specific gene to achieve steady-state. As an example, say a gene A activates a gene B with activation of 0.6; a time-constant of 0.5 would indicate that 2 units of time are required to achieve that activation, or that the activation of B by A is 0.3 per unit of time. Do not confuse units of time with time points, units of time could be 24h however we may be interested in capturing measurements at time points 0h, 6h, 12h, 18h, and 24h. The time-constant induces noticeable changes in time-series data only and will have no effect on steady-state measurements (when B gets an activation of 0.6 eventually, given enough time, i.e. when dB/dt = 0). This is also reflected in the full model described in the paper from the Saucerman lab (Kraeutlar et al., BMC Syst. Biol., 2020).

Now to answer your question, you will be able to generate time-series data using the code in this repository, however, you will need to make one small modification. You will need to change the solver you use to compute expression values from the ode model. The current solver is a non-linear equation solver for steady-states (from the nleqslv R package). You could use the pracma::ode23() function from the pracma R package. This solver allows you to compute data for intermediate time points using the same objective function produced using my code.

I hope this information helps you successfully generate time-series data. Please feel free to ask me any further questions that can help you achieve this task. It would be great to integrate this functionality if you decide to implement it!

Cheers, Dharmesh

intekhab8 commented 4 years ago

thanks so much! will try to implement and keep you posted!

bhuvad commented 4 years ago

It will be great to have added functionality in this code. Let me know if you come across any issues while coding it up. It might even be worth writing this up as a package at some point!

Cheers, Dharmesh