updated parameter processing#320
Conversation
|
I'm planning to merge this PR in the coming few days since I have another PR that builds on this. I don't think there is anything controversial in this one; it extends functionality and is backward compatible with all current code. |
WilliamIX
left a comment
There was a problem hiding this comment.
Conceptually I really like allowing Mechanisms to have default parameters! The implementation and other improvements also all look like sensible to me.
|
Thank you for all the changes. I agree that these are all useful. A couple of comments:
|
|
I was curious if these updates will necessitate a new version release of BioCRNpyler, specifically whether we anticipate any backward compatibility issues with existing code? Additionally, I noticed a few things regarding the membrane-associated components. Some of these are for the future, but there is one quick fix that would be great to include in this PR: Quick fix for this PR:
Inconsistency to review:
There is a separate Degradation_mRNA_MM mechanism, and I thought there was a non-MM version but not sure if this was phased out. Future upgrades (likely for a separate PR):
|
Yes, a new version will be published when we run the pypi release github action.
Would you please point out the line number where this is happening? Or a minimal example of the error so we can fix it. From my quick check, the following code works fine without the split character names: However, in debugging this issue, I did notice that the latest parameter changes added the ATP values to "600" (and similar other high values) in uM, so the
I'm not sure if I understood this comment:
|
The changes above are addressed here: murrayrm#2 |
…r unit features for correct sbml handling of units
868de77 to
8702c07
Compare
|
@ayush9pandey: I was able to cherry pick the commits and get things to work, except for the updated transport models, which created pytest errors (see error message here). Presumably this is because of some changes that were in I'm going to go ahead and merge this so that I can submit the next PR, which has a lot of additional changes for PURE. |
8702c07 to
2f14b63
Compare
|
I take it back. There were also some problems with the new GFP expression notebook, so I backed that one out and will just put in the unit change fixes. Merging as soon as the checks complete. |
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).