Skip to content

Updates for DevCell project#314

Merged
murrayrm merged 13 commits intoBuildACell:mainfrom
murrayrm:devcell_updates-10Sep2025
Oct 14, 2025
Merged

Updates for DevCell project#314
murrayrm merged 13 commits intoBuildACell:mainfrom
murrayrm:devcell_updates-10Sep2025

Conversation

@murrayrm
Copy link
Collaborator

This PR has a number of changes driven by work I am doing for Schmidt Sciences as part of a Developer Cell project.

Standardized keyword arguments

  • Updated keyword argument processing to catch unknown keyword parameters. This was mainly a matter of popping keyword argument off of functions that use **kwargs and making sure that the bottom most call to various objects either checked to make sure all keyword argument were processed or didn't use them at all (in which case the system will generate an error).
  • Updated the example Jupyter notebooks, which had many cases of improper keyword arguments (e.g., show_materials instead of show_material).
  • Changed most instances of keyword arguments to use **kwargs, which is the usual Python convention.

Updated parameter file handling

Parameter files are now searched for in multiple locations:

  1. The current directory
  2. The directories in the BCP_PATH environment variable (separated by colons on Unix/MacOs; semicolons on Windows)
  3. The source code directory

The last of these allows parameters to be stored in the components/, mechanisms/, and mixtures/ directories and accessed using a path like 'mixtures/pure_parameters.tsv'.

The User Guide has also been updated to describe the changes (and move the documentation from a tutorial notebook to a RST file).

PURE mixture

Added a BasicPURE mixture that implements the mechanisms needed to model protein expression with PURE, including energy and resource utilization. The default parameters are available in 'mixtures/pure_parameters.tsv'.

Spelling corrections

Fixed the spelling of "degradation" and "Michaelis-Menten" throughout the package.

I also updated the enzyme parameters to use enzyme, substrate, and product instead of Enzyme, sub, and prod (inconsistent usage).

Note that these changes will break old code since many function and parameter names have changed. Because of this, we may want to bump the minor version number (versus the patch number).

Smaller changes

  • DNA can now have a compartment.
  • Added linefeeds to pretty_print and changed some of the spacing.
  • Updated modified code to use PEP8 standards: as I modified functions and files, I updated code to match PEP8 style conventions. This was not done uniformly through all of the code, only on the sections that I touched (I'll use a separate PR to bring everything into a consistent coding and documentation style).
  • Updated docstrings to start matching standard Sphinx format. The main change was to have the first line of a docstring be a short description of the function. Like the code updates, I only did this in functions/files that I was touching for other reasons, so needs to be done more uniformly (separate PR).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the PURE mixture here correspond to the PURE models that Zoila built here: https://github.com/zjuradoq/PURE_CRN_models

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not yet. The BasicPURE mixture is just EnergyTxTL with energy coming from ATP (versus 3PGA) and different parameters (in 'mixture/pure_parameters.tsv'). But I do want to add the more detailed model in as an additional mechanism.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we change all parameter files to use .tsv?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure. Let's discuss this on #304, since if we fix things there, we can also decide on default file names. For now, I didn't do anything with the examples (partly because they are not in the actual distribution, but also because it is still valid to use .txt files).

Copy link
Collaborator

@ayush9pandey ayush9pandey left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Thanks for all the changes. I have added a couple of comments above.

I haven't run the notebooks individually but the tests pass so we can merge when you're ready.

@murrayrm murrayrm merged commit 9466231 into BuildACell:main Oct 14, 2025
9 checks passed
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.

2 participants