-
Notifications
You must be signed in to change notification settings - Fork 8
Added attributes to the MonomerCounts listener #1466
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
base: master
Are you sure you want to change the base?
Conversation
…ledge_base_raw.py.
…ted test with 2020 data.
…olve state function within protein_degradation.py.
…nd written to the monomer_counts.py listener.
rjuenemann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mpg19 - another great PR! See comments.
I'd recommend merging your other PR into master first, then pulling master into this branch. I did not review the files that overlapped with the other PR - let me know if there are different changes in those than the other PR. If possible, I also think we should merge the PRs into master on separate days to make sure the longer Jenkins tests clear the other one first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
countsToMolar seems like the duplicate of a listener enzyme_kinetics? Additionally, since totalMonomerConcentrations and freeMonomerConcentrations can be created after the sims from monomerCounts, freeMonomerCounts, and countsToMolar, I would suggest doing the counts -> concentration conversion in the analysis scripts to save in time and memory used in simulation outputs.
| # Update monomerCounts | ||
| # Update monomerCounts and free monomer counts at the start of the time step: | ||
| self.monomerCounts = bulkMoleculeCounts[self.monomer_idx] | ||
| self.freeMonomerCounts = self.bulkMolecules.container.counts()[self.monomer_idx] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this differ from self.monomerCounts?
| # write the number of elongated proteins to the listener | ||
| self.writeToListener('MonomerCounts', 'monomersElongated', self.bulkMonomers.counts()) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help me understand why this gives the number of proteins elongated this time step? Does it not return the total counts of that protein?
| self.h2o = self.bulkMoleculeView(sim_data.molecule_ids.water) | ||
| self.proteins = self.bulkMoleculesView(proteinIds) | ||
|
|
||
| # Complex view for future use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a ToDo here for connecting this to something in the future?
| )) | ||
|
|
||
| # Record how many monomers were calculated to degrade: | ||
| counts_degraded = self.proteins.counts() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help me understand why this gives the number of proteins degraded this time step? Does it not return the total counts of that protein? If there's something you feel would be helpful explaining how views work please link it or add it to the PR, thanks!
…olar concentration at time 0.
…ar = np.zeros(1, np.float64)
Merging updated version of tanslation-update into branch.
…g methods to each other.
…longation listener for more clarity.
This PR adds attributes to the
models/ecoli/listeners/monomer_counts.pylistener for keeping track of the number of proteins degraded (monomersDegraded) and synthesized (monomersElongated) at each time step in a given simulation. Since the number of proteins degraded and synthesized is calculated using each monomer’s corresponding free count at the start of each time step, this value is recorded as well (freeMonomerCounts).A conversion variable called
counts_to_molaris calculated at each time step using the current cell mass to convert each monomer’s free counts to a concentration value. Both the free monomer concentration (freeMonomerConcentrations) for each protein and the counts_to_molar (counts_to_molar) conversion factor are also saved to the MonomerCounts reader within themodels/ecoli/listeners/monomer_counts.pylistener at each time step.All of the above new attribute are added to the the
MonomerCountsreader, joining theMonomerCountsattribute which tracks the total monomer counts for each monomer at every simulation time step (accounting for both free monomers and monomers in complexation, equilibrium, and two component system complexes for each monomer).These values can be accessed via the
MonomerCountsreader in any analysis script. Here is an example of a method that can be used to access the number of synthesized monomers for each individual monomer at every time step in a given simulation:free_monomers_synthesized = self.readFromListener("MonomerCounts", "monomersElongated")