Updated 2021-02-10

Star pbs

#PBS -N testSTAR
#PBS -A [Account]
#PBS -l nodes=1:ppn=2
#PBS -l pmem=2gb
#PBS -l walltime=1:00
#PBS -q inferno
#PBS -j oe
#PBS -o testSTAR.out

cd $PBS_O_WORKDIR
module load gcc/4.9.0
module load STAR/2.5.3a

mkdir <output dir if there isn't one>
STAR --runMode genomeGenerate --runThreadN 2 --genomeDir <output dir> \
--genomeFastaFiles <reference genome file> --sjdbGTFfile <genome annotation file> \
--sjdbGTFtagExonParentTranscript Parent --sjdbOverhang <reads_length - 1>

STAR --genomeDir <output dir> --runThreadN 2 --readFilesIn <reference genome index dir> \
--readFilesCommand zcat --outFileNamePrefix b_ --outFilterMultimapNmax 1 \
--outReadsUnmapped unmapped_b --outSAMtype BAM SortedByCoordinate