omics.co.in logo omics.co.in

5. Single-Cell RNA-Seq (scRNA-Seq) End-to-End Processing

⚡ Pipeline 5 of 16  ·  🧬 Single-Cell Biology

De-multiplexing 10x droplet microfluidic libraries, cell-barcode filtering, Scrublet doublet identification, SCTransform normalization, Harmony batch integration, and CellTypist automated annotation.

🔍 Ctrl + K
RNA • Single-Cell Authority: 10x Genomics / Seurat v5 / Scanpy
Production Blueprint v4.5

5. Single-Cell RNA-Seq (scRNA-Seq) End-to-End Processing

De-multiplexing 10x droplet microfluidic libraries, cell-barcode filtering, Scrublet doublet identification, SCTransform normalization, Harmony batch integration, and CellTypist automated annotation.

Metric / RequirementSpecificationTarget Configuration
Core Engine / FrameworkCell Ranger 8.0 / STARsolo + Scanpy / Seurat v5Nextflow / Snakemake Compatible
Benchmark Runtime~4 – 6 hours (10,000 cells)32 CPU cores / 64 GB RAM
Standard Containerlitd/docker-cellranger:v8.0.0Docker • Singularity • Conda
Input → Deliverable10x Chromium FASTQs → Filtered UMI Matrix, UMAP Embeddings, Cell-Type Clusters
Workflow Chain: Raw 10x FASTQs → Cell Ranger count / STARsolo → Quality Filter (Mito < 15%) → Scrublet → SCTransform / Harmony → UMAP → CellTypist
⚡

Step 1: Droplet De-multiplexing & UMI Quantification with Cell Ranger

Cell Ranger count v8.0+

De-multiplexes cell barcodes and UMIs, aligns reads against the reference transcriptome with STAR, and calls cell-containing droplets.

cellranger count --id=PBMC_10k_scRNA \
                 --transcriptome=/ref/refdata-gex-GRCh38-2020-A \
                 --fastqs=/data/pbmc_fastqs \
                 --sample=pbmc_10k \
                 --localcores=32 --localmem=64
Key Flags & Notes: --localmem 64 allocates memory for large matrix memory maps; output provides both raw and filtered feature-barcode matrices.
⚡

Step 2: Quality Filtering, Mitochondrial QC & Doublet Scrubbing with Scanpy

Scanpy • Scrublet

Removes empty droplets, apoptotic cells with high mitochondrial fractions (>15%), and computational doublets resulting from co-encapsulated cells.

import scanpy as sc
import scrublet as scr

adata = sc.read_10x_mtx('PBMC_10k_scRNA/outs/filtered_feature_bc_matrix/')
sc.pp.filter_cells(adata, min_genes=200)
sc.pp.filter_genes(adata, min_cells=3)

# Calculate mitochondrial percentage
adata.var['mt'] = adata.var_names.str.startswith('MT-')
sc.pp.calculate_qc_metrics(adata, qc_vars=['mt'], percent_top=None, log1p=False, inplace=True)
adata = adata[adata.obs.pct_counts_mt < 15, :]

# Doublet Scoring with Scrublet
scrub = scr.Scrublet(adata.X)
doublet_scores, predicted_doublets = scrub.scrub_doublets()
adata.obs['is_doublet'] = predicted_doublets
adata = adata[~adata.obs['is_doublet'], :]
Key Flags & Notes: pct_counts_mt < 15 eliminates lysed cells; Scrublet identifies multi-cell homotypic and heterotypic doublets.
⚡

Step 3: Normalization, Variable Features & PCA Dimensionality Reduction

Scanpy / Seurat v5

Normalizes cell sequencing depth to 10,000 counts, log-transforms values, selects 2,000 highly variable genes, and extracts principal components.

sc.pp.normalize_total(adata, target_sum=1e4)
sc.pp.log1p(adata)
sc.pp.highly_variable_genes(adata, min_mean=0.0125, max_mean=3, min_disp=0.5)
sc.pp.pca(adata, svd_solver='arpack')
Key Flags & Notes: highly_variable_genes focuses subsequent neighborhood graphs on informative transcriptomic variance.
⚡

Step 4: Cross-Sample Batch Correction with Harmony & UMAP Embedding

Harmony-Py • UMAP

Projects cells from disparate donors or technical library batches into a shared low-dimensional manifold without destroying genuine biological heterogeneity.

import scanpy.external as sce

# Harmony batch correction across donor runs
sce.pp.harmony_integrate(adata, key='donor_batch')
sc.pp.neighbors(adata, use_rep='X_pca_harmony', n_neighbors=15, n_pcs=30)
sc.tl.umap(adata)
sc.tl.leiden(adata, resolution=0.8)
Key Flags & Notes: X_pca_harmony ensures clustering is guided by batch-corrected biological signal.
⚡

Step 5: Automated Cell-Type Annotation with CellTypist

CellTypist v1.6+

Matches cell clusters against pre-trained neural network immune/tissue models to assign definitive cellular phenotypes.

import celltypist
from celltypist import models

# Predict immune cell types using Immune_All_Low model
model = models.Model.load(model='Immune_All_Low.pkl')
predictions = celltypist.annotate(adata, model=model, majority_voting=True)
adata = predictions.to_adata()
sc.pl.umap(adata, color=['majority_voting', 'leiden'], save='_cell_types.png')
Key Flags & Notes: majority_voting=True reconciles single-cell uncertainty by voting across cluster communities.

🚀 Automated Nextflow (nf-core) Production Execution

Execute this complete workflow across any SLURM, AWS Batch, or Google Cloud HPC cluster using the verified community container pipeline:

nextflow run nf-core/scrnaseq -r 2.5.1 \
  --input samplesheet.csv \
  --aligner cellranger \
  --genome GRCh38 \
  --outdir ./results_scrnaseq/ \
  -profile docker
← Return to Home Hub