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

Fix a minor bug in delay simulator #103

Merged
merged 26 commits into from
Jun 17, 2021
Merged

Fix a minor bug in delay simulator #103

merged 26 commits into from
Jun 17, 2021

Conversation

ayush9pandey
Copy link
Collaborator

@ayush9pandey ayush9pandey commented Jun 9, 2021

  • Added has_delay function for Model objects.
  • Added timepoints attribute to DelaySSASimulator for it to be able to retreive this back after simulation ends.
    (Merge after inference-dev PR Inference updates, new features, and bug fixes #102 gets merged to see changes clearly)

Also, changes to gitignore to remove generated output files.

@ayush9pandey ayush9pandey marked this pull request as draft June 9, 2021 23:38
@ayush9pandey ayush9pandey linked an issue Jun 9, 2021 that may be closed by this pull request
@ayush9pandey ayush9pandey marked this pull request as ready for review June 15, 2021 17:29
@ayush9pandey ayush9pandey merged commit 8741f73 into dev Jun 17, 2021
@ayush9pandey ayush9pandey deleted the delay-bug branch June 17, 2021 16:42
ayush9pandey added a commit that referenced this pull request Oct 21, 2022
* Inference updates, new features, and bug fixes (#102)

* add custom prior documenting notebook
* gaussian prior fix
* bug fixes for log uniform prior and pdf computation bound checks
* option to set initial parameter seed. print convergence diagnostics
* first cut at lmfit support for inference
* renaming inference files and functions to be agnostic to external parameter inference packages
* 1. inference.pyx bug with multiple measurements fixed. 2. Added LMFit support for least squares type parameter id. 3. Refactor inference example notebooks. 4. Added inference example notebooks.
* first cut at delay support for inference
* change convergence_diagnostics error to warning
* fix tests
* refactor inference examples
* add inference test
* add emcee version requirement for progress bar update
* add requirement for scipy>1.6.4 and add lmfit
* testing suite for inference
* allow lower scipy versions
* add empty line at end of test_inference

* Rules and simulator upgrade (#106)

* DeterministicDilutionSimulator, SafeModeSSASimulator, TimeDependentSSASimulator, and Core Lineage/Propogate Simulators deleted

* Major Rule Update:
** Rules fire consistently, even when there are no reactions.
** New Rule types and firing frequencies, including specific times, every timestep, and every update.
** Tests of these new rule features

* Recomputed all the frozen sim results: Why? Previously, delay reactions firing if no reactions could fire. Propensities are now recomputed ever dt, so the old results also are no longer valid.

* SafeLineageCSimInterface created: this interface is analogous to the SafeModelCSimInterface and does some basic checking (and warning messages) at the expense of speed.

* lineage notebooks cleanup: added turbidostat example for lineages, lineage examples split into two notebooks

* Lineage fixes: Fixed an indexing bug, py_SimulateTurbidostat returns dataframes, and Turbidostat example plotting, improved py_SimulateTurbidostat wrapper

Co-authored-by: William Poole <wpoole@caltech.edu>

* Fix a minor bug in delay simulator (#103)

* delay simulation bug fix
* fix error from merge dev

* Removing Bioscrape XML and adding SBML Functionality (#108)

* Removed Bioscrape XML writing, bioscrape XML from the examples, and cell lineages from the advanced examples

* remove propensity_annotation keyword, always write annotation to bioscrape exported SBML models

* delay annotation working with propensity annotation

* remove underscore shenanigans in rule writing

* refactor import sbml

* add rule annotation. add rule testing with annotation

* fix ODE rule SBML writing and loading

* remove all underscore-to-parameter code

* check basic notebook - runs without problems

* turn off input_printout in propensity test

Co-authored-by: William Poole <wpoole@caltech.edu>
Co-authored-by: ayush9pandey <ayush.9.pandey@gmail.com>

* New features: Sensitivity analysis (#111)

* add priors, add beta and gamma prior, and custom prior, documentation to the notebook

* py_inference wrapper added

* option to set initial parameter seed. print convergence diagnostics

* Added LMFit support for least squares type parameter id. and added inference example notebooks.

* delay support for inference

* add tests for sensitivity analysis

* apply rules in sensitivity analysis

* minor changes

* version update to 1.0.3

* Fixed some bugs involving SimulateSingleCell with length 0 or 1 timepoints arrays.

* Deterministic safe mode (#113)

* Fixed deterministic safemode tests
* raises errors in deterministic safe mode - errors do not stop integration
* less parallelization so tests don't use up all the RAM

Co-authored-by: William Poole <wpoole@caltech.edu>

* Slight change to how linege's SimulateSingleCell handles simulation with a single timepoint, to avoid infinite loops.

* Wp inference (#118)

* Add simulation control keywords rtol atol and hmax to inference and bioscrape deterministic simulation

* fixed a bug which caused the CSimInterface to not update its parameters

* more init_seed options, including guassian and normal priors + checking for positivity

* filename option in py_inference

* loguniform prior sampling initializaiton

* parameters now can vary in log space

* precision added to sensitivity analyss and Inference objects now save a list of params along with costs

* ability to skip resetting up the cost function + optional file writing.

* ability to reset PID default parameters programatically

Co-authored-by: William Poole <wpoole@caltech.edu>

* Delete test_printing.py

* Infinite loop fix (#115)

* Improved infinite loop fixes.
* Delete test_printing.py

Co-authored-by: Sclamons

* fix docstring

* Fixes issue #123 : sbml_warnings keyword error (#134)

* fix sbml_warning issue with load reaction

* Fix sensitivity analysis bug #126 and #125 (#136)

Summary of changes:
* fix sensitivity analysis bug that changed original parameter values

* add docstring to py_sensitivity_analysis

* delete old files and manual fix to match dev by deleting wrongly committed files

* A cluster of changes to inference  (#138)

New features:

* `parameter_conditions`: A new argument for `py_inference` that lets you set parameter conditions for data trajectories. Similar to `initial_conditions` that are on the model states, this sets conditions on parameters.
* Add multiple files to write MCMC results: `mcmc_results.csv` writes the samples and `mcmc_results.txt` writes `cost_progress`.
* Add stricter inference testing (optional) and add debug to stochastic pid interface

Refactoring of Inference module:

* remove old init_param_vals code that seemed not to be in use
* update plot_mcmc_results behavior
* set convergence_check default to False and modify gitignore
* fix stochastic trajectories likelihood initial state set
* add param condition to inference unit tests
* refactor extract_data and check that parameter being estimated is not being varied through parameter_conditions
* remove emcee thread argument
* longer inference test, and change discard argument of emcee

Co-authored-by: William Poole <wp_ix@hotmail.com>

* Fix #135 by adding dtype double to inference timepoints and data (#140)

* update version number to 1.1.0

Co-authored-by: William Poole <wp_ix@hotmail.com>
Co-authored-by: William Poole <wpoole@caltech.edu>
Co-authored-by: sclamons <sclamons@SEC-Macbook-Pro.local>
Co-authored-by: Sam Clamons <sclamons@gmail.com>
ayush9pandey added a commit that referenced this pull request Feb 25, 2023
* delay simulation bug fix
* fix error from merge dev
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.

Delay support for inference
2 participants