I have this script which works fine when I call it with sh but it fails when I use qsub. Could someone please help me debug this? I can't seem to find an answer online
#!/bin/bash
#$ -S /bin/bash
#$ -V
#$ -cwd
#$ -l h_vmem=6G
#$ -N MHCIp
if [ $# -lt 2 ]
then
echo need 2 arguments
echo "USAGE : qsub run_MHCIprediction.sh <input_peptide_file> <MHCI_allele_file>"
exit 0
fi
input_file=$1
allele_file=$2
output_prefix=`echo ${input_file} | awk -F"." '{print $1}'`
while read -u 10 allele strip_allele
do
/inside/depot4/users/arjun/tools/IEDB/mhc_i/src/predict_binding.py \
IEDB_recommended \
${allele} \
9 \
${input_file} > ${output_prefix}"_"${strip_allele}".tsv"
done 10<${allele_file}
input_file contains values such as
>pept1
ABDGSHADSDJASDAJ
>pept2
AHSYEHDBDJSJAKSK
allele_file looks like
HLA-A*01:01 HLA-A_01_01
HLA-B*03:02 HLA-B_03_02