tlubitz / SBtab

SBtab - Table format for Systems Biology:
www.sbtab.net
MIT License
6 stars 8 forks source link

sbml2sbtab.py cannot find SBtab library (and how to use it) #94

Closed smoretti closed 4 years ago

smoretti commented 4 years ago

Hi

I am testing sbml2sbtab.py from https://github.com/tlubitz/SBtab/blob/master/python/sbml2sbtab.py I installed sbtab with the archive from pip and I had to change except: import SBtab into except: import sbtab to make it work without error at load time.

Also now I wonder how to use it? python3 sbml2sbtab.py --filename=bigg_e_coli_core.sbml does not convert anything.

Thanks

smoretti commented 4 years ago

The same with python3 sbml2sbtab.py bigg_e_coli_core.sbml as found in the doc

tlubitz commented 4 years ago

Hi!

The command line tool you are searching for is called sbtab_sbml2sbtab.py, not sbml2sbtab.py

Please see the instructions on the usage in the folder /SBtab/python/ on GitHub.

Let me know if any problems arise.

Best Timo

On Thu, Oct 15, 2020, 4:41 PM smoretti notifications@github.com wrote:

Hi

I am testing sbml2sbtab.py from https://github.com/tlubitz/SBtab/blob/master/python/sbml2sbtab.py I installed sbtab with the archive from pip and I had to change except: import SBtab into except: import sbtab to make it work without error at load time.

Also now I wonder how to use it? python3 sbml2sbtab.py --filename=bigg_e_coli_core.sbml does not convert anything.

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tlubitz/SBtab/issues/94, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGPUCF72234RZAKSHVER3CDSK4CZTANCNFSM4SSCYVYA .

smoretti commented 4 years ago

I use the right script now, sbtab_sbml2sbtab.py, thanks. In the same directory I have also added SBtab.py, misc.py and sbml2sbtab.py.

Nevertheless the conversion failed on my test SBML file: ['Could not generate SBtab Compartment.', 'Could not generate SBtab Compound.', 'Could not generate SBtab Reaction.', 'Could not generate SBtab Quantity.', 'Could not generate SBtab FBC Objective Function.', 'Could not generate SBtab FBC Gene.']

My SBML test file is the SBML from http://bigg.ucsd.edu/models/e_coli_core python3 sbtab_sbml2sbtab.py e_coli_core.xml

Python 3.5.2 libsbml 5.18.0 openpyxl 2.5.4 numpy 1.16.2 scipy 1.2.1 CentOS Linux 7.6.1810

tlubitz commented 4 years ago

That is a bit odd... I was trying the exact same thing with the e_coli_core.xml (as attached) and it worked well when doing

python3 sbtab_sbml2sbtab.py e_coli_core.xml

Did you make any alterations on the SBML model? Do you have all files in the directory that are also present in the /SBtab/python/ directory? Please also make sure to provide the definitions.tsv, which you can find in the repository /SBtab/definition_table/definitions.tsv. You can basically just c&p it in the directory where you are running your sbtab_sbml2sbtab script (and where the other modules are located).

Let me know if this helped. Until then I am sending you the output that I produced from the ecoli model.

Am Fr., 16. Okt. 2020 um 08:38 Uhr schrieb smoretti < notifications@github.com>:

I use the right script now, sbtab_sbml2sbtab.py, thanks. In the same directory I have also added SBtab.py, misc.py and sbml2sbtab.py.

Nevertheless the conversion failed on my test SBML file: ['Could not generate SBtab Compartment.', 'Could not generate SBtab Compound.', 'Could not generate SBtab Reaction.', 'Could not generate SBtab Quantity.', 'Could not generate SBtab FBC Objective Function.', 'Could not generate SBtab FBC Gene.']

My SBML test file is the SBML from http://bigg.ucsd.edu/models/e_coli_core python3 sbtab_sbml2sbtab.py e_coli_core.xml

Python 3.5.2 libsbml 5.18.0 openpyxl 2.5.4 numpy 1.16.2 scipy 1.2.1 CentOS Linux 7.6.1810

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tlubitz/SBtab/issues/94#issuecomment-709844891, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGPUCF3FKOQ3P2KF4ZIMW7TSK7S6JANCNFSM4SSCYVYA .

smoretti commented 4 years ago

Thanks it works now. I missed the _/SBtab/definitiontable/definitions.tsv file.

What is the difference between sbtab.tsv and objtables.tsv files?

tlubitz commented 4 years ago

Super, glad to hear it. I assumed it might have been the missing definitions file, but it was missing a more sensible error code.

The difference between sbtab.tsv and objtables.tsv is simply two different standard formats. We are mainly working with SBtab, which is specified on the website sbtab.net. Just recently we also built in the slightly different syntax of objtables, which is specified on objtables.org. The two are pretty similar, and the content is the same. I didn't know which one you needed so I simply sent both.

Am Fr., 16. Okt. 2020 um 11:00 Uhr schrieb smoretti < notifications@github.com>:

Thanks it works now. I missed the /SBtab/definition_table/definitions.tsv file.

What is the difference between sbtab.tsv and objtables.tsv files?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tlubitz/SBtab/issues/94#issuecomment-709921663, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGPUCF77LQLCOITFDBEE6UTSLADTPANCNFSM4SSCYVYA .

smoretti commented 4 years ago

I was not aware of objtables.org Thanks again