Closed Ma-Yier closed 1 year ago
Thank you very much, I will work on it as soon as possible. That might be in a couple of days
Thank you once again for your assistance. Your explanation was very helpful in resolving the issue. Ideally, the user should ensure that there are no naming conflicts between genes and reactions. I would not automate the renaming in straindesign because it might be unintended by the user. Hence, the error is now detected, and an exception is raised, providing the user with guidance on which gene names/IDs are affected and how to rename them.
Straindesign permits the formulation of constraints based on gene names, gene IDs, and reaction IDs. To ensure this works, a constraint like "ADK1 = 0" must refer specifically to either a gene or a reaction with no room for ambiguity.
I have implemented the fix, and it will be included in the upcoming release. If you like to receive the update earlier, feel free to check out the master branch.
Thanks for your help.
Invoke
compute_strain_designs
for optcouple method and setgene_kos=True
. In the functionextend_model_gpr
of networktools.py, some bugs may occur when processing some special data. For example, the iMM904 model in BiGG database has a reaction namedADK1
and also has a geneYDR226W
also namedADK1
. Thew._model
is NoneType assigned by line 185:In this case, the
w.id
will be assigned toADK1
in line 187:But because there is a reaction named
ADK1
that is already existed, it will fail to add reactionw
to model in line 188 :Then because
w._model
is still NoneType, this will cause AttributeError in line 189:This is because in cobra.core.reaction, line 1564 to 1566:
The
model
will be None, and finally in line 1612:Here the
model
is invoked but it is still NoneType.