Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy way to return derivatives? #13

Open
calebclayreagor opened this issue Nov 15, 2020 · 3 comments
Open

Easy way to return derivatives? #13

calebclayreagor opened this issue Nov 15, 2020 · 3 comments

Comments

@calebclayreagor
Copy link

Hi, I was wondering if there might be an easy way to return the time derivatives for the model / sample, or if I will have to modify the existing code to return this info. Cheers!

@amoghpj
Copy link
Collaborator

amoghpj commented Nov 15, 2020

Hi! This is an interesting question. Currently, BoolODE saves the ODE model definition in model.py (which returns a list of derivatives, the left hand side of the ODEs), and the kinetic parameters in parameters.txt. A simple way to accomplish getting the deterministic time derivatives would be to:

  1. read the parameters and the simulated datasets
  2. import model.py
  3. For each time point in the dataset (a.k.a a single cell), compute the deterministic derivative.

Apart from this, since the derivative calculation is done in boolode.simulator.eulersde(), it would be trivial to write to file the derivatives with the noise term at each step.
I am curious as to what you would like to use this for, and which of the above approaches would be more immediately useful for you.

@calebclayreagor
Copy link
Author

Thanks for the quick response. I'm working on implementing an inference method that relies heavily on the time derivative. I am hoping that the derivative from BoolODE (either deterministic or stochastic) will be approximately equivalent to the RNA velocity in a real single cell experiment. I'm thinking the stochastic derivative will be more like the velocity, but it may be too noisy for my purposes, in which case it's a moot point. If you have any insight, I would appreciate it!

@amoghpj
Copy link
Collaborator

amoghpj commented Nov 17, 2020

Sorry for the delay, I was hoping to read up some more today: in short, I still don't have a good response to your use case for RNA velocity. The derivatives for the mRNA only give an idealized view of transcription rate, unlike the transcript maturation process modeled in RNA velocity. That said, SERGIO uses essentially the same ODE framework, but I need to spend some time looking at how they generate their RNA velocity datasets. All this is to say that I don't have an informed opinion on how best to generate a ground truth RNA velocity dataset from BoolODE in its correct form. Will read up some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants