3dem / relion

Image-processing software for cryo-electron microscopy
https://relion.readthedocs.io/en/latest/
GNU General Public License v2.0
456 stars 203 forks source link

Have problem with running topaz in Relion 4.0 #823

Closed haomingzh closed 3 years ago

haomingzh commented 3 years ago

Hello, We have some problems running topaz within Relion 4.0 and would appreciate your help. We tested Topaz and found it worked fine by itself. But we got the following errors when launching Topaz in Relion4 after providing the absolute path for topaz executable.

using device=0 with cuda=True

Loading model: unet

Traceback (most recent call last): File "/app/data/topaz-env/bin/topaz", line 11, in load_entry_point('topaz-em==0.2.4', 'console_scripts', 'topaz')() File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/main.py", line 148, in main args.func(args) File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/commands/denoise.py", line 540, in main mic = np.array(load_image(path), copy=False).astype(np.float32) File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/utils/data/loader.py", line 103, in load_image image = load_mrc(path, standardize=standardize) File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/utils/data/loader.py", line 51, in load_mrc image, header, extended_header = mrc.parse(content) File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/mrc.py", line 134, in parse raise Exception('Unknown dtype mode:' + str(header.model)) AttributeError: 'MRCHeader' object has no attribute 'model'

using device=0 with cuda=True

Loading model: unet

Traceback (most recent call last): File "/app/data/topaz-env/bin/topaz", line 11, in load_entry_point('topaz-em==0.2.4', 'console_scripts', 'topaz')() File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/main.py", line 148, in main args.func(args) File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/commands/denoise.py", line 540, in main mic = np.array(load_image(path), copy=False).astype(np.float32) File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/utils/data/loader.py", line 103, in load_image image = load_mrc(path, standardize=standardize) File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/utils/data/loader.py", line 51, in load_mrc image, header, extended_header = mrc.parse(content) File "/app/data/topaz-env/lib/python3.6/site-packages/topaz/mrc.py", line 134, in parse raise Exception('Unknown dtype mode:' + str(header.model)) AttributeError: 'MRCHeader' object has no attribute 'model'

biochem-fan commented 3 years ago

You need the latest code of Topaz from their GitHub. https://github.com/tbepler/topaz

This bug was repaired in https://github.com/tbepler/topaz/commit/77f983192d05df7a3fe671d291ecbbc97c232b15.

biochem-fan commented 3 years ago

@tbepler: Could you please update the release version of Topaz?

haomingzh commented 3 years ago

We'll update to the latest version TOPAZ 0.2.5 and hope it will fix the bug. Thank you!

biochem-fan commented 3 years ago

No, 0.2.5 is not new enough. See their history https://github.com/tbepler/topaz/commits/master. 0.2.5 came in September 2020, while the problem was fixed in May 2021. You have to use the code in GitHub.

haomingzh commented 3 years ago

Thanks. The bug is fixed in the latest 0.2.5a. It's working now.