Start an interactive job, with a walltime of 2 hours, 2000MB of memory. 

srun --pty -p interactive -t 0-02:0:0 --mem 2000MB -n 1 /bin/bash

Create a working directory on scratch and change into the newly-created directory. For example, for user abc123, the working directory will be

mkdir /n/scratch/users/a/abc123/star
cd  /n/scratch/users/a/abc123/star

Copy some test data following this page: Build Folder Structures From Sample Sheet for rcbio NGS Workflows page.

Copy the example bowtie2 bash script:

module load gcc/6.2.0 python/2.7.12 rcbio/1.3.3
cp /n/app/rcbio/1.3.3/bin/star.sh ./

Now you can take a look and modify the software options as needed. 

nano star.sh

To test the pipeline run the following command. Jobs will not be submitted to the scheduler. Here -r is the reference, -l is the read length. 

runAsPipeline "star.sh -r hg38 -l 100" "sbatch -p short --mem 6G -t 10:0 -n 1" noTmp

# this is test run

To run the pipeline. Here -r is the reference, -l is the read length. 

runAsPipeline "star.sh -r hg38 -l 100" "sbatch -p short --mem 6G -t 10:0 -n 1" noTmp run 2>&1 | tee output.log

# notice here 'run 2>&1 | tee output.log' is added to the command

To understand how 'runAsPipeline' works, please visit: Run Bash Script As Slurm Pipeline through rcbio/1.1