- Introduced by
- Adapted from bulk RNA-seq aligners; single-cell extensions by Dobin et al. (STAR) and 10x Genomics Cell Ranger team
- Year
- 2013–2016
- Type
- Computational pipeline step
- Family
- Bioinformatics / omics
What does it do?
Single-cell sequence alignment is the computational step that maps millions of short sequencing reads produced by single-cell RNA-seq experiments back to a reference genome or transcriptome.
Unlike bulk RNA-seq alignment, each read carries a cell barcode and a Unique Molecular Identifier (UMI) that together identify the originating cell and the individual RNA molecule. Accurate alignment and barcode demultiplexing are prerequisites for constructing the cell-by-gene count matrix that drives all downstream single-cell analyses.
The intuition behind the method
Think of a single-cell experiment as dropping thousands of tiny labelled containers — one per cell — into a sequencer. Every container is tagged with a unique barcode, and every RNA molecule inside is tagged with a UMI. Sequencing shreds all the contents into short fragments and mixes them together. Alignment is the process of sorting those fragments back to the right position in the genome, reading the barcodes to put each fragment in the correct cell's bin, and using UMIs to collapse duplicates so that each original molecule is counted once. The result is a count table: rows are cells, columns are genes, and each number tells you how many RNA molecules of that gene were detected in that cell.
History
STAR (Dobin et al., 2013) made splice-aware RNA-seq alignment fast enough for transcriptome-scale data, but it was designed for bulk RNA-seq. Single-cell protocols add cell barcodes and UMIs that must be handled alongside alignment, and later pipelines added barcode-aware processing on top of splice-aware aligners. UMI-tools (Smith et al., 2017) formalised how sequencing errors in UMIs should be handled when identifying PCR duplicates. The 10x Genomics Cell Ranger pipeline provides an end-to-end alignment-to-count workflow for Chromium chemistry, and STARsolo is an open barcode-aware mode within the STAR codebase.
When to use it
Use single-cell sequence alignment whenever raw FASTQ data from a single-cell RNA-seq experiment must be converted into a count matrix; it is the first computational step before clustering, trajectory, or differential expression analysis. Choose a genome-based aligner such as STAR or STARsolo when you need splice-junction information, intronic read quantification (for example for RNA velocity), or alignments in BAM format. Choose a pseudo-aligner such as kallisto with bustools or alevin-fry when turnaround time or computing resources are the main constraint and splice-level detail is not needed. For multi-modal libraries (such as chromatin accessibility or protein co-measurement), check that your chosen tool supports the specific assay before committing to it. Do not use this pipeline for bulk RNA-seq, where barcode handling will fail, or for DNA-based single-cell assays such as scATAC-seq or scChIP-seq, which need different alignment strategies.
Limitations and considerations
- Genome alignment with a splice-aware index needs substantial memory and computing time, and the cost rises with library size; pseudo-alignment reduces both at the price of alignment-level detail.
- The method is reference-dependent: reads from genes absent from the annotation GTF cannot be assigned to genes, so annotation completeness caps the fraction of reads that can be used.
- Barcode whitelists are chemistry-specific; custom or non-standard library designs may need a manually built whitelist or may yield many unassigned barcodes.
- Pseudo-aligners do not capture novel splice junctions, intronic reads, or reads spanning unannotated regions, and they do not write BAM files.
- Multi-mapping reads, which align equally well to several loci, are typically discarded or assigned heuristically, which lowers sensitivity for highly homologous gene families.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Converts raw sequencing output into a cell-by-gene count matrix in one pipeline run, so cell barcodes and UMIs are handled consistently from the start.
- Barcode correction within a Hamming distance of 1 against the chemistry whitelist recovers reads whose barcodes carry a single sequencing error instead of discarding them.
- UMI-based collapsing of reads that share a gene and cell removes PCR duplicates, so counts track captured molecules rather than amplification output.
- Splice-aware genome alignment identifies spliced and unspliced reads, which enables intronic quantification and novel junction discovery that pseudo-alignment does not provide.
- Several established implementations exist (STARsolo, Cell Ranger, alevin-fry), so users can choose between vendor-supported and open-source tools.
Applications
- Building cell-by-gene count matrices from 10x Chromium, Drop-seq, or Smart-seq2 experiments as input to clustering and cell-type annotation workflows.
- Quantifying spliced and unspliced reads separately for RNA velocity analysis of developmental trajectories.
- Co-quantifying gene expression with protein or chromatin accessibility in CITE-seq or Multiome libraries, using a pipeline that supports the specific assay.
- Reprocessing public single-cell datasets from NCBI GEO or the Human Cell Atlas when re-analysis with updated genome annotations or alignment settings is needed.
- Deriving QC metrics such as mapping rate, fraction of reads in cells, and median genes per cell directly from alignment outputs; the resulting BAM files can also feed variant calling for somatic mutations or RNA editing at single-cell resolution.
How it works
How it works
Raw FASTQ files are quality-checked with tools such as FastQC and, if necessary, adapter sequences and low-quality bases are trimmed from the 3' end of cDNA reads. For most single-cell library chemistries (e.g., 10x Chromium) the barcode and UMI read is not trimmed because every base position carries structured information required in the next step.
A splice-aware genome index is built once from the reference genome FASTA and gene annotation GTF (e.g., Ensembl or GENCODE). Tools such as STAR build a suffix-array-based index that enables ultra-fast mapping of spliced reads across exon–exon junctions. The index is reused across all samples aligned to the same genome build.
For chemistries in which the barcode and UMI occupy specific positions in read 1, dedicated tools (STARsolo, Cell Ranger, kb-python) parse these positions, compare each observed barcode to a whitelist of valid barcodes provided by the library chemistry, and correct single-nucleotide errors within a Hamming distance of 1. Reads whose barcodes cannot be corrected are discarded.
The cDNA read (read 2 in most paired-end protocols) is aligned to the genome index. STAR's two-pass alignment finds canonical and novel splice junctions; pseudo-aligners such as kallisto or salmon map reads probabilistically to the transcriptome without full genome alignment, offering faster runtime at the cost of some alignment-level detail. Each mapped read retains its corrected cell barcode and raw UMI.
Mapped reads overlapping annotated gene bodies are assigned to genes using a counting model (for example gene-level, exon-only, or intronic). Within each cell, reads assigned to the same gene and sharing the same UMI sequence are collapsed into a single count to remove PCR duplicates; UMIs that differ only by a sequencing error can be grouped with network-based methods rather than counted as distinct molecules (Smith et al., 2017). The resulting cell-by-gene sparse count matrix is written in standard formats (MEX, H5AD) for downstream analysis.
Common pitfalls
- Mismatched genome build and annotation: aligning to GRCh38 with a GRCh37 GTF introduces systematic mis-assignment; always pair the FASTA and GTF from the same Ensembl or GENCODE release.
- Wrong barcode whitelist for the library chemistry: using a v2 10x whitelist on a v3 library (or vice versa) causes the majority of barcodes to be discarded; always match the whitelist to the exact kit version.
- Treating every barcode as a cell: barcodes from empty droplets carry background RNA and inflate apparent cell numbers. The alignment steps described here do not separate true cells from empty droplets, so a separate cell-calling step, such as a knee-point or EmptyDrops-style approach applied to the barcode-rank plot, is needed before analysis.
- Confusing reads per cell with molecules per cell: if UMIs are omitted, or if sequencing errors in UMIs are not handled, duplicate counts are inflated or split. UMI-tools (Smith et al., 2017) showed that UMI sequencing errors are common, so the deduplication method matters as much as the presence of UMIs.
- Using mismatched genome builds across samples in an integrated study: batch effects introduced by alignment artifacts are indistinguishable from biological batch effects during integration.
Frequently asked questions
Should I use Cell Ranger or STARsolo?
Cell Ranger is the 10x Genomics supported pipeline and is the default choice for 10x Chromium libraries; it handles barcode whitelists, cell calling, and multi-modal assays with minimal configuration. STARsolo is an open-source mode of STAR that supports 10x, Drop-seq, and custom chemistries, is freely auditable, and is often preferred in high-performance computing environments where the licensing or computing overhead of a vendor pipeline is a concern. For standard gene-expression libraries the two should give broadly similar count matrices, but check the documentation of the version you run.
What fraction of reads should align to the genome?
Expected mapping rates depend on the library, the reference, and the metric used, so there is no single universal threshold. A low fraction of mapped reads more often points to adapter contamination, a mismatch between genome and annotation, or foreign RNA from another species than to the aligner itself. A stricter transcriptome-based metric, reported by Cell Ranger, is more useful for diagnosing annotation completeness. Compare values against the QC summary your tool produces and against other libraries from the same experiment.
When should I use a pseudo-aligner instead of STAR?
Pseudo-aligners such as kallisto|bustools (kb-python) or salmon/alevin-fry are appropriate when processing speed is critical, resources are limited, or the analysis requires only spliced transcript quantification. They are considerably faster and lighter on memory than full genome aligners. However, they do not produce BAM files and do not quantify splice junctions by default, so splice-junction analysis and variant calling are not supported from their standard output. Intronic quantification for RNA velocity is not part of the standard pseudo-alignment output; where a tool offers it, it depends on a separately built intron-aware index and that tool's specific workflow, so check the documentation for the version you use.
How do I handle ambient RNA contamination that is present before alignment?
Ambient RNA contamination is a wet-lab artifact — damaged cells release RNA into the droplet solution, and that RNA is captured in empty droplets as false signal. Alignment itself cannot remove it, but the count matrix it produces can be corrected post-alignment with tools such as SoupX or DecontX, which estimate the ambient profile from empty-droplet barcodes and subtract it from cell counts.
Can I align data from multiple single-cell technologies in the same pipeline?
Not with a single fixed configuration. Each library chemistry defines a different read structure — the length, position, and content of the barcode and UMI in the read differ between 10x v2, v3, Drop-seq, CEL-Seq2, and others. STARsolo supports switching chemistry via a command-line flag, and kb-python supports a technology flag. Cell Ranger is designed only for 10x Chromium chemistries. Always confirm the read structure of your library before setting alignment parameters.
Related methods
Sources
Dobin, A., Davis, C. A., Schlesinger, F., Drenkow, J., Zaleski, C., Jha, S., Batut, P., Chaisson, M., & Gingeras, T. R. (2013). STAR: ultrafast universal RNA-seq aligner. Bioinformatics, 29(1), 15–21.
Open DOI referenceSmith, T., Heger, A., & Sudbery, I. (2017). UMI-tools: modeling sequencing errors in Unique Molecular Identifiers to improve quantification accuracy. Genome Research, 27(3), 491–499.
Open DOI reference