system_to_metatool (
system,
metext=[],
metint=[],
generate_names=1,
)
Converts a Bio.Pathway.System object to a MetaTool input string.
Note that to be a valid input string, the enzyme names of the reactions
in the system must conform to the MetaTool requirements.
Enzyme names are automatically genrated from the catalys attribute of
each reaction using the following scheme:
enzymename = "".join([str(x[0]) for x in r.catalysts])
If an enzyme name has already been used, a positive integer will be
appended to this name to meet the MetaTool input requirements. If this
behaviour is undesired, set the optional parameter generate_names to
false. All enzyme names will the be E_x , where x is an unique integer.
The optional parameters metext and metint can be used to specify the
external and internal metabolites according to the following rules:
If metext is set, the species in it will be considered external.
All other species will be considered internal.
Otherwise, if metint is set, the species in it will be considered
internal. All other species will be considered external.
Otherwise, all species will be considered external.
If specified, metext and metint must not contains species that are not
contained in the input system.
Exceptions
|
|
TypeError, "Input is not a System object"
ValueError, "metext contains an unknown metabolite"
ValueError, "metint contains an unknown metabolite"
|
|