Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

STAR Aligner: RNA-seq Alignment Guide (Index, Mapping, Outputs)

How to install STAR, generate a genome index, align RNA-seq reads and read its output files, following the 2.7.11b manual.

Written and maintained by CASRAI Editorial Board

Last updated

STAR (Spliced Transcripts Alignment to a Reference) is a command-line aligner for RNA-seq reads, described by Dobin et al. in Bioinformatics (2013; PubMed 23104886). This guide is for researchers who have FASTQ files and an annotated reference genome and need to build a STAR index, align reads, and interpret the output files. Commands and parameter descriptions follow the STAR manual for release 2.7.11b (25 January 2024), read 2026-11-07.

What is genome alignment, and what is STAR used for in research?

Genome alignment places each sequencing read at the position in a reference genome it most likely came from. For RNA-seq this is harder than for DNA, because a read can span an exon-exon junction and so map in two pieces separated by an intron. STAR is a splice-aware aligner: it accepts FASTA or FASTQ reads and writes alignments (SAM or BAM), splice-junction tables and, optionally, per-gene read counts. Reads are normally supplied as FASTQ files and the main alignment output is a BAM file.

Install or access (official source only)

STAR is developed at github.com/alexdobin/STAR. The README gives this source build:

wget https://github.com/alexdobin/STAR/archive/2.7.11b.tar.gz
tar -xzf 2.7.11b.tar.gz
cd STAR-2.7.11b/source
make STAR
  • Processor without AVX support: make STAR CXXFLAGS_SIMD=sse.
  • macOS: in source/, make STARforMacStatic CXX=/path/to/g++.
  • FreeBSD: pkg install star.
  • Platform: 64-bit Linux or macOS on x86-64. The README states that mammalian genomes need at least 16 GB of RAM, ideally 32 GB.

Version and status. The latest release listed on the GitHub releases page when checked was 2.7.11b (January 2024), preceded by 2.7.11a (15 August 2023). Questions and bug reports go through the GitHub issue tracker and the STAR Google group.

Step-by-step: index the genome, then align

Step 1. Generate the genome index

Create the index directory first and make sure it is writable and empty, then run:

mkdir /path/to/genomeDir
STAR --runThreadN N --runMode genomeGenerate --genomeDir /path/to/genomeDir --genomeFastaFiles genome.fa --sjdbGTFfile annotations.gtf --sjdbOverhang ReadLength-1
  • --genomeFastaFiles: the reference sequence. Which sequences to include (analysis set, ALT contigs, decoys) is a separate decision; see reference genome analysis sets.
  • --sjdbGTFfile: the annotation. The manual calls a GTF “highly recommended” but optional; it can also be supplied at the mapping step. For the file format see GTF vs GFF3.
  • --sjdbOverhang: ideally read length minus 1, so 99 for 2×100 reads; for reads of varying length use the maximum length minus 1. The manual states that in most cases the default value of 100 works as well as the ideal value.
  • Disk: the manual indicates roughly 100 GB for a typical mammalian genome index.

Small genomes and many references

Situation Parameter Manual guidance
Small genome --genomeSAindexNbases Typically min(14, log2(GenomeLength)/2 – 1); for example 9 for a 1 Mb genome and 7 for 100 kb.
More than 5,000 references (scaffolds) --genomeChrBinNbits min(18, log2[max(GenomeLength/NumberOfReferences, ReadLength)]); the manual’s example value is 15.

Step 2. Align reads

STAR --runThreadN N --genomeDir /path/to/genomeDir --readFilesIn read1.fastq read2.fastq
  • Compressed input: add --readFilesCommand zcat (or gunzip -c, bunzip2 -c).
  • Several files: comma-separated with no spaces. For paired-end data give the read 1 list, a space, then the read 2 list. Assign read groups with --outSAMattrRGline ID:a , ID:b (the comma is surrounded by spaces), or use --readFilesManifest.
  • Sorted BAM output: --outSAMtype BAM SortedByCoordinate (also BAM Unsorted, or both). The default output is Aligned.out.sam. Sorted BAM files are usually indexed afterwards; see BAM index (.bai) files.
  • Counts: --quantMode GeneCounts writes per-gene counts and needs a GTF at index or mapping time. --quantMode TranscriptomeSAM GeneCounts also writes Aligned.toTranscriptome.out.bam.

Step 3. Optional two-pass mapping for novel junctions

--twopassMode Basic runs per-sample two-pass mapping: junctions found in the first pass are inserted into the index and reads are remapped. For several samples, run pass 1 on all of them, then pass the junction tables on the second pass with --sjdbFileChrStartEnd sj1.tab sj2.tab .... The manual says two-pass mapping does not significantly increase the number of detected novel junctions but allows more spliced reads to map to novel junctions.

