Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Make a simulation function #20

Open
Guillawme opened this issue May 13, 2017 · 4 comments
Open

Make a simulation function #20

Guillawme opened this issue May 13, 2017 · 4 comments

Comments

@Guillawme
Copy link
Owner

Guillawme commented May 13, 2017

It would be useful to have a binding curve simulation function.

Such a function should take a kd value (or a vector of several values), a probe_concentration value (or a vector of several values), a hill_coeff value (or a vector of several values), and the minimum and maximum values of a concentration series, and should output a simulated binding curve (or several binding curves on the same plot, if a vector of values was provided for any parameter).

This would be a very useful tool for experimental planning.

@Guillawme
Copy link
Owner Author

Guillawme commented May 23, 2017

Done with commit 42ee1c2, but it would be nice to enhance it such it can plot several curves on the same graph for a series of Kd values (or Hill coefficient values, or probe concentration values, or all at the same time).

@Guillawme
Copy link
Owner Author

Guillawme commented May 23, 2017

@Guillawme
Copy link
Owner Author

Guillawme commented May 24, 2017

See also: http://t-redactyl.io/blog/2016/03/creating-plots-in-r-using-ggplot2-part-9-function-plots.html

According to this tutorial, one simply needs to add a + stat_function(...) line per curve to plot. How to automatically generate such lines when kd or n is a vector of several values instead of a single value?
Also, how to plot lines with different styles and a corresponding legend?

@Guillawme
Copy link
Owner Author

Guillawme commented Jun 14, 2018

Maybe this is easier to do with plotly? See add_trace().
It would also make sense to have an interactive graph to show this simulation.

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

No branches or pull requests

1 participant