Entering edit mode
5.9 years ago
Bioinfonext
▴
470
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
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.
Thanks, should I try using export path below command:
Is
hisat2
a directory or an executable? If it is an executable then you will only needexport 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 installedhisat2
then don't load that module.Thanks, sorry for the mistake. I will try this.
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.why dont you use full path to run the program ?