fburic / candia

Canonical Decomposition of Data-Independent-Acquired Spectra
Other
5 stars 2 forks source link

Installlation problems and execution errors #5

Closed MiguelCos closed 3 years ago

MiguelCos commented 3 years ago

Hello,

We are very excited about CANDIA's capabilities and are interested in testing it for our data analysis pipelines. I wanted to share my current experience with the installation and execution tests and maybe ask some advice on how to overcome some issues that we found.

  1. We managed to install it into our linux server (Ubutu 20.04.1 LTS), after installing Singularity, but none of the commands suggested for this in the README file actually worked. We needed to use:

    singularity pull shub://fburic/candia:def

    instead of the suggested

    singularity pull shub://fburic/candia
  2. It wasn't clear what is the 'CANDIA's' top-level directory to run the shell script candia to test for proper installation... So we cloned the github repository into a new folder candia, and transferred the candia_def.sif file into it. The candia_def.sif is the one created into the folder where singularity was installed.

Is there a better way to get into the container directory? I might be missing something.

  1. From the top-level of this directory, it was possible to run the command,

    ./candia test/test_experiment/config/candia.yaml

    but the pipeline only runs until the second step. Then it throws this error that seems like a missing dependency.

    
    ~/software/candia$ ./candia test/test_experiment/config/candia.yaml
    Converting DIA scan files from mzML to CSV...
    Building DAG of jobs...
    Nothing to be done.
    Complete log: /home/schilling/software/candia/.snakemake/log/2021-01-26T171607.531930.snakemake.log
    done.
    Adjusting precursor isolation windows...
    Building DAG of jobs...
    Using shell: /bin/bash
    Provided cores: 1
    Rules claiming more threads will be scaled down.
    Job counts:
        count   jobs
        2       adjust_file
        1       all
        3

[Tue Jan 26 17:16:08 2021] rule adjust_file: input: test/test_experiment/samples/scans_csv/scan1.csv output: test/test_experiment/samples/scans_csv_adjusted/scan1_adjusted.csv jobid: 2 wildcards: sample=scan1

Job counts: count jobs 1 adjust_file 1 Rscript scripts/util/adjust_swaths.R -i test/test_experiment/samples/scans_csv/scan1.csv -o test/test_experiment/samples/scans _csv_adjusted/scan1_adjusted.csv /bin/bash: /opt/conda/lib/libtinfo.so.6: no version information available (required by /bin/bash) Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘tidyselect’ 0.2.5 is already loaded, but >= 1.1.0 is required In addition: Warning message: package ‘tidyverse’ was built under R version 3.6.3 Execution halted [Tue Jan 26 17:16:10 2021] Error in rule adjust_file: jobid: 0 output: test/test_experiment/samples/scans_csv_adjusted/scan1_adjusted.csv

RuleException: CalledProcessError in line 25 of /home/schilling/software/candia/scripts/util/adjust_swaths.Snakefile: Command 'set -euo pipefail; Rscript scripts/util/adjust_swaths.R -i test/test_experiment/samples/scans_csv/scan1.csv -o test/ test_experiment/samples/scans_csv_adjusted/scan1_adjusted.csv' returned non-zero exit status 1. File "/home/schilling/software/candia/scripts/util/adjust_swaths.Snakefile", line 25, in __rule_adjust_file File "/opt/conda/lib/python3.6/concurrent/futures/thread.py", line 56, in run Exiting because a job execution failed. Look above for error message Shutting down, this might take some time. Exiting because a job execution failed. Look above for error message Complete log: /home/schilling/software/candia/.snakemake/log/2021-01-26T171608.586104.snakemake.log



Many thanks in advance for taking the time to read this report. I would be very glad if I can receive some input on how to set CANDIA up and running.

Best wishes,
Miguel
MiguelCos commented 3 years ago

I get the same error when executing only the command for adjusting the precursor isolation windows:

singularity exec candia.sif \
    snakemake --forceall -p -s scripts/util/adjust_swaths.Snakefile --configfile  ${configfile}
Building DAG of jobs...
Using shell: /bin/bash
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
        count   jobs
        2       adjust_file
        1       all
        3

[Tue Jan 26 17:57:12 2021]
rule adjust_file:
    input: test/test_experiment/samples/scans_csv/scan1.csv
    output: test/test_experiment/samples/scans_csv_adjusted/scan1_adjusted.csv
    jobid: 2
    wildcards: sample=scan1

Job counts:
        count   jobs
        1       adjust_file
        1
