Hi JIm,
First off: please don't use writeSBML directly. Instead, use
writeCbModel(model), (which will open a file Selection window,
where you can write your filename (e.g. Test.xml)). This function
will then automatically detect the type of output based on the
file name. Or, if you don't want to use a dialog: use:
writeCbModel(model,'fileName','OutputFileName.xml','format','SBML').
This will take care of the comps field (which is not a required
field in the structure.
As for genes: its a Cell array of Strings.
Overall, if you initially create your model with createModel(),
you will get a struct in which all parts are properly initialized,
and if you use addMetabolite/addReaction to add your metabolites
and reactions, those fields will be kept consistent.
The same applies when setting GPR rules. Please use the function
changeGeneAssociation to do so, as this ensures that the model
fields are kept in sync. You don't even need to add any genes, as
they will automatically be created by the function.
In general we strongly discourage manually manipulating model fields, as it can quickly lead to models with out of sync fields.
Finally, a full listing of Model fields and their specifications can be found at https://opencobra.github.io/cobratoolbox/docs/COBRAModelFields.html
Best,
Thomas
--
---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Université du Luxembourg Faculté des Sciences, de la Technologie et de la Communication Campus Belval, Biotech II 115 6 avenue du Swing L-4367 Belvaux Tel: (+352) 46 66 44 5309 Email: thoma...@uni.lu
Unsubscribe
It appears that you have subscribed to commercial messages from this sender. To stop receiving such messages from this sender, please unsubscribe
--
---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
Hi James,
As mentioned before, please do not use writeSBML directly but instead use writeCbModel. Explanation of the function is provided both in its documentation (either in the file or at https://opencobra.github.io/cobratoolbox/latest/modules/io.html?highlight=writecbmodel#src.base.io.writeCbModel) or in the respective tutorial (https://opencobra.github.io/cobratoolbox/latest/tutorials/tutorialIO.html).
A minimal working example is:
------------------Hello Jim,
You seem to be using an outdated version of the Cobra Toolbox, a
modified version of the Toolbox or you have an outdated
writeCbModel file on your path somewhere. The error you report
should be coming (if at all) from line 220 and not 230.
Could you run generateSystemConfigReport() and post the results
along with the result of which('writeCbModel.m','-all') ?
That code snipped I provided works fine on my machines.
Best
Thomas
-- Université du Luxembourg Faculté des Sciences, de la Technologie et de la Communication Campus Belval, Biotech II 423 6 avenue du Swing L-4367 Belvaux Tel: (+352) 46 66 44 5309 Email: thoma...@uni.lu
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbox+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Université du Luxembourg Faculté des Sciences, de la Technologie et de la Communication Campus Belval, Biotech II 115 6 avenue du Swing L-4367 Belvaux Tel: (+352) 46 66 44 5309 Email: thoma...@uni.lu--
---
You received this message because you are subscribed to a topic in the Google Groups "COBRA Toolbox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cobra-toolbox/9zI67aJKuOY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobra-toolbox+unsubscribe@googlegroups.com.
-- Université du Luxembourg Faculté des Sciences, de la Technologie et de la Communication Campus Belval, Biotech II 115 6 avenue du Swing L-4367 Belvaux Tel: (+352) 46 66 44 5309 Email: thoma...@uni.lu--
---
You received this message because you are subscribed to a topic in the Google Groups "COBRA Toolbox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cobra-toolbox/9zI67aJKuOY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobra-toolbox+unsubscribe@googlegroups.com.
Hi James,
Indeed your toolbox seems to be slightly out of date, and yes
there was an update that fixed the issue you describe with my
example (i.e. that detects the format properly from the file
extension).
As Laurent already mentioned, to properly use the toolbox you will
(at least for the installation) need a working internet connection
as the toolbox depends on submodules which are downloaded from the
web.
I'm not entirely sure, which version the package pointed to by
Laurent contains but I assume it should work.
Another option you would have is to do a full installation at
home (as detailed in the installation instruction, including
starting up Matlab after the download and running
initCobraToolbox) copy your cobratoolbox folder on a stick and
copy it from there to your working machine. You will still not be
able to update your toolbox, but at least you
To unsubscribe from this group and all its topics, send an email to cobra-toolbox+unsubscribe@googlegroups.com.
Thomas,
Per your request for more diagnostic information below. Here is the output from
which('writeCbModel.m','-all')
C:\Users\JTMetz\cobratoolbox\src\base\io\writeCbModel.m
This makes sense. When I installed the cobra toolbox, all of the files went into a cobratoolbox directory
under my username on the C: drive.
Since, much of our discussion seems to be centered around the code in writeCbModel.m, I have attached a
copy of the code that I have to this email message. Perhaps you can compare the code that I am using tocode that you are using. Hopefully, something will be different and will stand out and explain the difficulties Iam having.
Thanks again.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Université du Luxembourg Faculté des Sciences, de la Technologie et de la Communication Campus Belval, Biotech II 115 6 avenue du Swing L-4367 Belvaux Tel: (+352) 46 66 44 5309 Email: thoma...@uni.lu--
---
You received this message because you are subscribed to a topic in the Google Groups "COBRA Toolbox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cobra-toolbox/9zI67aJKuOY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobra-toolbo...@googlegroups.com.
-- Université du Luxembourg Faculté des Sciences, de la Technologie et de la Communication Campus Belval, Biotech II 115 6 avenue du Swing L-4367 Belvaux Tel: (+352) 46 66 44 5309 Email: thoma...@uni.lu--
---
You received this message because you are subscribed to a topic in the Google Groups "COBRA Toolbox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cobra-toolbox/9zI67aJKuOY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobra-toolbo...@googlegroups.com.
-- Université du Luxembourg Faculté des Sciences, de la Technologie et de la Communication Campus Belval, Biotech II 423 6 avenue du Swing L-4367 Belvaux Tel: (+352) 46 66 44 5309 Email: thoma...@uni.lu
-- Université du Luxembourg Faculté des Sciences, de la Technologie et de la Communication Campus Belval, Biotech II 423 6 avenue du Swing L-4367 Belvaux Tel: (+352) 46 66 44 5309 Email: thoma...@uni.lu--
Hi James,
The only difference is, that the latter explicitly states the
format (SBML), while the former detects the format based on the
file extension.
Best
Thomas