Attention
Following the recent operating system upgrade, software listings and module load commands now reflect the upgraded system. Some examples and notices are still being updated and may contain outdated guidance.
STAR
STAR (Spliced Transcripts Alignment to a Reference) is a software for RNA sequence alignment. STAR aligns RNA-seq reads to a reference genome using uncompressed suffix arrays.
The latest STAR manual can be found at: https://github.com/alexdobin/STAR/blob/master/doc/STARmanual.pdf which will detail the many available command arguments.
Interactive usage
After connecting to Stanage (see Establishing a SSH connection), start an interactive session with the following command:
srun --pty bash -i
STAR can be loaded with the command:
module load STAR/2.7.11b-GCC-14.3.0
After this any of the STAR commands can be run from the terminal prompt. The available commands can be obtained using:
STAR --help
Batch usage
Download and unpack the input files from https://www.gencodegenes.org/human/. We will use the comprehensive gene annotation (regions: PRI), for the purpose for this example we use only the data/annotations for chromosome 19 to map to.
#!/bin/bash
# download the "Genome sequence, primary assembly (GRCh38)" fasta file
wget https://ndownloader.figshare.com/files/14669702 && \
mv 14669702 GRCh38.primary_assembly.genome.chr19.fa.gz && \
gunzip GRCh38.primary_assembly.genome.chr19.fa.gz
# download the annotations that correspond to it
wget https://ndownloader.figshare.com/files/14658830 && \
mv 14658830 gencode.v29.primary_assembly.annotation.chr19.gtf.gz && \
gunzip gencode.v29.primary_assembly.annotation.chr19.gtf.gz
The following is an example batch submission script, my_job.sh, to run the executable STAR.
The script requests 4 cores for multithreading, a runtime of 5 minutes and
4 GB of memory to generate a genome index using the above data/annotations.
#!/bin/bash
#SBATCH --job-name=STAR_test
#SBATCH --cpus-per-task=4
#SBATCH --mem=4G
#SBATCH --output=output_STAR_4.%j.out
#SBATCH --time=00:05:00
#SBATCH --mail-user=a.person@sheffield.ac.uk
#SBATCH --mail-type=ALL
module load STAR/2.7.11b-GCC-14.3.0
STAR --runThreadN "$SLURM_CPUS_PER_TASK" --runMode genomeGenerate --genomeSAindexNbases 11 --genomeDir ./STAR --genomeFastaFiles GRCh38.primary_assembly.genome.chr19.fa \
--sjdbGTFfile gencode.v29.primary_assembly.annotation.chr19.gtf
The job is submitted to the queue by typing:
$ sbatch my_job.sh
The genome index files will be written in the subdirectory STAR.
Installation notes
Installation method
This section is primarily for administrators of the system.
STAR was installed using Easybuild, build details can be found in $EBROOTSTAR/easybuild with a given module loaded.
Testing
Successful execution of the example batch submission script ends with
..... finished successfully in the job output and creates the genome index
files in STAR.