If you are at the IMP or IMBA then just log in with your username/password, no registration needed. GMI and MFPL members please use firstname.lastname as your username, and your professional e-mail address when registering.

Welcome to the BioComp Knowledge Hub! You can ask questions here related to bioinformatics, statistics, computational biology and similar subjects. You can also answer questions and rate other users' contributions.

Frequently Asked Questions

giving arguments to a PBS script using qsub

+1 vote
1 view

I'm wondering how I can parse $OPTARGS from a bash script to the HPC?

qsub cuffidd.sh -d yymmdd -n "file1 file2 ... fileN" does not work and qsub help is printed.

asked Oct 16, 2014 in GMI cluster by stefan.lutzmayer (160 points)

1 Answer

+3 votes

Hi Stefan,

Try piping the job script and its arguments into qsub like this. Use the debug queue for this experiment! Note that you have to specify all PBS settings to qsub directly on the command line, NOT in the cuffidd.sh.

echo "cuffidd.sh -d yymmdd -n 'file1 file2 ... fileN'" | qsub -q debug -P myproject -l walltime=00:10:00 ....(whatever)...

Another possibility is to set environment variables. Here is a made-up example:

qsub -v INFILE=fileX,OUTFILE=fileY myjobscript.sh

and then you can refer to $INFILE and $OUTFILE in myjobscript.sh.

answered Oct 17, 2014 by aszodi (590 points)