zamboni-lab / SLAW

Scalable and self-optimizing processing workflow for untargeted LC-MS
GNU General Public License v2.0
25 stars 3 forks source link

Singularity problem #5

Closed bernt-matthias closed 2 years ago

bernt-matthias commented 2 years ago

Running the container with singularity gives:

python3: can't open file 'wrapper_docker.py': [Errno 2] No such file or directory

I guess the problem is that wrapper_docker.py is not found in the entry point script https://github.com/zamboni-lab/SLAW/blob/4b0801a8692a0c24e720d0d27d1d3a449438bc40/run_lcms_processing.sh#L13

Maybe just add a shebang line to the python script (#!/usr/bin/env python3), make it executable and call it with wrapper_docker.py instead of python3 wrapper_docker.py

Alternatively call with python3 /wrapper_docker.py

adelabriere commented 2 years ago

Hi @bernt-matthias, thanks for reporting this. I never encountered any issue on our cluster with SLAW, but I also never used any complex singularity options. The modification is pushed on adelabriere/slaw:dev, maybe pull the singularity container from there.

I am running a test and will incorporate it in the master if it is successful.

chufz commented 2 years ago

I tried out your new version adelabriere/slaw:dev on our HPC cluster, it solved the error, however, I revealed on the later stage the error:

2021-11-16|20:59:37|INFO: Total memory available: 317994 and 40 cores. The workflow will use 8153 Mb by core on 39 cores.
2021-11-16|20:59:37|INFO: Guessing polarity from file:mzML
Traceback (most recent call last):
  File "/wrapper_docker.py", line 121, in <module>
    pol = exp.guess_polarity(INPUT)
  File "/pylcmsprocessing/model/experiment.py", line 118, in guess_polarity
    with open(output, "r") as f:
IsADirectoryError: [Errno 21] Is a directory: '/output/polarity'

singularity version 3.6.1-1.el7 on centOS7

adelabriere commented 2 years ago

Thanks for the feedback @chufz ,

This is strange, as my test is successful, could you please check:

  1. If you don t have a directory named polarity in the output folder for any reason. This is supposed to be a file generated temporarely by SLAW, never a directory.
  2. Give me the exact command line that you use to run singularity in your environment.

I will test with your singularity version tomorrow, maybe that is related, mine is 3.8.3-1e17 and our cluster also use CentOS 7. All my tests with singularity were done on a cluster using IBM spectrum to handle job so I guess there is a significant difference with your case.

chufz commented 2 years ago

Sorry my fault, I copied the wrong error message, the initial message was FileNotFoundError: [Errno 2] No such file or directory: '/output/polarity'

chufz commented 2 years ago

The command line i was using is: singularity run -C -W slaw_test -B slaw_test:/output -B slaw_testdata:/input slaw2.sif with slaw_testdata containing the input of your testdata with unzipped the mzml folder, and slaw_test an empty folder

adelabriere commented 2 years ago

Thanks for the details @chufz , I was able to run adelabriere/slaw:dev without any issue on singularity 3.6.1 on my computer, and I don t have a way to test it on our centOS cluster.

I was however able to reproduce the error by mounting an incorrect folder as input, I think that if you just unzipped the mzML.zip folder, the correct binding path should be -B slaw_testdata/mzML:/input and not -B slaw_testdata:/input.

Could you please tell me if that solve the issue ? I will add an error message if the input folder does not contain a valid file.

chufz commented 2 years ago

Hi, yes thanks a lot, this indeed solved it.

YUANMY2021 commented 2 years ago

I solved this by moving the wrapper_docker.py to the just the running folder