omics.co.in logo omics.co.in

Chapter 15: Introduction to Single-Cell RNA-Seq: 10x Genomics, Cell Ranger & Quality Control

Tested Stacks: GATK 4.6.1 Samtools 1.21 Nextflow 24.10 Seurat v5.1 Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
📚 Chapter 15 of 18 0% Course Completed

1. From Bulk Average Expression to Single-Cell Resolution

Bulk RNA-Seq averages the transcriptional output of hundreds of thousands of heterogeneous cells, masking rare stem cell niches, drug-tolerant persister cells, and specialized tumor-infiltrating lymphocyte clones. Microfluidic droplet technologies (such as 10x Genomics Chromium) isolate individual cells inside microscopic oil droplets alongside hydrogel beads delivering two vital oligonucleotide barcodes:

Oligonucleotide TagLengthBiological & Computational Function
Cell Barcode (CB)16 nucleotidesUniquely identifies the individual cellular oil droplet from which the cDNA originated.
Unique Molecular Identifier (UMI)10–12 nucleotidesUniquely tags individual mRNA transcript molecules prior to PCR amplification. Eliminates PCR duplication bias.

2. The 10x Genomics Cell Ranger Pipeline

# Executing 10x Genomics Cell Ranger Count Pipeline
cellranger count --id=Patient_PBMC_Trial \
                 --transcriptome=/ref/refdata-gex-GRCh38-2024-A \
                 --fastqs=/data/pbmc_fastqs/ \
                 --sample=PBMC_Sample1 \
                 --localcores=16 \
                 --localmem=64

# Output Directory Structure:
# outs/
# ├── filtered_feature_bc_matrix/
# │   ├── barcodes.tsv.gz   (Identified valid cell barcodes)
# │   ├── features.tsv.gz   (Ensembl IDs and gene symbols)
# │   └── matrix.mtx.gz     (Sparse count matrix)
# ├── web_summary.html      (Interactive sequencing QC metrics)
# └── possorted_genome_bam.bam

3. Single-Cell Quality Control & Filtering in R

Before downstream analysis, three critical technical artifacts must be filtered out:

  1. Empty Droplets: Ambient free-floating RNA packaged in droplets lacking intact cells (extremely low UMI count).
  2. Apoptotic / Damaged Cells: Lysed cells where cytoplasmic mRNA leaked out, leaving high percentages of mitochondrial transcripts (percent.mt > 15%).
  3. Doublets / Multiplets: Two or more cells captured in a single droplet (abnormally high detected gene count).
library(Seurat)
library(ggplot2)

# Load 10x Genomics filtered sparse matrix
pbmc.data <- Read10X(data.dir = "filtered_feature_bc_matrix/")
pbmc <- CreateSeuratObject(counts = pbmc.data, project = "PBMC_BioResearch", min.cells = 3, min.features = 200)

# Calculate Percentage Mitochondrial Gene Expression
pbmc[["percent.mt"]] <- PercentageFeatureSet(pbmc, pattern = "^MT-")

# Visualize Pre-Filter QC Violin Plots
VlnPlot(pbmc, features = c("nFeature_RNA", "nCount_RNA", "percent.mt"), ncol = 3)

# Apply Strict Single-Cell Filtering Criteria
pbmc <- subset(
    pbmc,
    subset = nFeature_RNA > 500 &
             nFeature_RNA < 4000 &
             percent.mt < 10 &
             nCount_RNA < 20000
)
cat("Viable single cells retained after QC:", ncol(pbmc), "\n")
⚠️

Common Pitfalls & Troubleshooting Checklist

  • Java Heap Exhaustion (GATK / Picard): If processes terminate with java.lang.OutOfMemoryError, set your environment variable explicitly: export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp".
  • Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with samtools index -@ 4 sample.bam.
  • Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority: conda config --set channel_priority strict.
  • Chromosome Naming Contamination: Always verify whether reference FASTA headers use chr1 or 1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.
📝 Propose Edit on GitHub ↗