scipion-em / scipion-em-pyseg

Plugin to use PySeg programs within the Scipion framework
GNU General Public License v3.0
2 stars 0 forks source link

pyseg.pexceptions.pexceptions.PySegInputError #68

Open cryofm opened 1 year ago

cryofm commented 1 year ago

Hello,

I cannot run the Graphs protocol, I keep getting the following error:

00039: /home/upiv/scipion/software/em/pySeg-v2.0.5/pyseg_system-2.0.5/code/tutorials/synth_sumb/tracing/mb_graph_mp.py:171: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. 00040: Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations 00041: mask = np.asarray(tomod > (max_len + mb_dst_off + 2 DILATE_NITER res), dtype=np.int) 00042: /home/upiv/scipion/software/em/pySeg-v2.0.5/pyseg_system-2.0.5/code/tutorials/synth_sumb/tracing/mb_graph_mp.py:174: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. 00043: Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations 00044: mask = np.asarray(maskh > 0, dtype=np.float) 00045: /home/upiv/scipion/software/em/pySeg-v2.0.5/pyseg_system-2.0.5/code/tutorials/synth_sumb/tracing/mb_graphmp.py:185: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool` here. 00046: Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations 00047: mask_den = np.asarray(tomod <= mb_dst_off, dtype=np.bool) 00048: Process Process-1: 00049: Traceback (most recent call last): 00050: File "/home/upiv/anaconda3/envs/pySeg-v2.0.5/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap 00051: self.run() 00052: File "/home/upiv/anaconda3/envs/pySeg-v2.0.5/lib/python3.7/multiprocessing/process.py", line 99, in run 00053: self._target*(self._args, self._kwargs) 00054: File "/home/upiv/scipion/software/em/pySeg-v2.0.5/pyseg_system-2.0.5/code/tutorials/synth_sumb/tracing/mb_graph_mp.py", line 217, in pr_worker 00055: skel = disperse.get_skel() 00056: File "/home/upiv/scipion/software/em/pySeg-v2.0.5/pyseg_system-2.0.5/code/pyseg/disperse_io/handler.py", line 148, in get_skel 00057: raise pexceptions.PySegInputError(expr='get_skel (DisPerSe)', msg=error_msg) 00058: pyseg.pexceptions.pexceptions.PySegInputError

I installed pyseg with gcc/g++ 7 and it also happens even if I change the version to 11 after that. The input job is the one I ran before (preseg membranes), which finished successfully.

The command does not seem to be wrong anywhere:

00017: STARTED: pysegGraphs, step 1, time 2023-03-23 14:04:58.003777 > 00018: eval "$(/home/upiv/anaconda3/bin/conda shell.bash hook)"&& conda activate pySeg-v2.0.5 && python /home/upiv/scipion/software/em/pySeg-v2.0.5/pyseg_system-2.0.5/code/tutorials/synth_sumb/tracing/mb_graph_mp.py --inStar Runs/015487_ProtPySegGraphs/extra/inStarFiles/graphs_001.star --outDir Runs/015487_ProtPySegGraphs/extra --pixelSize 0.38 --sSig 1.0 --vDen 0.0035 --veRatio 4.0 --maxLen 20.2 -j 3 00019: Extracting GraphMCF and NetFilament objects from tomograms 00020: Author: Antonio Martinez-Sanchez 00021: Date: jeu. 23 mars 2023 14:05:03 00022:
00023: Options: 00024: STAR file with the segmentations: Runs/015487_ProtPySegGraphs/extra/inStarFiles/graphs_001.star 00025: Number of parallel processes: 3 00026: DisPerSe persistence threshold (csig): 0.01 00027: Sigma for gaussian pre-processing: 1.0 00028: Sigma for contrast enhancement: 10 00029: Skeleton smoothing factor: 3 00030: Data resolution: 0.38 nm/pixel 00031: Mask offset: 0.0 nm 00032: Output directory: Runs/015487_ProtPySegGraphs/extra 00033: Graph density thresholds: 00034: Target vertex density (membrane) 0.0035 vertex/nm^3 for topological simplification 00035: Target edge/vertex ratio (non membrane) 4.0 for property field_value with mode low 00036:
00037: Paring input star file... 00038: Running main loop in parallel: 00039: P[1] Sub-volume to process found: Runs/015397_ProtPySegPreSegParticles/extra/segs/Position_20_tid_2.mrc 00040: P[1] Computing paths for Runs/015397_ProtPySegPreSegParticles/extra/segs/Position_20_tid_2.mrc ... 00041: P[1] Loading input data: Position_20_tid_2.mrc 00042: P[1] Computing distance, mask and segmentation tomograms... 00043: P[1] Smoothing input tomogram (s=1.0)... 00044: P[1] Initializing DisPerSe... 00045: P[1] Persistence cut thereshold set to: 0.0005 grey level 00046: P[1] Running DisPerSe... 00047: P[2] Sub-volume to process found: Runs/015397_ProtPySegPreSegParticles/extra/segs/Position_30_tid_3.mrc 00048: P[2] Computing paths for Runs/015397_ProtPySegPreSegParticles/extra/segs/Position_30_tid_3.mrc ... 00049: P[2] Loading input data: Position_30_tid_3.mrc 00050: P[2] Computing distance, mask and segmentation tomograms... 00051: P[2] Smoothing input tomogram (s=1.0)... 00052: P[2] Initializing DisPerSe... 00053: P[2] Persistence cut thereshold set to: 0.0005 grey level 00054: P[2] Running DisPerSe... 00055: P[0] Sub-volume to process found: Runs/015397_ProtPySegPreSegParticles/extra/segs/Position_10_tid_0.mrc 00056: P[0] Computing paths for Runs/015397_ProtPySegPreSegParticles/extra/segs/Position_10_tid_0.mrc ... 00057: P[0] Loading input data: Position_10_tid_0.mrc 00058: P[0] Computing distance, mask and segmentation tomograms... 00059: P[0] Smoothing input tomogram (s=1.0)... 00060: P[0] Initializing DisPerSe... 00061: P[0] Persistence cut thereshold set to: 0.0005 grey level 00062: P[0] Running DisPerSe...

Thank you very much for your quick response.

JorMaister commented 1 year ago

Hi!

I don't see any error in what you posted. Does it correspond to an execution with your own data or is it the test? Another question I have is: does the graphs protocol freeze in a running state? If none of the cpus are executing it, it'd mean that the compilation didn't go well. If the answer is yes, I'd remove the whole pyseg directory in the scipionHome/software/em directory and install the binaries again by executing the command: scipion3 installb pySeg, ensuring that the gcc/g++ are pointing to versions lower or equal than 7. Apart from that, I'd suggest checking your PYSEG_HOME variable if you're using Scipion passing a config file to it.

I hope that helps.

Note: The graphs protocol is the one that requires the compiled binaries, this is why the preseg works correctly.