Question: how to use tool installed in local directory to work in script to submit job on ALCES HPC server
0
gravatar for Bioinfonext
4 weeks ago by
Bioinfonext120
Korea
Bioinfonext120 wrote:

Hi,

Generally, I used module load command to use tools which are installed on HPC server in bash scripts but if the NGS analysis tool is installed in the local directory then how I can use that tool in the bash script to submit the job on HPC server?

 #!/bin/bash
 #RUN_Hisat2 
 #$ -N hisat2  
module load hisat2
#$ -o /mnt/scratch/users/3052/testdata/test-job
#$ -pe smp-verbose 20
#$ -wd /mnt/scratch/users/3052/testdata/test-job

hisat2 -x rice_index -1 SRR4104637_R1_paired.fq.gz -2 SRR4104637_R2_paired.fq.gz -S SRR4104637.sam

hisat2 -x rice_index -1 SRR4104638_R1_paired.fq.gz -2 SRR4104638_R2_paired.fq.gz -S SRR4104638.sam

hisat2 -x rice_index -1 SRR4104639_R1_paired.fq.gz -2 SRR4104639_R2_paired.fq.gz -S SRR4104639.sam

what should I use if hisat2 is installed in local directory, and path for directory is like this:

/smmt/users/3052/Amplicon_data/ITS_analysis/hisat2

Thanks

next-gen • 126 views
ADD COMMENTlink modified 4 weeks ago • written 4 weeks ago by Bioinfonext120
1

You could modify your $PATH to include this directory in your script. See "Note" below.

Note: You will need to ensure that this local directory is available on all nodes of your HPC server (or at least on those where your job is likely to get assigned). Sometimes HPC nodes may not mount local user directories on any/all nodes.

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by genomax62k

Thanks, should I try using export path below command:

#!/bin/bash
 #RUN_Hisat2 
 #$ -N hisat2  
**export PATH=$PATH:/smmt/users/3052/Amplicon_data/ITS_analysis/hisat2**
#$ -o /mnt/scratch/users/3052/testdata/test-job
#$ -pe smp-verbose 20
#$ -wd /mnt/scratch/users/3052/testdata/test-job

hisat2 -x rice_index -1 SRR4104637_R1_paired.fq.gz -2 SRR4104637_R2_paired.fq.gz -S SRR4104637.sam

hisat2 -x rice_index -1 SRR4104638_R1_paired.fq.gz -2 SRR4104638_R2_paired.fq.gz -S SRR4104638.sam

hisat2 -x rice_index -1 SRR4104639_R1_paired.fq.gz -2 SRR4104639_R2_paired.fq.gz -S SRR4104639.sam
ADD REPLYlink written 4 weeks ago by Bioinfonext120
1

Is hisat2 a directory or an executable? If it is an executable then you will only need export PATH=$PATH:/smmt/users/3052/Amplicon_data/ITS_analysis/

Why are you doing module load hisat2 in the script file? If you want to use your locally installed hisat2 then don't load that module.

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by genomax62k

Thanks, sorry for the mistake. I will try this.

ADD REPLYlink written 4 weeks ago by Bioinfonext120

No worries. I noticed that you had it in your original question. Don't want to have two competing hisat2 in $PATH. The first one will likely be used in that case and it may be the one from the module.

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by genomax62k

why dont you use full path to run the program ?

ADD REPLYlink written 4 weeks ago by geek_y9.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 896 users visited in the last hour