-1

I work with Linux server and if I load by shell script module its not available.

This is shell script

source /cvmfs/software.xxxx.yyyyy/modulefiles/5.1.0/loadmodules
module add unicycler-0.5.0
module add pymol

module list 

unicycler --help

This is the output (line 20 doesn't fit because here isn't qsub settings as in the original script)

Loading unicycler/0.5.0
  Loading requirement: intelcdk/17.1 htslib/1.9 samtools/1.9 blast/2.7.1
    bowtie2/2.3.5.1 gcc/8.3.0 glibc/2.27 spades/3.15.4 racon/1.4.3
    pilon/1.22-intel-19.0.4-6enqoaq ale/1
Currently Loaded Modulefiles:
 1) metabase/1             8) glibc/2.27 <aL>                       
 2) intelcdk/17.1 <aL>     9) spades/3.15.4 <aL>                    
 3) htslib/1.9 <aL>       10) racon/1.4.3 <aL>                      
 4) samtools/1.9 <aL>     11) pilon/1.22-intel-19.0.4-6enqoaq <aL>  
 5) blast/2.7.1 <aL>      12) ale/1 <aL>                            
 6) bowtie2/2.3.5.1 <aL>  13) unicycler/0.5.0                       
 7) gcc/8.3.0 <aL>        14) pymol/2.3.4                           

Key:
<module-tag>  <aL>=auto-loaded  
/var/spool/pbs/mom_priv/jobs/14831393.xxxx.yyyyy.zzzz.SC: line 20: unicycler: command not found

Why do I get this error even though unicycler has been loaded?

I tried many modifications and different paths. Others modules work fine. And also if I connect to machine directly, I can reach the unicycler module but not from script.

osel1188
  • 3
  • 3
  • 2
    I think, you do have `unicycler` in your PATH, because the error message comes from the file `/var/spool/pbs/mom_priv/jobs/14831393.xxxx.yyyyy.zzzz.SC` (line 20) and not from your script (which has much less lines). Could it be that you are not showing us all relevant parts of your script? – user1934428 Mar 23 '23 at 13:48
  • 1
    Note that `module` is not part of bash itself; the only module system bash comes with is one for loading and unloading C extensions. When your question revolves around 3rd-party components, be sure to name them / point out where they come from. – Charles Duffy Mar 23 '23 at 15:12
  • yeah and there is also some qsub specifications. Is it important? Also shouldn't it be same path if there is module list with unicycler ? – osel1188 Mar 23 '23 at 21:08

1 Answers1

0

Before running unicycler command, you can output the content of the unicycler/0.5.0 module with:

module show unicycler/0.5.0

This module should append the unicycler's bin directory to the PATH environment variable. You should find in the output of the previous command something like:

prepend-path PATH /path/to/unicycler-0.5.0/bin

If the unicycler/0.5.0 module does not alter the PATH environment variable, this is why unicycler command is not found. Module file should be updated to add binary directory to PATH.

If unicycler/0.5.0 module adds a directory to PATH, check this directory exists and contains the unicycler command