nf-core / molkart

A pipeline for processing Molecular Cartography data from Resolve Bioscience (combinatorial FISH)
https://nf-co.re/molkart
MIT License
10 stars 7 forks source link

Unable to install cellpose with apptainer on HPC #61

Closed giacuong171 closed 4 months ago

giacuong171 commented 7 months ago

Description of the bug

Hello, I'm trying to install the Molkart pipeline with the test,apptainer profile on an HPC. But it always gives me an error:

Command error:
  Traceback (most recent call last):
    File "/usr/local/bin/cellpose", line 8, in <module>
      sys.exit(main())
               ^^^^^^
    File "/usr/local/lib/python3.11/site-packages/cellpose/__main__.py", line 61, in main
      logger, log_file = logger_setup()
                         ^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/cellpose/io.py", line 53, in logger_setup
      cp_dir.mkdir(exist_ok=True)
    File "/usr/local/lib/python3.11/pathlib.py", line 1116, in mkdir
      os.mkdir(self, mode)
  FileNotFoundError: [Errno 2] No such file or directory: '~/.cellpose'

Do you know how to fix this issue ?

Command used and terminal output

nextflow run main.nf -profile test,apptainer --outdir ../result/

Relevant files

nextflow.log

System information

giacuong171 commented 7 months ago

For a temporary fix, I replaced docker with mamba environment file inside cellpose/main.nf and it works with the test profile.
I also forgot to mention an Error with numba, for the fix, i added export NUMBA_CACHE_DIR=/tmp/numba_cache before running cellpose.

kbestak commented 7 months ago

Hi, thank you for writing, We've also experienced the numba issue before, the Cellpose biocontainer update should fix it. I'll be updating the Cellpose module to use that container, as well as the pipeline (dev branch) tomorrow.

giacuong171 commented 7 months ago

Hi, @kbestak , Is there any option in the pipeline, which i can save the segmentation and visualize it on orginal image with imagej ?

kbestak commented 7 months ago

Hi @giacuong171

The labeled images produced by segmentation tools are saved by default in the segmentation/filtered_masks folder in the output directory. While it is possible to load the image and the masks (convert to contours) in ImageJ and overlaying them, I would highly recommend using Napari to visualize the original image and the labelled mask for quality control of the segmentation options.