ADVANCED

軌跡分析

從靜態的快照數據中推估細胞狀態轉變的動態路徑與時間順序。

Infer dynamic cell state transitions and temporal ordering from static snapshot data.

一、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 graphGeneral, supports branching
Slingshot (R)擬合同時主曲線簡單線性/分支Fits simultaneous principal curvesSimple linear/branching
RNA Velocity (Py)spliced/unspliced mRNA 比率推斷轉變「方向」Spliced/unspliced mRNA ratioInfers transition "direction"
CytoTRACE基因多樣性推估分化潛能預測哪些細胞較未分化Gene diversity estimates differentiation potentialPredicts which cells are less differentiated
PAGA (Py)圖抽象軌跡推斷大規模拓撲Graph abstraction for trajectoryLarge-scale topology

🌳 我該用哪個?

Q1:
想知道分化「順序」? Monocle3 或 Slingshot。
Q2:
想知道分化「方向」? RNA Velocity (scVelo)
Q3:
大規模數據,先看拓撲? PAGA
Q4:
想知道哪些細胞最未分化? CytoTRACE
Q1:
Want differentiation "order"? Monocle3 or Slingshot.
Q2:
Want differentiation "direction"? RNA Velocity (scVelo).
Q3:
Large-scale topology first? PAGA.
Q4:
Which cells are least differentiated? CytoTRACE.

四、實作範例

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)
🚨
Pseudotime ≠ 真實時間。它是根據表達相似性排列的「虛擬」時間軸。不同起始點、不同方法可能給出不同軌跡。結果需用實驗(lineage tracing、time-course)驗證。Pseudotime ≠ real time. It's a "virtual" timeline based on expression similarity. Different root cells or methods may produce different trajectories. Validate with experiments (lineage tracing, time-course).
⚠️
RNA Velocity 的限制:依賴 spliced/unspliced 讀段的準確量化,在 10x 3' 數據中可能不夠精確。UniTVelo、VeloVAE 等新方法嘗試改善此問題。RNA Velocity limitations: Relies on accurate spliced/unspliced quantification, which may be imprecise for 10x 3' data. Newer methods (UniTVelo, VeloVAE) attempt to address this.

📝 自我檢測

RNA Velocity 相比傳統 pseudotime 的獨特優勢是?

Unique advantage of RNA Velocity over traditional pseudotime?

A. 不需要先做聚類A. No clustering needed
B. 能推斷細胞轉變的「方向」B. Can infer the "direction" of transitions
C. 完全不需人工設定起始點C. No manual root cell needed
D. 計算速度更快D. Faster computation