Replies: 1 comment 1 reply
-
Hmm I see! reactants = two_species[0].replace(" ", "").split("+")
products = two_species[1].replace(" ", "").split("+") For if len(two_species[0].split(" ") > 1 & not "+" in two_species[0]:
reactants = two_species[0].replace(" ", "").split("+")
if len(two_species[1].split(" ") > 1 & not "+" in two_species[1]:
products = two_species[1].replace(" ", "").split("+") should fix this. We could also prevent state_transition from triggering at all if the above mentioned conditions arise. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @formersbach,
Let's create a model from a text file including unregistered rule words.
Prepare
test_binding.txt
including:Text-to-model conversion
When running the code, we will get the following error message.
This works as we expected.
This is because we already have a similar rule ('bind') in the reaction rules.
To make it correctly work, we need to run the following code before converting the text:
OK, let's move on to next example. Imagine that we want a model of ubiquitination.
Prepare
test_ubiquitination.txt
including:Since there is no rule like 'ubiquitinate', here I want biomass to raise
DetectionError
to let users know it.However, when you run the following code:
This does NOT raise errors but creates model.
When you look into the resulting model, you will soon find the model is wrong.
For example, in
name2idx/species.py
:It seems that this unregistered word is recognized as
state transition rule
.Do you have any ideas of how we should tackle this problem?
Ideas and PR to fix this is more than welcome!
Beta Was this translation helpful? Give feedback.
All reactions