>
STAR Aligner Tutorial: Fast RNA-Seq Read Mapping

STAR Aligner Tutorial: Fast RNA-Seq Read Mapping

Last updated: March 13, 2026

📖 RNA-Seq Data Analysis Workflow — check it out for an overview.

Introduction

Quantifying gene expression from RNA-Seq sequencing data typically requires a mapping step. Mapping is the process of aligning read sequences (FASTQ files) to their corresponding positions on a reference sequence. Popular mapping tools for RNA-Seq include HISAT2, STAR, and Bowtie2. This page walks through how to use STAR.

For an overview of the entire RNA-Seq data analysis workflow, see the RNA-Seq analysis workflow guide.

Installation

According to the official documentation, STAR requires at least 16 GB of RAM (ideally 32 GB) to handle mammalian genomes, so keep this in mind before getting started.

You can install STAR through Bioconda:

$ conda install -c bioconda star

Verify the installation by displaying the help message:

$ star --help

If you see output similar to the following, STAR has been installed successfully.

Usage: STAR [options]... --genomeDir /path/to/genome/index/ --readFilesIn R1.fq R2.fq Spliced Transcripts Alignment to a Reference (c) Alexander Dobin, 2009-2020 STAR version=2.7.10a STAR compilation time,server,dir= :/Users/travis/build/alexdobin/travis-tests/STARcompile/source For more details see: <https://github.com/alexdobin/STAR> <https://github.com/alexdobin/STAR/blob/master/doc/STARmanual.pdf> ### versions versionGenome 2.7.4a string: earliest genome index version compatible with this STAR release. Please do not change this value! ### Parameter Files parametersFiles - string: name of a user-defined parameters file, "-": none. Can only be defined on the command line. ...

Index Construction (Build)

Generate the genome index with the following command:

$ mkdir genome $ star --runThreadN 4 --runMode genomeGenerate --genomeDir genome --genomeFastaFiles genome.fa --sjdbGTFfile annotation.gtf

The reference FASTA file is passed via --genomeFastaFiles, and the gene annotation (GTF file) is passed via --sjdbGTFfile. The resulting index files will be written to the genome directory.

Note that when building the index for the human genome on a machine with only 16 GB of RAM, the command above may fail partway through. In that case, adding the --limitGenomeGenerateRAM and --genomeSAsparseD options can help the process complete successfully.

Index files enable fast sequence lookup and must be generated ahead of time for virtually all mapping tools, not just STAR.

Mapping

Run the alignment with the following command:

$ star --runThreadN 4 --genomeDir genome --readFilesIn read_1.fastq.gz read_2.fastq.gz --readFilesCommand gunzip -c --outSAMtype BAM SortedByCoordinate --outFileNamePrefix sample1

This produces the mapping results.

By specifying the --outSAMtype BAM SortedByCoordinate option, STAR directly outputs a coordinate-sorted BAM file, saving you an extra sorting step.

You can inspect the results in a genome browser such as IGV. The aligned reads will appear as shown below.

Mapping result

RNA-Seq Data Analysis Software

This is an RNA-Seq Data Analysis Software recommended for those who:

✔︎ Seeking to avoid outsourcing or collaboration for RNA-Seq data analysis.

✔︎ Lacking time to learn RNA-Seq data analysis.

✔︎ Frustrated by the complexity of existing tools.

overview

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.

BxINFO LLC logo

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.

→ Learn more