Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR provides a number of improvements and updates to parameter (and parameter file) processing, along with updates to unit processing and various changes to mechanisms and mixtures related to the parameter processing updates.
Parameters:
Parameter files are now stripped of lines starting with '#', allowing parameter files to contain comments. Parameter files that are distributed with the package now contain comments explaining their contents.
Components now check to see if parameter defaults are given by the mechanism that is calling the component, allowing mechanisms to define default parameter values. Default parameter files are provided for the following mechanisms: binding.py, enzyme.py, transport.py, txtl.py. Default parameters are in the matching '_parameters.tsv' files. These parameter values are overridden at the component or mixture level, so all previous behavior is preserved.
This change allows simplified descriptions of basic circuits without specifying any parameters. For example, the following code will generate a simulatable model with no additional specification of parameter values:
Parameter lookup within a component now allows the use of a "part type" in addition to the part ID. This was motivated by the 'binding' mechanisms, which get called for different purposes (eg, binding of two chemicals versus binding of protein to DNA). This functionality is implemented by allowing the
part_idfor a parameter lookup to be a list, with checking done in the order of elements in the list. A bit more detail below in the description of the changes to the default 'binding' parameters.Units:
Put in units for all parameter files that are distributed with the package and added unit definitions for a variety of unit name variations:
Note: unit conversions in parameter files are not yet supported. All parameters should use units of 'uM', 'uL', and 'sec' (this is noted in the user documentation).
Defined a set of standard units to allow easier specifications and conversions:
With these definitions, you can do the following:
Mechanisms
The 'binding' mechanisms (in
binding.py) now have default parameter values for two part types inmechanisms/binding_parameters.py: 'chemical_complex' and 'dna_protein'. This allows different uses of binding to have different default parameter values. (This uses the added functionality of allowing parameter lookups with a list ofpart_id's.)Found and fixed a bug where the
Energy_Translation_MMmechanism was missing a reverse reaction.Mixtures
Default parameter values for all mixtures are now loaded by default (by giving a default value to
parameter_file).Default parameter values for extracts and PURE are set to values that are somewhat plausible (though they definitely need some work in some future PR).
Changed
EnergyTxTlExtractto track ATP usage explicitly, rather than lumping it in with other nTPs. What was being done before was the NTP was being treated as an "energy" molecule. Given that we are likely to have other mechanisms that use ATP (but not other NTPs), it made sense to make it a separate molecule. (It comes up in this PR because I was adjusting the parameter values and noticed that there wasn't a separate description of ATP.)Documentation, examples, and unit tests
examples/gfp_expression.pythat shows comparisons between various extract mixtures (a PURE).