tbepler/topaz

Topaz filament picking

sunny1226 opened this issue · 7 comments

Hi,
I'm trying to follow https://doi.org/10.1101/2022.02.07.479378 paper to solve EMPIAR-10940 datasets. However, when I try to use anaconda version topaz to repeat the result, I found I cannot use -f parameter to pick filament as the paper said. Error report like:
topaz: error: unrecognized arguments: -f
It seems the function hasn't been implemented yet. I also tried to install https://github.com/3dem/topaz fork using source code, however, the topaz cannot start. Error report:
Traceback (most recent call last):
File "/opt/anaconda3/envs/topaz/bin/topaz", line 33, in
sys.exit(load_entry_point('topaz-em', 'console_scripts', 'topaz')())
File "/opt/anaconda3/envs/topaz/lib/python3.6/site-packages/pkg_resources/init.py", line 474, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/opt/anaconda3/envs/topaz/lib/python3.6/site-packages/pkg_resources/init.py", line 2846, in load_entry_point
return ep.load()
File "/opt/anaconda3/envs/topaz/lib/python3.6/site-packages/pkg_resources/init.py", line 2450, in load
return self.resolve()
File "/opt/anaconda3/envs/topaz/lib/python3.6/site-packages/pkg_resources/init.py", line 2456, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
ModuleNotFoundError: No module named 'topaz.main'
Should I wait for topaz anaconda version update that support filament picking? Or is there anything wrong when I install Sjor's fork using source code?
Thanks.

Did you install the fork in a distinct conda environment? Not sure what would happen if you tried to install the fork on top of the regular installation.

Yes... I have installed the fork in the old conda environent. I will try to install it in an empty environment to try. No matter if it works or not, I will reply it soon.

I have tried to create a new conda environment and followed the instruction to install topaz using Sjor's branch (https://github.com/3dem/topaz), but it's still not working. Same error as above.

Hi, I have the same error... did you solve it?

eMKiso commented

Hi,

I found topaz-filament on the SBGrid (https://sbgrid.org/software/titles/topaz-filament) but cannot find or reach it anywhere else...

Perhaps @tbepler could help? :)

We have mid-term plans to upstream this into topaz, but I don't have a concrete timeline for it. If someone from the community wants to volunteer to update the filament code to conform with some of the recent internal refactors in topaz, I'd be happy to accept that PR!

eMKiso commented

Dear @Nayun424 @sunny1226,

we managed to get the topaz-filament working from source. Basically I followed the installation instructions to install from source (https://github.com/3dem/topaz#installation) with a couple modifications (see below).

As you already figured out you have to compile your own topaz-filament from https://github.com/3dem/topaz
What is also important to note is:

New in modification for filament picking:
Added support for filament start-end coordinate picking (new options -f, -fp and -fl in the extract command), for subsequent helical reconstruction in RELION
This adds a new dependency to skimage (make sure you install this in your conda environment)

Here are the steps how we have done it within a conda environment:

  1. conda create --name topaz-filament python=3 # to create a conda environment do not forget to add a --name for the environment or a --prefix
  2. conda install numpy pandas scikit-learn scikit-image # install dependencies and importantly, add scikit-image to the list. This is the 'skimage' mentioned by Sjors Scheres in the topaz-filament source code.
  3. conda install -c pytorch pytorch torchvision #install the rest of the dependencies as per instructions
  4. git clone https://github.com/3dem/topaz.git #clone the topaz-filament repository
  5. cd topaz
  6. pip install . #this installs the topaz-filament and the executable is 'yourcondapath/topaz/bin/topaz'
  7. ./bin/topaz --version` # to test if topaz is working
  8. Use 'yourcondapath/topaz/bin/topaz' in Relion as instructed in the article (http://dx.doi.org/10.1039/D2FD00034B) and it should work.

I hope this helps.

@tbepler Sorry I am not familiar enough either with internal refactors of topaz or GitHub so I can't help.

Best!