How to Use STAR: Mapping in RNA-Seq Analysis
Introduction
When quantifying gene expression levels using sequencing data obtained from RNA-Seq analysis, a mapping step is generally required. Mapping refers to the process of aligning read sequences (FASTQ files) to matching positions on a reference sequence. Commonly used mapping software for RNA-Seq includes HISAT2, STAR, Bowtie2. This page explains how to use STAR.
If you would like to understand the overall workflow of RNA-Seq analysis, please refer to the RNA-Seq analysis workflow overview.
Installation
According to the official STAR documentation, at least 16 GB of memory (ideally 32 GB) is required to handle mammalian genomes, so please be aware of this requirement.
You can install STAR via Bioconda.
Let’s check the help message.
If the following output is displayed, the installation was successful.
Index Construction (Build)
Create the index using the following command.
The reference FASTA file is specified with --genomeFastaFiles, and the annotation (GTF file) is specified with --sjdbGTFfile. The index files will be created in the genome directory.
Note that when running this command on the human genome in an environment with 16 GB of memory, the process failed during execution. In my environment, I was able to successfully generate the index by using the --limitGenomeGenerateRAM and--genomeSAsparseD options.
Index files are required for fast sequence searching and must be created in advance for almost all mapping software, not just STAR.
Mapping
Run the following command to perform the mapping.
The mapping results were generated.
By adding the --outSAMtype BAM SortedByCoordinate option, a sorted BAM file will be output.
When visualized using a genome browser such as IGV, the mapped reads can be observed as shown below.

RNA-Seq Data Analysis Software: Accelerate Your Publication
With our RNA-Seq data analysis software, you won't need to outsource or rely on collaborators. You can start analyzing the data yourself right away, without the need for high-spec computers or knowledge of Linux commands.

Users can perform gene expression quantification, identification of differentially expressed genes, gene ontology(GO) analysis, pathway analysis, as well as drawing volcano plots, MA plots, and heatmaps.
About the Author
BxINFO LLC
A research support company specializing in bioinformatics.
We provide tools and information to support life science research, with a focus on RNA-Seq analysis.