segrelab / comets

Computation of Microbial Ecosystems in Time and Space
19 stars 10 forks source link

two new functions: metaboliteDilutionRate and specificMedia #20

Closed jeremymchacon closed 4 years ago

jeremymchacon commented 4 years ago

Hey Ilija, here's the pull request for the metaboliteDilutionRate and the specificMedia.

As discussed, metaboliteDilutionRate is a parameter that affects all external metabolites (it is not implemented in a spatially-explicit way as of yet). Setting the value between 0-1 will dilute a metabolite per unit time, similar to deathRate. As a result, by combining this with an equal deathRate and a mediaRefresh, we can do a chemostat.

e.g.

metaboliteDilutionRate=0.1 # removes 10% of each metabolite each hour

specificMedia introduces four new parameters. All together, it allows one to specify which metabolites to track. That said, it currently always does per-box, i.e. it is not a "totalSpecificMedia" implementation. That wouldn't be too hard for the future, however.

e.g.

writeSpecificMediaLog = true specificMediaLogName = spec_media.txt specificMediaLogRate = 10 specificMedia = ac[e],nh4[e],glc-D[e]

This set of parameters will track acetate, ammonia, and glucose every 10 time steps.

dukovski commented 4 years ago

All done.

On Mon, Nov 25, 2019 at 12:57 PM jeremymchacon notifications@github.com wrote:

Hey Ilija, here's the pull request for the metaboliteDilutionRate and the specificMedia.

As discussed, metaboliteDilutionRate is a parameter that affects all external metabolites (it is not implemented in a spatially-explicit way as of yet). Setting the value between 0-1 will dilute a metabolite per unit time, similar to deathRate. As a result, by combining this with an equal deathRate and a mediaRefresh, we can do a chemostat.

e.g.

metaboliteDilutionRate=0.1 # removes 10% of each metabolite each hour

specificMedia introduces four new parameters. All together, it allows one to specify which metabolites to track. That said, it currently always does per-box, i.e. it is not a "totalSpecificMedia" implementation. That wouldn't be too hard for the future, however.

e.g.

writeSpecificMediaLog = true specificMediaLogName = spec_media.txt specificMediaLogRate = 10 specificMedia = ac[e],nh4[e],glc-D[e]

This set of parameters will track acetate, ammonia, and glucose every 10 time steps.

You can view, comment on, or merge this pull request online at:

https://github.com/segrelab/comets/pull/20 Commit Summary

  • metaboliteDilutionRate is a new parameter that specifies the per-hour global rate of metabolite dilution. it defaults to 0.0. This is useful to use in conjunction with a death rate and mediaRefresh to piecemeal together a chemostat simulation
  • implemented specificMedia. now, using the parameters writeSpecificMediaLog (boolean), specificMediaLogRate (int), specificMediaLogName (string), and specificMedia (string), one can have only a subset of all external metabolites logged. specificMedia needs to be a comma-separated string of external metabolites, for example specificMedia = ac[e],nh4[e],o2[e]. write now I dont have it timestamp, i will figure that out next
  • specificMediaLogName is now appended with the timestamp if timestamp is set true

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/segrelab/comets/pull/20?email_source=notifications&email_token=AAWJ2EXPWZC5XROWDWSXO3LQVQGZ5A5CNFSM4JRMUG5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H34MNOQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWJ2EU26BRKUHPSGVZ4RDDQVQGZ5ANCNFSM4JRMUG5A .

-- Ilija Dukovski, Ph.D. Research Scientist Bioinformatics Program Boston University 44 Cummington St. Boston, MA 02215