模組 7 · Somatic variant calling: tumour–normal and tumour-only
Somatic variant calling:tumor–normal 與 tumor-only
說明配對正常樣本提供的個體基線,以及 tumor-only 分析在 germline 與技術性 artifact 判斷上的限制。
本模組學習目標
- 說明配對正常樣本提供了什麼,以及沒有它時失去什麼
- 區分本教材使用的 PON 與 GATK 語境中的 PoN,並說明兩者共同的涵蓋缺口
- 說明為什麼 somatic 不等於「腫瘤 VCF 減掉正常 VCF」,並列出四個失準來源
- 解釋 TINC 為什麼讓「normal 有訊號就排除」的規則失效
- 說明 read-level 的 haplotype 分布為什麼可以在沒有正常樣本時提供替代證據
為什麼重要
本模組比較兩種分析設計:有配對正常樣本的 tumor–normal(TN)模式, 以及只有腫瘤樣本的 tumor-only(TO)模式。是否有 matched normal 會改變可用的對照證據與不確定性。
差異不只是少一個輸入檔案;它會改變可辨識的變異類型與後續判讀方式。
概念與互動
同一批 read,兩種對照,兩種輸出
先把整件事放在一張圖裡。下圖的上下兩排腫瘤 read 完全相同—— 同樣六條 read、同樣四個候選位置。唯一改變的是右邊拿什麼當對照:
請注意這張圖真正的重點:位置 ① 與 ③ 都是這個人天生就有的 germline variantgermline variant 生殖系變異在生殖系形成、通常存在於多數細胞的變異;可遺傳給子代,但不代表必然傳遞。A variant arising in the germline and therefore present in essentially every cell of the individual. It may be inherited or arise de novo, and may be passed to offspring.完整條目 →, 在腫瘤樣本裡長得一模一樣(各三條支持、VAF 都是 0.5)。它們的命運不同, 不是因為變異本身有什麼差別,而是因為資料庫知不知道它。
位置 ④ 兩種模式都留得住,那是我們要的 somatic variantsomatic variant 體細胞變異在非生殖系細胞譜系中、通常於受精後取得的變異;可只存在於部分細胞,通常不由親代遺傳給子代。癌症基因體學常分析此類變異。A variant acquired outside the germline, usually after conception. It may be restricted to a subset of cells and is generally not passed to offspring; it is a central focus of cancer genomics.完整條目 →。 caller 產生的是 候選變異candidate 候選變異caller 提出、但尚未被確認的變異位點。本實驗室多數工具位於 caller 之後,進行再校正,處理的就是這些 candidates。A proposed but unconfirmed variant. Most tools in this lab post-process the caller's candidate set.完整條目 →,還不是最終答案;本教材以 ClairSClairS配對 tumor–normal 的 somatic variant caller。tumor-only 版本叫 ClairS-TO。A somatic variant caller for matched tumour–normal data; ClairS-TO is the tumour-only version.完整條目 →、DeepSomaticDeepSomaticGoogle 的 somatic variant caller,同樣有 tumor-only 版本。Google's somatic variant caller, also available in a tumour-only mode.完整條目 → 作為 tumour-normaltumour-normal 配對腫瘤/正常同時定序病人的腫瘤與正常組織;正常樣本提供個體 germline 背景,有助於辨識 somatic 候選。Sequencing a patient's tumour alongside their normal tissue, which supplies the germline background.完整條目 →(TN)calling 的範例,tumour-onlytumour-only 僅腫瘤只有腫瘤樣本、沒有配對正常樣本。在成本或檢體受限時很常見,但少了 germline 對照,分析難度會大幅提高。Having only the tumour sample. Common for cost or specimen reasons, but much harder without a germline baseline.完整條目 →(TO)則以 ClairS-TO 為例, 實際輸入與過濾流程請依版本文件確認。
沒有正常組織時,改用什麼當對照
在部分臨床或研究情境,matched normal 可能因成本、檢體量或取得條件而缺失。 替代方案是公開的族群資料庫:利用 allele frequency 與已知變異紀錄提供 germline 線索。 本教材在 LongPhase-TO/ClairS-TO 情境中將這組集合稱為 PONPON 正常樣本面板/族群資料庫(依流程而異)PON 依分析流程有兩種用法,兩者不可互換:本教材的 tumor-only 流程以它指稱 population germline database set(如 1000G、CoLoRSdb、dbSNP、gnomAD 的聯集);GATK Mutect2 的 Panel of Normals(PoN)則由多個正常樣本建立,用來標記反覆出現的技術性 artifact。兩者都不能完全取代同一病人的 matched normal。The abbreviation is workflow-dependent and the two uses are not interchangeable. In this tutorial's tumour-only workflows, PON denotes a population germline database set; in GATK Mutect2, a Panel of Normals (PoN) is built from multiple normal samples to flag recurrent technical artifacts. Either can miss a private germline variant or an unseen artifact, so neither replaces a patient's matched normal.完整條目 →(population database set), 它包含 1000 Genomes、gnomAD、dbSNP、CoLoRSdb 等來源。
上圖下排的橫軸就是這件事的關鍵。資料庫有一個收錄門檻——
實際下載的檔名裡寫著 af-ge-0.001,意思是只收頻率 0.001 以上的位點。
位置 ① 的族群頻率 0.31,遠高於門檻,查得到;位置 ③ 只有 0.0002,落在門檻左邊,
資料庫裡根本沒有這一筆。「族群常見」與「這個人有」不是同一件事,缺口就從這裡來。
在 GATK Mutect2 語境,PoN 通常指由多個正常樣本建立的 recurrent-artifact panel。 名稱相同、內容不同 —— 而且更重要的是,這兩種資料各守住一個方向,中間會留下一格:
下方元件用同一組候選點數一次數量,看 precision 怎麼掉下來:
TN calling 也不是把兩個 VCF 相減
前面那張圖為了講清楚缺口,把 TN 流程畫得很乾淨:normal 有訊號就排除。 實務上不能這樣做,而且失準的地方在有配對正常樣本時就已經發生:
TINC:normal 裡的訊號強度說明三種不同的事
第一項值得單獨看一次,因為它最容易被寫成錯的規則。下圖三欄的腫瘤樣本完全相同 (24 條 read、6 條帶變異、VAF 都是 0.25),差別只在配對正常樣本裡有幾條:
VAF 可作為輔助訊息,但實際值取決於 purity、copy number、zygosity、multiplicity、 clonality 與 depth(完整關係式見 M8)。因此不能只用「有沒有訊號」或單一固定門檻判定。
沒有正常組織時,還剩下什麼證據
回到那張 PONPON 正常樣本面板/族群資料庫(依流程而異)PON 依分析流程有兩種用法,兩者不可互換:本教材的 tumor-only 流程以它指稱 population germline database set(如 1000G、CoLoRSdb、dbSNP、gnomAD 的聯集);GATK Mutect2 的 Panel of Normals(PoN)則由多個正常樣本建立,用來標記反覆出現的技術性 artifact。兩者都不能完全取代同一病人的 matched normal。The abbreviation is workflow-dependent and the two uses are not interchangeable. In this tutorial's tumour-only workflows, PON denotes a population germline database set; in GATK Mutect2, a Panel of Normals (PoN) is built from multiple normal samples to flag recurrent technical artifacts. Either can miss a private germline variant or an unseen artifact, so neither replaces a patient's matched normal.完整條目 → 涵蓋不到的左下角。要把住在同一格裡的三種東西分開, 必須換一個問法:不再問「這個位置別人有沒有」,而是問「支持它的那些 read,彼此的結構像不像一次真的突變」。
真的變異一定是從某一條既有的 haplotypehaplotype 單倍型同一條實體染色體拷貝上,具有一致相位的一組 alleles 或 variants。HP1 與 HP2 是任意的相對標籤。A set of variants that lie on the same physical chromosome copy and are inherited together.完整條目 → 上長出來的,所以支持它的 read 應該集中在一條 haplotype 上。如果同一個「變異」的支持 read 分散在兩條染色體上, 那等於同一個位置各獨立突變了一次 —— 機率極低,更像比對或定序造成的問題:
實作對照:LongPhase-S 與 LongPhase-TO
這個想法在兩個工具裡有不同的實作:LongPhase-S 做成 read-level 與 haplotype origin 兩個過濾器(四個過濾器與各自的門檻見 M12);LongPhase-TO 把它擴展成三個位點的 triplet graphtriplet graphLongPhase-TO 判斷候選變異真假時用的最小結構:候選位置加上左右各一個變異,共三個位置。把 read 上看到的 allele 組合畫成路徑後,真的 somatic 變異會形成一條「跟某一條 germline haplotype 只差候選這一格」的新路徑;定序錯誤則湊不出一致的路徑。因為左右兩側都要對得上,所以三個位置是最小單位。LongPhase-TO's minimal unit for judging a candidate: the candidate plus one flanking variant on each side. A true somatic allele forms a third path differing from one parental haplotype at the candidate alone; artifacts show no consistent path.完整條目 →,用路徑結構判斷(見 M13)。
一句話總結
tumor-only 的核心困難
配對正常樣本提供的是這個人的 germline 對照;population database set 提供的是族群層級的 germline 證據。兩者不能互換:族群裡罕見的私有 germline 與尚未觀察到的 artifact 會落在資料庫的涵蓋範圍之外,成為額外候選,其中部分是 false positive。 補救的方向不是再加資料庫,而是改用 read-level 的連結結構、copy number、LOH 與品質等 不依賴「別人有沒有」的證據 —— 但這些都是補充證據,系統性 artifact 或 phasing error 仍會造成例外。
真實證據
TN calling 指令示範
docker run \
-v ${INPUT_BAM_DIR}:${INPUT_BAM_DIR} \
-v ${OUTPUT_DIR}:${OUTPUT_DIR} \
-u $(id -u):$(id -g) \
hkubal/clairs:v0.4.1 \
/opt/bin/run_clairs \
--normal_bam_fn ${INPUT_BAM_DIR}/normal.bam \
--tumor_bam_fn ${INPUT_BAM_DIR}/tumor.bam \
--ref_fn ${INPUT_REF_DIR}/reference.fasta \
--threads 64 \
--platform ont_r10_dorado_sup_5khz_ssrs \
--output_dir ${OUTPUT_DIR}
TO 模式:準備 population database set
mkdir PoN
BASE=http://www.bio8.cs.hku.hk/clairs-to/databases
wget -P PoN $BASE/gnomad.r2.1.af-ge-0.001.sites.vcf.gz
wget -P PoN $BASE/dbsnp.b138.non-somatic.sites.vcf.gz
wget -P PoN $BASE/1000g-pon.sites.vcf.gz
wget -P PoN $BASE/CoLoRSdb.GRCh38.v1.1.0.deepvariant.glnexus.af-ge-0.001.vcf.gz
注意:有些文件把資料夾變數寫成 PATH="PoN" 再使用
$PATH;這會覆寫 shell 的可執行檔搜尋路徑。此處改用 BASE,
實際參數仍應依工具版本文件核對。
四個檔案名稱(gnomad、dbsnp、1000g、
CoLoRSdb)都指向族群 germline 資料庫,與本教材的
population database set 定義一致;它不同於 GATK Mutect2 所稱的 recurrent-artifact PoN。
其中兩個檔名帶著 af-ge-0.001 —— 那就是前面那張圖裡的收錄門檻,
低於這個頻率的位點不在檔案裡,所以查不到。

