image-based morphological profiling

MorphoProfile · 細胞影像形態分析 · Image-Based Morphological Profiling

一個關於「平均方式、估計量與實驗設計如何扭曲科學結論」的案例研究,用真實的開源 Cell Painting 資料一路走完。 載體是細胞影像「形態指紋」的作用機制(MoA)相似度檢索、候選活性篩選與去偏方法比較。 本頁的影像分割、UMAP、檢索、指紋與統計皆由真實資料預先計算(離線 Python),瀏覽器只讀取結果繪圖;附完整資料來源與一鍵可重現程式。 A case study in how averages, estimators and experimental designs distort scientific conclusions, worked through end to end on real open Cell Painting data. The vehicle is morphological fingerprinting for mechanism-of-action (MoA) similarity retrieval, candidate-activity screening and a batch-correction comparison. Segmentation, UMAP, retrieval, fingerprints and statistics are all pre-computed offline in Python from real data; the browser only renders the results. Full data sources and one-command reproducibility included.
● 真實資料 · real computed ◇ 表徵學習+檢索representation learning + retrieval
00 · 這份分析的主題:三個會誤導人的摘要數字00 · The theme of this analysis: three summary numbers that mislead
01 · 資料一覽(真實)01 · Data at a glance (real)

Data at a glance

關於資料:本區塊的運算資料為 (A549 細胞),其每盤 CellProfiler 形態特徵放在 GitHub 上、免帳號可取。 這是與 JUMP-CP 同一套 Cell Painting 分析法與特徵空間的公開資料;目標資料集為 。 About the data: this section is computed from (A549 cells); its per-plate CellProfiler features are hosted on GitHub and need no account. It uses the same Cell Painting assay and feature space as JUMP-CP; the target dataset is . 兩者皆放在 Both live in the Cell Painting Gallery (AWS Registry of Open Data),開源、免費、免 AWS 帳號。 — open, free, no AWS account required.
02 · 原始資料長什麼樣:真實五通道影像(可互動)02 · What the raw data looks like: real 5-channel images (interactive)

真實 Cell Painting 影像Real Cell Painting images

Cell Painting image
DNA · 細胞核 · nucleus RNA · 核仁/RNA · nucleoli/RNA ER · 內質網 · endoplasmic reticulum AGP · 肌動蛋白/膜 · actin/Golgi/membrane Mito · 粒線體 · mitochondria
化合物Compound—
分割到的細胞核數Nuclei segmented—
核面積中位數 (px)Median nucleus area (px)—
影像指紋距 DMSOFingerprint distance from DMSO—

最強驅動特徵Top driving features vs DMSO · Cohen's d

核面積分布Nucleus-area distribution 此化合物 vs DMSOthis compound vs DMSO

這些是真實影像(JUMP pilot CPJUMP1,U2OS 細胞,每個化合物 1 個 field,5 個螢光通道 + 3 個明場 z 平面)。 「分割」分頁的黃色邊界是本作品自己做的細胞核分割(高斯→Otsu→分水嶺),不是現成標註。通道對應: These are real images (JUMP pilot CPJUMP1, U2OS cells, one field per compound, 5 fluorescence channels + 3 brightfield z-planes). The yellow outlines on the "Segmented" tab are my own nucleus segmentation (Gaussian → Otsu → watershed), not pre-supplied annotations. Channel mapping:
方法補充:每顆細胞的細胞質環採互斥領域(環帶像素指派給最近的核),避免密集區域混入鄰近細胞訊號; DMSO 的指紋依定義為零向量,已排除在最近鄰排序之外。

Method notes: each cell's cytoplasmic ring uses an exclusive territory (ring pixels assigned to the nearest nucleus) so crowded fields do not mix in neighbouring cells' signal; DMSO's fingerprint is a zero vector by construction and is therefore excluded from nearest-neighbour ranking.
02b · 影像 → 形態指紋(本作品自建的 CV 管線)02b · Image → fingerprint (my own CV pipeline)

我的影像特徵指紋My image fingerprint 59 個自建特徵 · z-score vs DMSO59 hand-built features · z-score vs DMSO

流程:讀 5 通道 TIFF → 細胞核分割 → 每顆細胞量化形狀/亮度/紋理 → 對 DMSO 標準化。 這是 CellProfiler 的簡化重製版(59 特徵 vs 官方 1,747),目的在展示從影像端到端算出指紋的能力,而非取代 CellProfiler。 Pipeline: read 5-channel TIFFs → segment nuclei → quantify shape/intensity/texture per cell → standardize against DMSO. This is a simplified re-implementation of CellProfiler (59 features vs the official 1,747), meant to demonstrate the end-to-end image→fingerprint capability, not to replace it.

案例佐證:已知機制對得上嗎?Sanity check: does it match known biology? 用我的特徵,不是官方 profileusing my features, not official profiles

