STAR RNA-seq mapping on Stampede2

After multiple round of experimenting, I found out an alternative way to run RNA-seq mapping with STAR on Stampede2 would be to use a whole node (16 cores) at the same time. The DDR RAM for a node on Stampede2 is 96 Gb,which may not be enough for handling multiple independent mapping jobs. We can use multiple threads for STAR mapping. It is not a good idea to use all 272 threads of a node at the same time as it triggered some memory allocation issue during my experimental run. So I decided to use 128 threads. Another problem I encountered is for generating STAR genome index. It is better to use just 16 cores and entire amount of RAM for building index as I found insufficient RAM may cause the incomplete index files and cause the mapping jobs to fail.

#!/bin/bash
#SBATCH -J SRR2063281 # job name
#SBATCH -o SRR2063281.o%j # output and error file name (%j expands to jobID)
#SBATCH -N 1 # Total number of nodes requested (16 cores/node
#SBATCH -n 16 # total number of mpi tasks requested
#SBATCH -p normal # queue (partition) — normal, development, etc.
#SBATCH -t 48:00:00 # run time (hh:mm:ss) – 1.5 hours
#SBATCH –mail-user=youremail@email.com
#SBATCH –mail-type=begin # email me when the job starts
#SBATCH –mail-type=end # email me when the job finishes
cd /directory/to/your/work/

STAR –genomeDir /path/to/you/STARindex \
–outFileNamePrefix SRR2063281 \
–outSAMstrandField intronMotif \
–quantMode GeneCounts \
–twopassMode Basic \
–runThreadN 128 \  #change the number of threads here
–readFilesIn SRR2063281_1.fastq SRR2063281_2.fastq \
–outFilterMultimapNmax 1 \
–outReadsUnmapped Fastx \
–outFilterMatchNminOverLread 0.1 \
–outFilterScoreMinOverLread 0.1 \
–outSAMtype BAM SortedByCoordinate

Skip to toolbar