When I run `nf-core modules test --profile singula...
# modules
c
When I run
nf-core modules test --profile singularity last/dotplot
, I get an error that
/.nf-test/nf-test.jar
can not be found in my directory. However
nf-test
is in my
PATH
,
nf-test.jar
is in the same directory as
nf-test
, and when I run
nf-test
by hand, there is no error about
nf-test.jar
not being found. The reason these programs are not in my home directory is that I am running
nf-core
from a Singularity image created by pulling the official Docker image, and
nf-test
is installed as a LUA module.
j
nf-test is installed in the Dockerfile, at
/usr/local/bin
how are you running nf-core? and what is the exact error message?
c
Thanks for your answer, here is my environment and the errors:
Copy code
[charles-plessy@deigo-login3 nf-modules]$ echo $PATH 
/bucket/BioinfoUgrp/Other/nf-test/0.9.2/bin:/bucket/BioinfoUgrp/Other/Nextflow2/24.10.2/bin:/apps/free81/java-jdk/14/bin:/bucket/BioinfoUgrp/Other/nf-core/3.1.0/bin:/apps/free81/singularity/4.1.4/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/shared/local/bin:/opt/dell/srvadmin/bin:/opt/shared/deigo/slurm/bin:/home/c/charles-plessy/.local/bin:/home/c/charles-plessy/bin
[charles-plessy@deigo-login3 nf-modules]$ which nf-test 
/bucket/BioinfoUgrp/Other/nf-test/0.9.2/bin/nf-test
[charles-plessy@deigo-login3 nf-modules]$ which nf-core
/bucket/BioinfoUgrp/Other/nf-core/3.1.0/bin/nf-core
[charles-plessy@deigo-login3 nf-modules]$ file /bucket/BioinfoUgrp/Other/nf-core/3.1.0/bin/nf-core
/bucket/BioinfoUgrp/Other/nf-core/3.1.0/bin/nf-core: a /usr/bin/env run-singularity script executable (binary data)
[charles-plessy@deigo-login3 nf-modules]$ singularity exec /bucket/BioinfoUgrp/Other/nf-core/3.1.0/bin/nf-core which nf-test
/usr/local/bin/nf-test
[charles-plessy@deigo-login3 nf-modules]$ nf-core modules test --profile singularity last/dotplot


                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\ 
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 3.1.0 - https://nf-co.re


INFO     Generating nf-test snapshot                                                                                                                                                                                                                                                      
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── nf-test output ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                                                                                        │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── nf-test error ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Error: Unable to access jarfile /home/c/charles-plessy/.nf-test/nf-test.jar                                                                                                                                                                                                            │
│                                                                                                                                                                                                                                                                                        │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
INFO     Generating nf-test snapshot again to check stability                                                                                                                                                                                                                             
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── nf-test output ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                                                                                        │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── nf-test error ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Error: Unable to access jarfile /home/c/charles-plessy/.nf-test/nf-test.jar                                                                                                                                                                                                            │
│                                                                                                                                                                                                                                                                                        │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
CRITICAL Ran, but found errors:                                                                                                                                                                                                                                                           
          - nf-test failed                                                                                                                                                                                                                                                                
          - nf-test failed                                                                                                                                                                                                                                                                
[charles-plessy@deigo-login3 nf-modules]$ env |grep JAV
JAVA_HOME=/apps/free81/java-jdk/14
JAVA_JDK_MOD_HOME=/apps/free81/java-jdk/14
JAVA_JDK_MOD_VERSION=14
[charles-plessy@deigo-login3 nf-modules]$ ls /home/c/charles-plessy/.nf-test/
ls: cannot access '/home/c/charles-plessy/.nf-test/': No such file or directory
The Singularity image is produced as explained in this page: https://github.com/oist/BioinfoUgrp/blob/master/Nextflow.md#nf-core
j
If I am following your commands correctly, you are not running nf-core form the singularity container. You can run it from there and use
--bind
to bind the directory where you have your modules repo.
c
The modules are visible to the container: all the other commands such as
nf-core modules lint
etc. work with no problem. It is just
nf-core modules test
which wants this jar file while the
nf-test
command is both available within and outside the container.
The
nf-core modules test
command works if I put a copy of the jar file in
/home/c/charles-plessy/.nf-test/nf-test.jar
, but I do not see why it is necessary given that when I run
nf-test
in standalone from a local installation or from the container, the jar file is not needed…
j
nf-core is essentially running nf-test so it should work the same way
can you try running the command with debug messages?
nf-core --verbose modules test --profile singularity last/dotplot
c
Apologies, I take it back,
nf-test
fails and asks for the jar file in my home directory when I run it from the container. This is the command reported by
nf-core --verbose
, and the (same) error when I try it again in isolation.
Copy code
$ singularity exec /bucket/BioinfoUgrp/Other/nf-core/3.1.0/bin/nf-core nf-test test --tag last/dotplot --profile singularity --verbose --debug
Error: Unable to access jarfile /home/c/charles-plessy/.nf-test/nf-test.jar
j
I could find a mention of the jar file in the nf-test documentation where they mention to set some env variables, in case you installed nf-test from source https://github.com/askimed/nf-test?tab=readme-ov-file#compile-from-source
otherwise I think it will be better to ask on the nf-test repo
c
Thanks, I check and the
APP_
environment directories are not set. I will keep on searching for the reason.
OK, I run in more errors if I use the jar copy workaround: basically the Singularity image is not able to run
sbatch
nor other commands installed in the host system but not in the image. I will study how to install
nf-core
via pip3 instead. Thanks for your help!