兩個最強表型的核大小變化方向相反、且各自符合已知機制——作為管線可運作的 sanity check。 定位:這是案例式的端到端展示,每個化合物只有 1 個 field;證明的是管線能運作、生物學說得通, 不是統計驗證、也不宣稱可泛化。圖中的「細胞」是同一 field 內的觀測值,不是獨立實驗重複, 因此不做也不隱含顯著性檢定;也尚未證明表型強度獨立於細胞密度或細胞死亡。 The two strongest phenotypes move nuclear size in opposite directions, each matching its known mechanism — a sanity check that the hand-built pipeline behaves sensibly. Scope: this is an illustrative end-to-end case study with one field per compound. It demonstrates pipeline functionality and biological plausibility — not statistical validation or generalization. The cells shown are observations within a single field, not independent experimental replicates, so no significance testing is performed or implied; nor is phenotype strength shown to be independent of cell density or cell death.

以圖檢索:上傳你自己的影像Search by image: upload your own 瀏覽器端即時運算 · 簡化版runs live in your browser · simplified

黃色 = 瀏覽器端偵測到的細胞核輪廓Yellow = nuclei detected in-browser
偵測到的細胞核Nuclei detected—
核面積中位數 (px)Median nucleus area (px)—
核佔畫面比例Nuclear area fraction—
誠實說明:瀏覽器端只做得到簡化分析(單通道灰階、Otsu、連通元件、3 個統計量), 不等於上方 Python 管線的 59 維指紋。真正的分析請用附帶的 image_pipeline.py。 Honest caveat: the browser can only do a simplified analysis (single grayscale channel, Otsu, connected components, three summary statistics) — this is not the 59-D fingerprint from the Python pipeline above. For the real thing, run the included image_pipeline.py.
03 · 分析流程03 · Analysis pipeline
STEP 1
五通道影像5-channel images
CellProfiler 分割細胞、量化形狀/亮度/紋理/顆粒等 ~1,700 特徵CellProfiler segments cells and quantifies ~1,700 shape / intensity / texture / granularity features
STEP 2
形態指紋Fingerprint
每個 well 壓成一條特徵向量,對 DMSO 對照標準化Each well becomes one feature vector, standardized against DMSO controls
STEP 3
去偏 / 表徵De-bias / represent
特徵選擇+批次校正(sphering / Harmony),彙整成每擾動的共識指紋Feature selection + batch correction (sphering / Harmony), aggregated into a per-perturbation consensus
STEP 4
相似度檢索Similarity retrieval
最近鄰比對已知化合物 → 推測未知擾動的 MoANearest neighbours among known compounds → infer the MoA of an unknown perturbation
STEP 5
候選活性篩選Candidate activity
與 DMSO 對照分布比較,篩出偏離對照的候選活性(heuristic,非顯著性檢定)Compare against the DMSO null to flag candidates (heuristic screen, not a significance test)
04 · 表型地圖 × 相似度檢索(真實 · 可互動)04 · Phenotype map × similarity retrieval (real, interactive)

表型地圖 UMAPPhenotype map (UMAP) 每點=一個真實化合物 · 點擊或搜尋任一藥物each dot = one real compound · click or search any drug

相似度檢索 → MoA 推測Retrieval → inferred MoA nearest neighbours by profile

paclitaxel
最近鄰化合物Nearest neighbour相似度Similarity已知 MoAAnnotated MoA
◇ 推測 MoA:—

形態指紋Morphological fingerprint vs DMSO · 依特徵族群平均 z-scorevs DMSO · mean z-score per feature family

影像看得到、標註看不到的機制:以 paclitaxel(紫杉醇) 為查詢,形態最相近的第一名是 KX2-391——資料庫把它標為「Src 抑制劑」, 但 KX2-391(tirbanibulin)其實同時是微管聚合抑制劑,會造成與紫杉醇類似的有絲分裂/微管表型;第二名 CYT-997 則是道地的微管抑制劑。 這正是 image-based drug discovery 的價值:不需知道分子式,看細胞長相就能指出真正的作用機制,甚至補正不完整的文獻標註。 Mechanism the image sees but the annotation misses: querying with paclitaxel, the closest morphological neighbour is KX2-391 — labelled a "Src inhibitor" in the database, yet KX2-391 (tirbanibulin) is in fact also a tubulin-polymerization inhibitor, producing a mitotic/microtubule phenotype much like paclitaxel's. The runner-up, CYT-997, is a bona fide tubulin inhibitor. This is exactly the value of image-based drug discovery: without knowing the molecular structure, cell appearance alone points to the real mechanism — and can even correct incomplete literature annotations.
05 · 候選活性篩選 × 方法表現(真實)05 · Candidate-activity screen × method performance (real)

候選活性篩選Candidate-activity screen 共識指紋偏離 DMSO 的程度consensus deviation from DMSO

