how to use tool installed in local directory to work in script to submit job on ALCES HPC server
0
0
Entering edit mode
5.3 years ago
Bioinfonext ▴ 460

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 • 1.1k views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

why dont you use full path to run the program ?

ADD REPLY

Login before adding your answer.

Traffic: 1734 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6