omics.co.in

Chapter 9: Trajectory Inference & Lineage Branching (Pseudotime)

Chapter 9: Trajectory Inference & Lineage Branching (Pseudotime)

Biological differentiation, embryonic development, and immune activation are continuous biological processes, not discrete jumps between static clusters. Trajectory inference orders cells along a continuous progression termed pseudotime, measuring the distance a cell has traveled along a dynamic developmental path.

Understanding Pseudotime

Pseudotime does not measure physical clock time; it measures an individual cell's progress through a continuous biological transition (e.g. hematopoietic stem cell \( ightarrow\) common myeloid progenitor \( ightarrow\) mature granulocyte), reconstructed by ordering cells based on gradual shifts in gene expression manifolds.

1. Trajectory Inference with Slingshot

Slingshot builds a Minimum Spanning Tree (MST) over pre-computed cluster centroids, identifies branching lineages, and fits smooth principal curves through cells using simultaneous principal curves.

library(slingshot)
library(SingleCellExperiment)

# Convert Seurat object to SingleCellExperiment
sce <- as.SingleCellExperiment(pbmc)

# Run Slingshot specifying a stem/progenitor starting cluster
sce <- slingshot(
    sce, 
    clusterLabels = 'seurat_clusters', 
    reducedDim = 'UMAP', 
    start.clus = '0' # Specify root cluster (e.g. HSCs)
)

# Extract pseudotime lineages
pseudotime_values <- slingPseudotime(sce)

# Plot trajectories overlaid on UMAP
plot(reducedDim(sce, "UMAP"), col = topo.colors(100)[cut(pseudotime_values[,1], 100)], pch = 16)
lines(SlingshotDataSet(sce), lwd = 3, col = 'black')

2. Principal Graph Learning with Monocle 3

Monocle 3 utilizes reversed graph embedding (SimplePPT) to learn an explicit principal graph spanning single-cell manifold trajectories and detects bifurcation branch points.

library(monocle3)

# Create a cell_data_set object
cds <- new_cell_data_set(counts, cell_metadata = cell_meta, gene_metadata = gene_meta)
cds <- preprocess_cds(cds, num_dim = 50)
cds <- reduce_dimension(cds, reduction_method = "UMAP")
cds <- cluster_cells(cds)

# Learn the principal trajectory graph
cds <- learn_graph(cds, use_partition = TRUE)

# Order cells in pseudotime by choosing a root node
cds <- order_cells(cds, root_cells = root_cell_barcodes)

# Plot cells colored by learned pseudotime
plot_cells(cds, color_cells_by = "pseudotime", label_cell_groups = FALSE, label_leaves = TRUE, label_branch_points = TRUE)

3. Discovering Lineage-Dynamic Genes

Once cells are ordered along a trajectory, regression models identify genes whose expression changes significantly as a function of pseudotime, revealing the sequential cascade of transcription factors driving differentiation.

# Identify genes dynamically regulated along pseudotime in Monocle 3
pr_graph_test_res <- graph_test(cds, neighbor_graph = "principal_graph", cores = 8)
dynamic_genes <- subset(pr_graph_test_res, q_value < 1e-5)

# Plot dynamic gene kinetic curves
plot_genes_in_pseudotime(cds[c("CD34", "GATA1", "MPO"), ], color_cells_by = "pseudotime")
← Return to Home Hub Scroll to Top ↑