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

Projects
None yet
3 participants
@ortega2247
Copy link
Contributor

commented Oct 25, 2018

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.

ortega2247 added some commits Oct 25, 2018

@coveralls

This comment has been minimized.

Copy link

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.

@alubbock
Copy link
Member

left a comment

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

This comment has been minimized.

Copy link
Member

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 added some commits Jan 9, 2019

@ortega2247

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2019

I just made the change from notes to warnings

@alubbock
Copy link
Member

left a comment

Looks good to me. Thanks!

@alubbock alubbock merged commit c267f1e into pysb:master Jan 15, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.4%) to 79.198%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.