Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titlehow to make a sample commands file
collapsetrue
# remember that things after the # sign are ignored by bash 
cds  # move to your scratch directory
mkdir my_first_job  # make a new folder called "my_first_job"
cd my_first_job  # move into the new folder to make it easier to create a file there
nano commands  # the following lines should be typed into the nano editor so they will be saved to the new file "commands"
cat commands > commands.out  # this will print the contents of the file you are currently editing to a new file called commands.out
date > date.out  # this will create a file with todays date on it
pwd > current_directory.out  # this will create a file with the current directory in it
echo "my name is <YOURNAME>" >> name.out  # Note that this time we used the append symbol >> not the write symbol > as we plan to put multiple things into the same file. be sure to replace the <> signs with your name
echo "This is the final result of my first script. It worked how I thought it would, or hopefully have the resources to figure out why it didn't" >> name.out  # this will add another line of text to the name.out file.
# feel free to add up to 7 more lines to your commands file here. 
# write and exit nano now ctrl-o ctrl-x
launcher_creator.py -n "my_first_job" -t 00:02:00 -a "UT-2015-05-18" # this will create a my_first_job.sge file that will run for 2 minutes
qsub my_first_job.sge  # this will actually submit the job to the Queue Manager and if everything has gone right, it will be added to the development queue.

...

Code Block
languagebash
titlemake a single final file using the cat command and copy to a useful work directory
collapsetrue
# remember that things after the # sign are ignored by bash 
cat *.out > first_job_submission.final.output  # Remember that the * wildcard will take things in alpha order, if you want you can list each file separately to control what order they go into the new file.
mkdir $WORK/BDIB_GVA_2015
mkdir $WORK/BDIB_GVA_2015/Day1
mkdir $WORK/BDIB_GVA_2015/Day1/first_tacc_job  # each directory must be made in order to avoid getting a no such file or directory error
cp first_job_submission.final.output $WORK/BDIB_GVA_2015/Day1/first_tacc_job
cp *.sge $WORK/BDIB_GVA_2015/Day1/first_tacc_job
cp *<job-ID> $WORK/BDIB_GVA_2015/Day1/first_tacc_job  #your job-id is the string of numbers following the .o and .e filenames

 

Moving beyond the preinstalled commands on TACC

If (or when) you looked at what our edits to the .profile file did, you would have seen that the last lines were a series of "module load XXXX" commands, and a promise to talk more about them later. I'm sure you will be thrilled to learn that now is that time... As a "classically trained wet-lab biologist" one of the most difficult things I have experienced in computational analysis has been in installing new programs to improve my analysis. Programs and their installation instructions tend (or appear) to be written by computational biologists in what at times feels like a foreign language, particularlly particularly when a particular when things start going wrong. Luckily TACC (and the BioIteam) help get around a large number of these problems by preinstalling many programs if you know where to look.

...