Closed maringos closed 7 years ago
@jotech I'm not sure where addAnyway
could be useful.
If I do this:
data(Ec_core)
bac1 = Bac(model=Ec_core, type="E. coli1",speed = 0)
arena = Arena(n=10, m=10)
arena = addSubs(arena, smax = 1, addAnyway = T )
I get an error: Error in mediac[[i]] : subscript out of bounds
How should it be possible to add metabolites if no organism was defined before, because the names of the metabolites (e.g. exchange reactions) need to be known beforehand?
I don't agree. It is disabled by default so nobody is getting confused by this and it is only used when in a deliberate way when you choose it @maringos .
And there are applications @euba, think about diffusion processes (actually I test its functionality this way) or environmental conversion where an substance is transformed to another which only then can be taken up (this is a very interesting ecological feature provided by reactran).
In your example the error occurred because parameter mediac
was not defined which is mandatory if you want to add a substance which is not in arena@mediac
. I extended the error for this case.
Many thanks for your message @jotech ; I did not comment how useful it is or when someone uses it; I just asked for a warning :)
But Eugen questioned the usefulness that's why I replied to him.
@jotech Ah ok, I didn't think about diffusion alone. That could be interesting indeed (-:
Yes this is true:) @euba and @jotech I am sorry for that; I have read the comment with less concentration than needed :P
changed to some more meaningful title
should we close it?
I agree :)
Dear developers,
I would like to suggest to add a warning when someone chooses to use
arena = addSubs(arena, smax = 1, addAnyway = T )
because someone may forget this general concept of BacArena: 'Organisms need to be defined first to determine what substances can be exchanged'and then he/she may observe no growth (at the best),
or this may lead to misleading results (if she uses another compounds and other organisms together at the same time)