opencobra / memote

memote – the genome-scale metabolic model test suite
https://memote.readthedocs.io/
Apache License 2.0
128 stars 28 forks source link

Comparison of models #683

Open lemoncxd opened 4 years ago

lemoncxd commented 4 years ago

We are trying to make a model comparison, but the results do not come out, I don't know why。

This is my code:

memote report diff E:/file/latest571_meto.xml E:/file/iHZ565.xml E:/file/iGD1575.xml E:/file/iCC541.xml

This is my result:

Writing diff report to 'index.html'.
Traceback (most recent call last):
  File "e:\software\python35\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "e:\software\python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "E:\software\python35\Scripts\memote.exe\__main__.py", line 7, in <module>
  File "e:\software\python35\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "e:\software\python35\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "e:\software\python35\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "e:\software\python35\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "e:\software\python35\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "e:\software\python35\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "e:\software\python35\lib\site-packages\memote\suite\cli\reports.py", line 287, in diff
    file_handle.write(api.diff_report(diff_results, config))
  File "e:\software\python35\lib\site-packages\memote\suite\api.py", line 174, in diff_report
    report = DiffReport(diff_results=diff_results, configuration=config)
  File "e:\software\python35\lib\site-packages\memote\suite\reporting\diff.py", line 45, in __init__
    self.result = self.format_and_score_diff_data(diff_results)
  File "e:\software\python35\lib\site-packages\memote\suite\reporting\diff.py", line 56, in format_and_score_diff_data
    meta = result["meta"]
KeyError: 'meta'

Thanks in advance for your help.

Midnighter commented 4 years ago

Hi, thank you for the report. As suggested in the issue template, can you please paste the output of the following command in the environment where you have memote installed.

python -c "import memote;memote.show_versions()"
lemoncxd commented 4 years ago

Hi, the output is like this

System Information

OS Windows OS-release 10 Python 3.5.2

Package Versions

Jinja2 2.10 click 7.0 click-configfile 0.2.3 click-log 0.3.2 cobra 0.15.3 cookiecutter 1.7.0 depinfo 1.4.0 equilibrator-api 0.1.26 future 0.16.0 gitpython 3.1.0 goodtables 2.4.2 importlib-resources 1.0.2 lxml 4.2.4 memote 0.9.13 numpydoc 0.9.2 pandas 0.23.4 pip 10.0.1 pylru 1.2.0 pytest 5.3.5 requests 2.19.1 ruamel.yaml 0.16.10 setuptools 20.10.1 six 1.11.0 sqlalchemy 1.2.11 sympy 1.2 travis-encrypt 1.1.2

Is it because the version is not right?

Midnighter commented 4 years ago

No, you're up-to-date. I'll dig into it today.

Midnighter commented 4 years ago

Hi @lemoncxd, do you see any other error messages above the traceback that you posted here? I just tried running the diff report with three models and it worked perfectly. (Of course, I don't have the same models as you do.) Also, our continuous testing includes the diff report on Windows and we haven't noticed any problems.

lemoncxd commented 4 years ago

It seems that because of the different versions of our models, we cannot use memote for comparison, because the cobra version required by memote is higher than 0.15.3, but this version of cobra cannot read our model.

Midnighter commented 4 years ago

I see, that is unfortunate. Is it because of GPR annotations in the notes field? In general, it should be possible to "upgrade" an SBML document by loading it and saving it again. Maybe @matthiaskoenig, you have an idea for how to best achieve this?