Rscript scripts/util/adjust_swaths.R -i test/test_experiment/samples/scans_csv/scan1.csv -o test/test_experiment/samples/scans_csv_adjusted/scan1_adjusted.csv
/bin/bash: /opt/conda/lib/libtinfo.so.6: no version information available (required by /bin/bash)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘tidyselect’ 0.2.5 is already loaded, but >= 1.1.0 is required
In addition: Warning message:
package ‘tidyverse’ was built under R version 3.6.3
Execution halted
[Tue Jan 26 17:57:13 2021]
Error in rule adjust_file:
    jobid: 0
    output: test/test_experiment/samples/scans_csv_adjusted/scan1_adjusted.csv

RuleException:
CalledProcessError in line 25 of /home/schilling/software/candia/scripts/util/adjust_swaths.Snakefile:
Command 'set -euo pipefail;  Rscript scripts/util/adjust_swaths.R -i test/test_experiment/samples/scans_csv/scan1.csv -o test/test_experiment/samples/scans_csv_adjusted/scan1_adjusted.csv' returned non-zero exit status 1.
  File "/home/schilling/software/candia/scripts/util/adjust_swaths.Snakefile", line 25, in __rule_adjust_file
  File "/opt/conda/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Exiting because a job execution failed. Look above for error message
fburic commented 3 years ago

Hi Miguel,

Very happy you're interested in CANDIA!

Apologies for the unclear instructions. There are usability improvements that are on my list to implement. I'm in my final PhD student year so finding the time has been a challenge.

1. Yes, strange that the commands that these website themselves gave me don't work now... Thank you for supplying the correct address for the container. I will update the README.

Quick note: Since the candia script expects the container to be called candia.sif, you can tell singularity to download it with that name directly: singularity pull candia.sif shub://fburic/candia:def

2. The way you did it is the correct procedure (just poorly worded by me). The idea is that all commands should be started from inside the the newly-cloned directory "candia". I will update the description.

I'm not sure how well-known Singularity is. But if you've used Docker before, one major difference with Singularity containers is that they are more "transparent", in that the commands/programs running from inside a Singularity container (like candia.sif) have direct access to the files "outside" of the container.

The way I packaged the CANDIA pipeline is:

So each script in CANDIA is executed using programs and libs from the container.

|--candia.sif----|
|     python     | scripts/example_candia_script.py --parameters ETC
|----------------|

So in that sense you don't need to move anything into the container, if that's what you meant.

3.

Hmm, strange. The required R dependencies are included in the container. I will try to reproduce.

Best, Filip

fburic commented 3 years ago

Ah, I can reproduce the issue in 3. I'm looking into it.

MiguelCos commented 3 years ago

Hello Filip,

Many thanks for taking a look into this!

We'll be very happy to test again on our end.

Best, Miguel

fburic commented 3 years ago

Hi Miguel,

Of course, no worries! Thank you for your patience.

I pushed a fix to the Singularity image with an alternative way to package the R dependencies. (Unclear now what the issue was since this was tested. I think Singularity Hub had an older container version and it took a bit to package R stuff differently now that some Ubuntu repos have been deprecated)

Please pull with singularity pull candia.sif shub://fburic/candia:def

Known Issues

  1. Be advised the test experiment will only run properly up to and including the decomposition step. I focused on this since it is the most complex part of the pipeline. For the downstream tasks to properly execute, I need to use more realistic (yet small) test data. ( Specifically, it will stop when running collect_time_mode_values.py with ValueError("No objects to concatenate") ) Sorry for not making this clear in the README. Will put a note for now. But I would say that if the test experiment runs for you until that point, then it's job is essentially done, since it covers most dependencies.

  2. The following (harmless) warnings will appear. I will get rid of them but for now it was important to make sure the container is actually usable

    • "/bin/bash: /opt/conda/lib/libtinfo.so.6: no version information available (required by /bin/bash)"
    • "/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"

Best, Filip

MiguelCos commented 3 years ago

Hello Philip,

Many thanks for taking a look.

I will be testing this again and let you know if I have more questions.

Best, Miguel

fburic commented 3 years ago

Hi @MiguelCos

Did you perhaps have time to test? I was doing effort estimates for the rest of the open issues and I thought to close this one if you are no longer experiencing issues with the installation and execution of the test script.

Thank you!

Best, Filip

MiguelCos commented 3 years ago

Hello Filip,

We managed to install the new version of the image and execute each step until Run PARAFAC decomposition.

We had some issues there that we interpreted as incompatibility of PyTorch with our old server CPU and probably with our old GPU. We didn't report this because we are now setting up a server with updated hardware and test everything again.

I guess that in general the problem that we initially reported was solved because we managed to execute the commands that were problematic.

Best, Miguel

fburic commented 3 years ago

I see. Thank you, Miguel. I'll close this one to separate from future issues. Please feel free to open a new issue or reach out if you're struggling with anything.

Best, Filip