I am trying to run a simple script on a Linux HPC, where I am looping over a number of RNA-seq files and want to call fastQC, a Java based program, on each of the files. In the script I'm calling a wrapper script that runs the Java fastQC-program.
The script I wrote is as follows:
#!/bin/bash
#SBATCH -t 00:30:00
#SBATCH -n 1
#SBATCH --mail-type=end
#SBATCH --clusters=serial
#SBATCH --partition=serial_std
#SBATCH --mem=6gb
echo "Starting to run fastQC..."
FILENAMES_TXT=*filenames_path*/small_test_sample_filenames.txt
DIR_DATA=*data_directory*
IPPG=*roote_directory on the cluster dss*
FILENAMES_PATH=$IPPG/$FILENAMES_TXT
DATA_PATH=$IPPG/$DIR_DATA
LINES=$(cat $FILENAMES_PATH)
for LINE in $LINES
do
FILE=$DATA_PATH/$LINE
echo $FILE
*home_directory_path*/FastQC/fastqc $FILE
done
echo "fastQC is done!"
When I submit this job using sbatch, the SLURM error message is: Can't exec "java": No such file or directory
Running the script on a single sample on the HPC-Login-Node worked fine, so I think the script published by fastQC is fine, and the problem only arises, when the script is submitted to the SLURM system with sbatch.
Apparently, the fastQC-script cannot find JAVA in the SLURM system, after it was called in my Bash-script. Can anybody with HPC / SLURM experience tell me, how to import Java into the environment when submitting a job (I am not sure if that question is phrased correctly, but I hope somebody can understand)?