labsyspharm / scimap

Spatial Single-Cell Analysis Toolkit
https://scimap.xyz/
MIT License
71 stars 24 forks source link

Napari doesnt open and code crashes. #93

Closed andreevg04 closed 4 months ago

andreevg04 commented 6 months ago

Dear scimap team,

I am super new to all this and to programming also. I am learning imaging and image analysis and am testing scimap which uses napari. For the record too my image is on external hard drive because its way too big. When running my code in the function sm.pl.gate_finder (image_path, adata, marker_of_interest, from_gate= 5, to_gate=9, increment= 0.1, markers=['CD3'], point_size= 6) like it is said in the docs of scimap, I get this message in the terminal "WARNING: QSocketNotifier: Can only be used with threads started with QThread" Also I am on ubuntu and it looks that napari (org.napari.python3) is trying to get open but its not opening and after a couple of seconds it crashes, gets closed and the script ends. For you to understand napari doesnt really gets open. It just pops an icon on my left side where the apps are in ubuntu but no GUI shows or anything remotely closed. I am also using VS code. Running it in the terminal outside of VS Code worked the same. There is no dependency problems since its exactly as it is in the scimap recommendations and I am running it in a virtual env just for this project. RAM and CPU were not at all full. I was just copying lines from the tutorial. When I ran the full tutorial script interestingly I got like 4 napari windows opening at once with including the one from the sm.pl.gate_finder which I didnt understand why.

Thank you!!!

ajitjohnson commented 6 months ago

Hi @andreevg04, great to see you testing scimap.

Unfortunately, I have never tested it on Ubuntu. The easiest way to determine whether this issue is related to scimap versus napari is to pip install napari in a new environment and simply type napari in the terminal within that environment. It should open up a napari window. If that happens, we can return to debugging why it is not opening with scimap. If it does not, then napari is likely not supported on your system.

Let me know what you find :)

andreevg04 commented 6 months ago

Hi @ajitjohnson

Napari does open in ubuntu and in the virtual env when I open it separately. When running the tutorial script it opens napari at the end and it opens 4 windows at the same time with one of them being the gating window.

Best wishes :)

ajitjohnson commented 6 months ago

got it. Are you using Jupyter Notebook within vscode? The tutorial is meant to run line by line as in the video (interactive analysis).

andreevg04 commented 6 months ago

I am not using Jupyter Notebook. The tutorial does run at the end as intended, but not when I process my dataset with the gating. I am following the steps with setting manually the gates and when I run a code up until the line from_gate= 5, to_gate=9, increment= 0.1, markers=['CD3'], point_size= 6) this is the last line then napari is struggling to open. I tried opening it beforehand but that dindt work as well.

ajitjohnson commented 6 months ago

how big is your image? is it pyramided? and what is the configuration of your computer?

Also note that the Read and write speed of your external drive will also affect how fast it can be loaded into memory of your computer.