This page covers the scripting process of the array.pbs script that is automatically installed when your account is created. It is similar to example.pbs from Writing Submit Scripts with the addition of incorporating an array into the script. Please review array.pbs in your Home directory for additional scripting comments.
The following diagram depicts the scripting process for array.pbs. It executes a 4-file array using the bowtie module. In addition to the standard error and outputs (4 files each) the script produces files that successfully fulfill the conditions of the script (hits) and/or files that do not (misses).
The following example provides a more in-depth diagram of how standard output and file output are generated when the script interacts with a program. This script incorporates two files (alpha and bravo) from a program called phoenix. Within these files the original subsequence (ru) is converted to a new subsequence (change). In addition to the standard output and error files, the script generates new files (alpha.out and bravo.out) into which the converted subsequences are written.
The following diagram shows the same script execution in tree form. The user must always qsub from the location of the script, and this script is located in ~/phoenix/rising. By changing the directory (cd) in the third line of the script to ~/phoenix, the user directs the script where to find the alpha and bravo files. Without the third line, the script would have no means of locating the path to the alpha and bravo files, which are in a different directory from where the script is submitted (qsub).