判讀練習
某個腫瘤樣本的一個位點有 50 條 read 覆蓋,其中 24 條支持 alt(VAF = 0.48),
且未被所使用的 population database set 涵蓋。
在 tumor-only 模式下,請列出需要檢查的證據與可能分類。
展開答案
VAF 約 0.5 且未被族群資料庫涵蓋時,可優先考慮 private germline, 但不能排除 somatic 或其他來源。
在簡化的 diploid、單拷貝模型下,somatic VAF 可近似為 purity/2; 較一般的模型還受 purity、multiplicity 與 total copy number 影響,並會受到 normal DNA、 clonality、mapping bias 與 depth 影響,因此不能單獨依 VAF 分類。
接著檢查這 24 條支持 read 的 haplotype 分布:如果幾乎全部落在同一條 haplotype 上,與「真的變異」相容(private germline 或 somatic 都會這樣);如果大致均分在兩條上, 更像 artifact —— 因為那等於同一個位置各自獨立突變了一次。此外還要看 copy number、LOH、品質與獨立證據。
要注意這個判準本身是理想化的:實務資料不會這麼乾淨, 系統性 artifact 或 phasing error 都會造成例外,所以它是提高或降低疑慮,不是定案。 前面提到的三位點路徑結構(triplet graphtriplet graphLongPhase-TO 判斷候選變異真假時用的最小結構:候選位置加上左右各一個變異,共三個位置。把 read 上看到的 allele 組合畫成路徑後,真的 somatic 變異會形成一條「跟某一條 germline haplotype 只差候選這一格」的新路徑;定序錯誤則湊不出一致的路徑。因為左右兩側都要對得上,所以三個位置是最小單位。LongPhase-TO's minimal unit for judging a candidate: the candidate plus one flanking variant on each side. A true somatic allele forms a third path differing from one parental haplotype at the candidate alone; artifacts show no consistent path.完整條目 →)就是為了讓這個判準更穩健: 左右鄰居都要對得上,才算得出「跟某一條既有 haplotype 只差候選這一格」的那條路徑。
實作練習
比較兩種 calling 設計的結果
此練習比較 paired 與 tumor-only 的輸出差異。若有配對資料,可在相同參考序列與 相近過濾設定下執行兩種模式,再比較結果:
# isec 要求 bgzip 壓縮+索引,少了索引會直接報錯
bcftools index -f paired.vcf.gz
bcftools index -f tumoronly.vcf.gz
# 配對模式找到、而僅腫瘤模式未找到的候選(數量依資料與設定而異)
bcftools isec -C paired.vcf.gz tumoronly.vcf.gz | wc -l
# 僅腫瘤模式多出的候選(可能包含 private germline、artifact 或 paired caller 漏報)
bcftools isec -C tumoronly.vcf.gz paired.vcf.gz | wc -l
若檔案還是未壓縮的 .vcf,先 bcftools view -Oz -o out.vcf.gz in.vcf
轉成 bgzip 格式再建索引;一般的 gzip 壓出來的檔案 bcftools index 不接受。
檢查多出來的候選是什麼
上面第二條指令的輸出,就是本模組那張圖裡的位置 ③。逐項檢查它們:
下面第 2 步先講一件事再看指令:HP 標籤的型別依工具而異。
longphase-s haplotag 寫的是整數 HP:i:,
somatic_haplotag 與整個 longphase-to 寫的是字串 HP:Z:。
只 grep 其中一種,另一種資料會安靜地數出 0,所以下面用 HP:[iZ]: 同時涵蓋兩者。
# 1) 在配對正常樣本裡數這個位置的 ref/alt read —— 接近一半提示 private germline
# 第 5 欄是每條 read 在該位置讀到的字母,可以直接數(. 與 , 代表與參考相同)
samtools mpileup -f reference.fasta -r chr1:1000000-1000000 normal.bam
# 想要精確數字而不是用眼睛數,讓 bcftools 把 AD 欄挖出來
bcftools mpileup -f reference.fasta -r chr1:1000000-1000000 -a AD normal.bam \
| bcftools query -f '%POS\t%REF\t%ALT\t[%AD]\n'
# 2) 支持 read 落在哪一條 haplotype 上
# haplotag 過的 BAM 裡直接數 HP 標籤;兩邊都有支持就要提高疑慮
samtools view tumor.haplotagged.bam chr1:1000000-1000000 \
| grep -oE 'HP:[iZ]:[12]' | sort | uniq -c
第 1 步的兩道指令是同一件事的兩種讀法:samtools mpileup 給的是可以用眼睛看的
pileup 字串,bcftools mpileup 給的是 VCF —— 後者預設不帶 allele depth,
所以要加 -a AD 才數得出來。
兩項要合起來看。VAF 接近 0.5 可提示 private germline, 但仍需排除污染、比對偏差與其他模型不確定性;haplotype 分布可提示 artifact, 但真的兩次獨立突變或 phasing error 都會造成例外。沒有單一證據可以定案。
學習檢核
原始文獻與程式碼
- ClairS(tumour-normal):ClairS: a deep-learning method for long-read somatic small
variant calling,bioRxiv,2023。程式碼在
github.com/HKU-BAL/ClairS。 - ClairS-TO(tumour-only):ClairS-TO: a deep-learning method for long-read tumor-only
somatic small variant calling,Nature Communications,2025。程式碼在
github.com/HKU-BAL/ClairS-TO。 - DeepSomatic:Accurate somatic small variant discovery for multiple sequencing
technologies with DeepSomatic,Nature Biotechnology,2025。程式碼在
github.com/google/deepsomatic。
本模組術語
- ClairS
- 配對 tumor–normal 的 somatic variant caller。tumor-only 版本叫 ClairS-TO。
- DeepSomatic
- Google 的 somatic variant caller,同樣有 tumor-only 版本。
- PON(正常樣本面板/族群資料庫(依流程而異))
- PON 依分析流程有兩種用法,兩者不可互換:本教材的 tumor-only 流程以它指稱 population germline database set(如 1000G、CoLoRSdb、dbSNP、gnomAD 的聯集);GATK Mutect2 的 Panel of Normals(PoN)則由多個正常樣本建立,用來標記反覆出現的技術性 artifact。兩者都不能完全取代同一病人的 matched normal。
- TINC(腫瘤污染正常樣本)
- Tumour-in-normal contamination:配對正常樣本含有腫瘤來源訊號,使 genuine somatic 變異也可能在 normal 中被觀察到,因而可能被錯誤過濾。
- candidate(候選變異)
- caller 提出、但尚未被確認的變異位點。本實驗室多數工具位於 caller 之後,進行再校正,處理的就是這些 candidates。
- copy number(拷貝數)
- 某段基因體在細胞內的拷貝數。多數正常常染色體區段為 2,可再分為 major 與 minor allele copy number。
- germline variant(生殖系變異)
- 在生殖系形成、通常存在於多數細胞的變異;可遺傳給子代,但不代表必然傳遞。
- haplotype(單倍型)
- 同一條實體染色體拷貝上,具有一致相位的一組 alleles 或 variants。HP1 與 HP2 是任意的相對標籤。
- somatic variant(體細胞變異)
- 在非生殖系細胞譜系中、通常於受精後取得的變異;可只存在於部分細胞,通常不由親代遺傳給子代。癌症基因體學常分析此類變異。
- triplet graph
- LongPhase-TO 判斷候選變異真假時用的最小結構:候選位置加上左右各一個變異,共三個位置。把 read 上看到的 allele 組合畫成路徑後,真的 somatic 變異會形成一條「跟某一條 germline haplotype 只差候選這一格」的新路徑;定序錯誤則湊不出一致的路徑。因為左右兩側都要對得上,所以三個位置是最小單位。
- tumour-normal(配對腫瘤/正常)
- 同時定序病人的腫瘤與正常組織;正常樣本提供個體 germline 背景,有助於辨識 somatic 候選。
- tumour-only(僅腫瘤)
- 只有腫瘤樣本、沒有配對正常樣本。在成本或檢體受限時很常見,但少了 germline 對照,分析難度會大幅提高。