Fusion detection

Setting --chimSegmentMin to a positive value enables chimeric alignment detection; the manual refers to the separate STAR-Fusion package for fusion calling.

Output and how to read it

Log files

Log.progress.out is updated every minute during a run. Log.final.out is the summary QC report. In it, a paired-end read pair counts as one read (unlike samtools flagstat), and most statistics are computed on uniquely mapped reads.

SAM attributes and MAPQ

Default attributes are NH, HI, AS and nM; NH=1 means a unique alignment. MAPQ is 255 for unique mappers and int(-10*log10(1-1/Nmap)) for multimappers.

SJ.out.tab columns

Column Content
1 Chromosome
2 First base of the intron (1-based)
3 Last base of the intron (1-based)
4 Strand: 0 undefined, 1 +, 2 –
5 Intron motif: 0 non-canonical, 1 GT/AG, 2 CT/AC, 3 GC/AG, 4 CT/GC, 5 AT/AC, 6 GT/AT
6 0 unannotated, 1 annotated (in two-pass mode, first-pass junctions are reported as annotated)
7 Number of uniquely mapping reads crossing the junction
8 Number of multimapping reads crossing the junction
9 Maximum spliced alignment overhang

STAR’s junction start and end are the first and last intronic bases, whereas many other tools report exonic bases, so convert coordinates before comparing. Junctions are filtered by the --outSJfilter* parameters.

ReadsPerGene.out.tab columns

Column Content
1 Gene ID
2 Counts for unstranded RNA-seq
3 Counts when the 1st read strand aligns with the RNA (htseq-count -s yes)
4 Counts when the 2nd read strand aligns with the RNA (htseq-count -s reverse)

A read is counted if it overlaps at least one nucleotide of one and only one gene, which matches htseq-count defaults. Choose the column that matches the library’s strandedness. For what to do with raw counts downstream, see TPM vs FPKM vs raw counts.

Troubleshooting

  • Index generation fails at the start: the manual requires the --genomeDir directory to exist (create it with mkdir) and be writable; clear any earlier contents before a new run.
  • Build problems on processors without AVX: rebuild with CXXFLAGS_SIMD=sse.
  • Out of memory: the README sets 16 GB as the minimum for mammalian genomes, ideally 32 GB.
  • Small genome or many scaffolds: set --genomeSAindexNbases and --genomeChrBinNbits from the formulas above.
  • Counts look wrong in ReadsPerGene.out.tab: check that you are reading the column (2, 3 or 4) that matches the library strandedness.
  • Junction coordinates differ from another tool: see the intronic versus exonic convention above.

Which tools do sequence alignment, and what free options exist?

BLAST is a sequence-similarity search tool; STAR, HISAT2, BWA and Bowtie2 are read aligners that map sequencing reads to a genome. For spliced RNA-seq alignment, HISAT2 is the usual comparison.

Tool Relation to STAR
STAR Spliced aligner for RNA-seq reads; source distributed openly on GitHub (see above).
HISAT2 Another splice-aware RNA-seq aligner; see the HISAT2 vs STAR comparison.

FAQ

What is genome alignment?

It is the assignment of each sequencing read to its most likely position in a reference genome. STAR does this for RNA-seq reads, allowing a read to split across introns.

What are the disadvantages of RNA sequencing?

In general terms, RNA-seq requires computing resources for alignment and storage, and its results depend on library preparation and on the reference and annotation used. For study-design choices see RNA-seq experimental design and analysis.

What is the best free software for DNA sequence analysis?

There is no single answer: the right tool depends on the task (read alignment, variant calling, similarity search). For spliced RNA-seq reads, STAR and HISAT2 are both used; see the comparison linked above.

Which of the following is a bioinformatics tool used for sequence alignment?

STAR, HISAT2, BWA, Bowtie2 and BLAST are all sequence alignment or search tools. Of these, STAR and HISAT2 are designed for spliced RNA-seq reads.

Is STAR still maintained?

The latest release on the GitHub releases page when checked (2026-11-07) was 2.7.11b, from January 2024. The README does not state a maintenance policy.

How do I cite STAR?

Cite Dobin A, et al. “STAR: ultrafast universal RNA-seq aligner”, Bioinformatics, 2013 (PubMed 23104886), and state the version used, for example 2.7.11b.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about STAR Aligner: RNA-seq Alignment Guide (Index, Mapping, Outputs)

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →