euba / BacArena

agent based modelling
GNU General Public License v3.0
26 stars 11 forks source link

modeling of external enzymes #165

Open jotech opened 3 years ago

jotech commented 3 years ago

How can I add an extra enzyme, amylase 3.2.1.1, into the BacArean system using addSubs() ? Thank you!

Best, Xuejian

Originally posted by @XuejianXiong in https://github.com/euba/BacArena/issues/161#issuecomment-808322625

jotech commented 3 years ago

external enzymes can be added either by defining diffusion and transport partial differential equations using the reactran package or by simply adding the external enzymes as an pseudo-organism which is metabolic model containing just the enzymatic reactions + exchange reactions. As an example, I used this code to model an sucrose invertase that splits sucrose to glucose and fructose:

suc <- sybil::modelorg(id = "sucrase", name = "sucrase")
suc@mod_desc <- "external enzyme"
suc <- addReact(suc, id="EX_cpd00076_e0", met=c("cpd00076[e0]"), Scoef=c(-1))
suc <- addReact(suc, id="EX_cpd00027_e0", met=c("cpd00027[e0]"), Scoef=c(-1))
suc <- addReact(suc, id="EX_cpd00082_e0", met=c("cpd00082[e0]"), Scoef=c(-1))
suc <- addReact(suc, id="sucrose_invertase", met=c("cpd00027[e0]", "cpd00082[e0]", "cpd00076[e0]"), Scoef=c(1,1,-1))
suc@lowbnd <- c(-10,-10,-10,0)
suc <- changeObjFunc(suc, react="sucrose_invertase", obj_coef = 1)
arena <- Arena(n=20,m=20)
arena <- addOrg(arena, Human(suc, maxweight=Inf, cellweight_mean=0.01), amount=10)

Hope this provides some help how it could be tackled!

XuejianXiong commented 3 years ago

Thanks a lot, @jotech. It is very helpful!

One question is what is "Human(suc, maxweight=Inf, cellweight_mean=0.01)"? Is "Human" a function? Thanks again!

All the best, Xuejian

shraddhakhirwadkar commented 3 years ago

Hello! Is there any way where I can pair the external enzyme to the model organism? For example, I wanted to pair the external enzyme with the model so that the products metabolized by the external enzyme can be consumed by the organism. Thank you for your help! Shraddha