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

Drug binding macro that mimics experimental settings when a perturbation is added after a reaction is initiated #387

Merged
merged 5 commits into from Jan 15, 2019

Conversation

ortega2247
Copy link
Contributor

This macro generates the reversible binding reaction DRUG + SUBSTRATE | DRUG:SUBSTRATE that only gets triggered when the simulation reaches the time point t_action. The idea of this macro is to mimic experimental settings when a reaction is started and later on some kind of perturbation is added to the system. This type of reaction has been used fairly frequent in the Lopez lab and I thought it could be added as a macro.

@coveralls
Copy link

coveralls commented Oct 25, 2018

Coverage Status

Coverage decreased (-0.4%) to 79.198% when pulling 85d280e on LoLab-VU:drug_binding_macro into b8e036c on pysb:master.

Copy link
Member

@alubbock alubbock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea. Some thoughts which come to mind

  • Perhaps the components for generating t_obs should be factored out into a separate macro, since having a time observable is a common requirement. I'd probably rename t_obs to t, k_t to __k_t and Monomer t to __t. This helps to separate "internal" components from the component of interest to the modeler, t (the observable).
  • The time tracking approach won't work on stochastic simulations. This should be clearly stated in the docs.
  • The component names are hard-coded, which limits multiple applications of the macro within a model. I'd suggest generating these names dynamically, e.g. kf_<drug name>_<substrate name>

@alubbock
Copy link
Member

alubbock commented Jan 9, 2019

I would suggest upgrading the Sphinx documentation notes to warnings, since it's important to be clear that using e.g. SSA with the macro will lead to incorrect results.

Otherwise, I think this looks good to merge.

@ortega2247
Copy link
Contributor Author

I just made the change from notes to warnings

Copy link
Member

@alubbock alubbock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

@alubbock alubbock merged commit c267f1e into pysb:master Jan 15, 2019
@ortega2247 ortega2247 deleted the drug_binding_macro branch July 11, 2019 16:57
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

Successfully merging this pull request may close these issues.

None yet

3 participants