候選活性比例Candidate-active fraction
門檻(DMSO null 第 95 百分位)Threshold (DMSO null, 95th pct)
以每個化合物的共識指紋與 DMSO 對照中心的 L2 距離為活性分數;門檻取自「只用 DMSO 隨機五孔中位數」的虛無分布第 95 百分位。 這是啟發式篩選、不是顯著性檢定(未做 plate-matched null、未白化、無 per-compound p/FDR);嚴謹版應改用 copairs replicate mAP+permutation p-value+FDR。 多數 Repurposing-Hub 化合物在 A549、此劑量下活性溫和,候選比例落在兩、三成屬合理。 Activity score = L2 distance of each compound's consensus fingerprint from the DMSO centroid; the threshold is the 95th percentile of a DMSO-only null (medians of random 5-well groups). This is a heuristic screen, not a significance test (no plate-matched null, no whitening, no per-compound p-value/FDR); the rigorous version would use copairs replicate mAP + permutation p-values + FDR. Most Repurposing-Hub compounds are only mildly active in A549 at this dose, so a candidate fraction in the twenties/thirties is reasonable.

方法表現Method performance MoA retrieval · standardized consensus · self-excluded baseline

Top-1 MoA
命中率accuracy
相對隨機倍數vs random
Top-5
召回率recall
誠實的基準線:在單一批次、未做進階校正的 pilot 標準化特徵上,最近鄰 MoA 命中率約 (約 倍於隨機;隨機基準 已排除自身、依合格查詢的 MoA 類別大小計算)。 這個「不高但明顯優於隨機」的數字正是切入點:更強的表徵(自監督 embedding)與經驗證的批次校正有機會把它往上推 (見下方方法比較——去偏必須實測驗證,效果隨設定而變)。此為與「藥物性質預測」紅海不同的差異化方向。 An honest baseline: on single-batch, minimally corrected pilot features, nearest-neighbour MoA accuracy is about (≈ chance; the random baseline excludes the query itself and is matched to eligible-query MoA class sizes). Modest but clearly above chance — and that gap is the point of attack: stronger representations (self-supervised embeddings) and validated batch correction can push it up (see the comparison below — de-biasing must be measured, and its effect depends on the setup). This is the differentiated direction, away from the crowded "molecule → property prediction" space.
05b · 方法比較:去偏是否有效(真實 · 含 95% CI)05b · Method comparison: does de-biasing help? (real, with 95% CI)
估計量提醒:本節的 mAP 走的是「先標準化 well → 再做 compound consensus」的管線; 05d 逐 MoA 那節走的是「先做 consensus → 再標準化」。兩者都合理、各自內部一致,但是不同的表徵,數值不可互相比較。Estimator note: the mAP in this section comes from a standardise-wells-then-build-consensus pipeline; the per-MoA section 05d builds the consensus first and standardises after. Both are legitimate and each is internally consistent, but they are different representations and the numbers are not comparable to one another.

批次去偏對 MoA 檢索的影響Effect of batch correction on MoA retrieval 同一 IR-mAP · 只換前處理 · bootstrap 95% CIsame IR-mAP · only preprocessing differs · bootstrap 95% CI

怎麼讀這張圖How to read this 去偏不是免費的correction is not free

關鍵結論:Bottom line:
05c · JUMP-Target 分層驗證:當實驗設計本身是混雜的05c · JUMP-Target stratified validation: when the design itself is confounded

為什麼不能直接對 plate 做批次校正Why you cannot just batch-correct by plate 探索性 · CPJUMP1 真實資料exploratory · real CPJUMP1 data

條件關聯結構保留度Condition-associated structure retention 1.0 = 該條件的可分辨結構已消失1.0 = that condition is no longer distinguishable

分層後:每個 cell line × timepoint 內各自評估Stratified: evaluated within each cell line × timepoint plate 此時才是真正的技術重複only here is plate a genuine technical replicate

關鍵結論:Bottom line:
05d · 逐 MoA 拆解:這個方法在哪裡有效、在哪裡無效05d · Per-MoA breakdown: where this method works and where it does not

各 MoA 類別的檢索表現Retrieval performance by MoA class 依 Top-1 排序 · 滑鼠移入看細節sorted by Top-1 · hover for detail

最小類別大小Min class size

完整表格Full table 隨機基準每類 < 2.5% · Wilson 區間為描述性random baseline < 2.5% per class · Wilson intervals are descriptive

檢索成敗 vs 表型強度Retrieval success vs phenotype strength 每點 = 一個 MoA 類別each point = one MoA class

這張圖回答什麼、不回答什麼What this figure does and does not settle

關鍵結論:Bottom line:
06 · AI 能加什麼?可落地的功能設計06 · What AI adds: deployable feature design

表徵學習 embeddingRepresentation learning

批次去偏 debiasingBatch de-biasing

檢索與解釋 UXRetrieval & explanation UX

07 · 差異化定位與路線圖07 · Positioning & roadmap
08 · 資料來源與引用08 · Data sources & citations