MPI-Dortmund / cryolo

cryolo documentation
8 stars 0 forks source link

napari_boxmanager display and particles import issue #15

Closed AntonyLL closed 1 year ago

AntonyLL commented 1 year ago

It appears that napari_boxmanager only functions properly when used locally, as I was able to open files with it on my local system. However, I encountered some issues when attempting to integrate crYOLO into the CryoSPARC workflow.

One issue I noticed is that while the motion-corrected MRC files can be loaded by napari_boxmanager, the images do not seem to display correctly. Have you experienced a similar issue with your GPU system?

Additionally, I ran into problems when trying to import particles into cryoSPARC. The job consistently terminated, seemingly because the star file could not correctly point to the MRC file. Have you tried importing picked particles into cryoSPARC using their recently implemented cryoSPARC.star file?

I would appreciate any insights or suggestions you may have.

thorstenwagner commented 1 year ago

Hi,

thank you for reporting this issue.

Could you elaborate what you mean that it only works locally? Its correct that it does not work via ssh x-forwarding because of opengl.

We are opening motion corrected micrographs regularly, but we use motion corr most of the time. Can you send me one of the problematic micrographs? Can you describe in what regard it looks wrong?

Regarding the cryosparc files: Did you follow the instructions shown here: https://cryolo.readthedocs.io/en/stable/other/other.html#import-coordinates-into-cryosparc ?

What version do of the boxmanager do you use?

Best, Thorsten

18.04.2023 22:13:03 AntonyLL @.***>:

It appears that napari_boxmanager only functions properly when used locally, as I was able to open files with it on my local system. However, I encountered some issues when attempting to integrate crYOLO into the CryoSPARC workflow.

One issue I noticed is that while the motion-corrected MRC files can be loaded by napari_boxmanager, the images do not seem to display correctly. Have you experienced a similar issue with your GPU system?

Additionally, I ran into problems when trying to import particles into cryoSPARC. The job consistently terminated, seemingly because the star file could not correctly point to the MRC file. Have you tried importing picked particles into cryoSPARC using their recently implemented cryoSPARC.star file?

I would appreciate any insights or suggestions you may have.

— Reply to this email directly, view it on GitHub[https://github.com/MPI-Dortmund/cryolo/issues/15], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAIP66MZPSAPU5G34RUGEZDXB3YU3ANCNFSM6AAAAAAXDD2QHI]. You are receiving this because you are subscribed to this thread.[Verfolgungsbild][https://github.com/notifications/beacon/AAIP66NJPXA6C24MARI77QLXB3YU3A5CNFSM6AAAAAAXDD2QHKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHGHQ5PME.gif]

AntonyLL commented 1 year ago

Hi Thorsten,

Thank you for your response and for clarifying that ssh x-forwarding doesn't work due to OpenGL. That's what I meant by "it only works locally."

Regarding the motion corrected micrographs opening, I've resolved the issue. It was related to the low-pass filter.

As for the cryosparc files, I managed to successfully import and extract particles in cryosparc. I'm now trying to understand how napari_boxmanager can adjust the threshold so that I can write different cryosparc.star files based on the threshold.

If I understand correctly, the current prediction doesn't really have a threshold, and it picks all particles that can be found. We would then need to adjust the lower/upper limit in napari_boxmanager. Please correct me if my understanding is incorrect.

Best regards, Antony

thorstenwagner commented 1 year ago

The cryosparc star file do contain the confidence value (figure of merit). I'm not sure if cryosparc is able to use them, but if yes, you could make the selection directly in cryosparc?

While you can load them, its unfortunately not yet possible to write filtered cryosparc coordinates with the boxmanager. I implement that as soon as possible.

As cryolo is fast, you can simply run the picking again using the threshold you like?

AntonyLL commented 1 year ago

I feels like cryosparc won't be able to use it. But I write a python script that could convert the .cbox files to cryosparc.star. The current issue is how to save the filtered .cbox files.

After I filtered the images in napari_boxmanager, I went to save the cbox (matched) in orgranize tab. But there is an error message:

`` File /programs/x86_64-linux/cryolo/1.9.3_cu11/miniconda-napari/lib/python3.10/site-packages/pandas/core/indexers/utils.py:552, in check_array_indexer(array=RangeIndex(start=0, stop=812, step=1), indexer=<class 'numpy.ndarray'> (433,) bool) 550 # GH26658 551 if len(indexer) != len(array): --> 552 raise IndexError( indexer = <class 'numpy.ndarray'> (433,) bool array = RangeIndex(start=0, stop=812, step=1) 553 f"Boolean index has wrong length: " 554 f"{len(indexer)} instead of {len(array)}" 555 ) 556 elif is_integer_dtype(dtype): 557 try:

IndexError: Boolean index has wrong length: 433 instead of 812 `` Do you have any idea about this issue?

thorstenwagner commented 1 year ago

Did you figured it out? In case not, please reopen the issue.