一、Pseudotime
scRNA-seq 是一張「快照」——在某個時間點捕捉所有細胞的狀態。但因為不同細胞處於分化過程的不同階段,我們可以利用它們之間的表達漸變,重建出一條擬時序 (Pseudotime) 軸——好比從一張團體照中推測每個人的年齡。
scRNA-seq is a "snapshot" — capturing all cells' states at one timepoint. But since different cells are at different stages of differentiation, we can use expression gradients to reconstruct a pseudotime axis — like estimating each person's age from a group photo.
適用情境
細胞分化(幹→終端)、免疫細胞活化、疾病進程、藥物反應動態。
Cell differentiation (stem→terminal), immune activation, disease progression, drug response dynamics.
前提假設
數據中必須存在處於不同狀態的細胞。全部都是終端分化就無法重建軌跡。
Data must contain cells at different states. Fully differentiated cells can't reconstruct a trajectory.
二、互動模擬
切換 pseudotime 梯度與 cluster 著色。選擇基因觀察沿 pseudotime 的表達趨勢。
Toggle between pseudotime gradient and cluster coloring. Select genes to see expression trends along pseudotime.
三、工具比較
| 工具 | 邏輯 | 適用 | ||
|---|---|---|---|---|
| Monocle3 (R) | 學習主圖 (Principal Graph) | 通用型,支援分支 | Learns principal graph | General, supports branching |
| Slingshot (R) | 擬合同時主曲線 | 簡單線性/分支 | Fits simultaneous principal curves | Simple linear/branching |
| RNA Velocity (Py) | spliced/unspliced mRNA 比率 | 推斷轉變「方向」 | Spliced/unspliced mRNA ratio | Infers transition "direction" |
| CytoTRACE | 基因多樣性推估分化潛能 | 預測哪些細胞較未分化 | Gene diversity estimates differentiation potential | Predicts which cells are less differentiated |
| PAGA (Py) | 圖抽象軌跡推斷 | 大規模拓撲 | Graph abstraction for trajectory | Large-scale topology |
🌳 我該用哪個?
四、實作範例
library(monocle3) cds <- as.cell_data_set(pbmc) cds <- learn_graph(cds) cds <- order_cells(cds) # 互動選擇 root plot_cells(cds, color_cells_by = "pseudotime") # 找沿軌跡變化的基因 traj_genes <- graph_test(cds, neighbor_graph = "principal_graph")
import scvelo as scv scv.pp.filter_and_normalize(adata, min_shared_counts=20) scv.pp.moments(adata, n_pcs=30, n_neighbors=30) scv.tl.velocity(adata) scv.tl.velocity_graph(adata) scv.pl.velocity_embedding_stream(adata, basis="umap") scv.tl.rank_velocity_genes(adata)
📝 自我檢測
RNA Velocity 相比傳統 pseudotime 的獨特優勢是?
Unique advantage of RNA Velocity over traditional pseudotime?