1 Prerequisites in O2 environment
If this is your first time using a linux command shell, make sure you type the commands in exactly as is. Things like spaces and quotes matter. The easiest way to do this is to copy and paste the commands from these instructions into your command shell.
Login to O2 using the instructions available at https://wiki.rc.hms.harvard.edu/display/O2/Using+Slurm+Basic
Familiarize yourself with nano, a text editor in linux. Specifically, make note of keyboard shortcuts
CTRL+O
to save,CTRL+X
to exit.Use
nano ~/.bashrc
to open your.bashrc
file and add the following lines:# Defines a new command, soar, for requesting an interactive compute shell alias 'soar=srun -p interactive -t 0-12:00 -n 2 --pty /bin/bash'
Save and exit (
CTRL+O
andCTRL+X
innano
). This defines a new commandsoar
, which you will use to request an interactive compute shell after logging into O2. This needs to be done only once.Log out of O2 and log back in. This will ensure that the new lines in
.bashrc
take effect. (Alternatively, you can typesource ~/.bashrc
without logging out.)When you first log into O2, you are given a login shell. While you will be able to submit jobs (like
bcbio
) from the login shell, you will not be able to run resource intensive jobs, such as merging of fastq files. To do the latter, you need to request an interactive compute shell using the newsoar
command you just defined. Simply typesoar
and you should get an output that looks something like this:[abc123@login01 ~]$ soar srun: job 6094734 queued and waiting for resources srun: job 6094734 has been allocated resources [abc123@compute-a-01-02 ~]$
Lastly, load the bcbio module by typing
module load bcbio
in your shell prompt:[abc123@compute-a-01-02 ~]$ module load bcbio