介紹
背景介紹
細(xì)胞的基因組不斷受到內(nèi)源性和環(huán)境性dna損傷的威脅食呻,例如紫外線和自發(fā)反應(yīng)亲轨。為了維護(hù)它們的基因組完整性醇坝,細(xì)胞利用各種機(jī)制修復(fù)受損的dna扰柠。無(wú)論是在復(fù)制之前不正確地修復(fù)還是未修復(fù),這些都會(huì)導(dǎo)致突變被整合到基因組中藐吮。每一個(gè)突變過(guò)程都會(huì)留下一個(gè)不同的基因組標(biāo)記溺拱。例如,紫外光優(yōu)先誘導(dǎo)cc>tt谣辞。二核苷酸替換迫摔,而5-甲基胞嘧啶的自發(fā)脫氨導(dǎo)致cpg位點(diǎn)的c>t取代,因此潦闲,突變模式可以用來(lái)推斷哪些變異攒菠。
在過(guò)去的幾年里,對(duì)不同人類癌癥類型的腫瘤基因組數(shù)據(jù)的大規(guī)模分析揭示了30種突變模式歉闰,這些所謂的“突變信號(hào)”的特征是堿基替代類型的特定貢獻(xiàn)。在一定的序列背景下卓起,每個(gè)突變特征被認(rèn)為反映了單一的突變機(jī)制和敬。然而,大多數(shù)突變特征的病因目前尚不清楚戏阅。為了在功能上將突變特征與生物過(guò)程聯(lián)系起來(lái)昼弟,評(píng)估這些突變特征在暴露于特定誘變劑或細(xì)胞的細(xì)胞中的貢獻(xiàn),Mutational Pattern的R包提供了一套易于使用的工具集奕筐,用于在腫瘤樣本或DNA修復(fù)缺陷細(xì)胞的堿基替換目錄中描述和可視化突變模式舱痘。軟件包涵蓋廣泛的模式变骡,包括:突變特征、轉(zhuǎn)錄鏈偏倚芭逝、基因組分布和與基因組特征的關(guān)聯(lián)塌碌,這對(duì)于研究突變過(guò)程的活動(dòng)具有共同的意義。重新提取突變特征旬盯,并推斷先前識(shí)別的突變特征的貢獻(xiàn)台妆。
方法介紹
該軟件包包涵:
(1)新突變特征的提取
(2)對(duì)用戶指定的突變特征的貢獻(xiàn)進(jìn)行了量化
雖然第一種方法可以用于識(shí)別新的突變特征,但這只是有意義的胖翰。對(duì)于具有大量突變譜樣本的數(shù)據(jù)集接剩,由于它依賴于非負(fù)矩陣分解的降維方法。第二種方法可以用來(lái)研究單個(gè)樣本中的突變過(guò)程萨咳,并通過(guò)評(píng)估它們?cè)诓煌到y(tǒng)或不同條件下的貢獻(xiàn)來(lái)進(jìn)一步表征先前識(shí)別的突變特征懊缺。用于探討其他類型的模式,如轉(zhuǎn)錄鏈不對(duì)稱培他、基因組分布以及與染色質(zhì)組織等(可公開(kāi)獲得的)注釋的關(guān)聯(lián)鹃两。這些特征對(duì)于識(shí)別活躍的突變誘導(dǎo)過(guò)程和參與特定的DNA修復(fù)途徑。例如靶壮,基因區(qū)域存在轉(zhuǎn)錄鏈偏差怔毛,這可能意味著活性。
任何一組基本替換調(diào)用都可以從VCF文件中導(dǎo)入腾降,基因組構(gòu)建一個(gè)突變矩陣拣度,計(jì)數(shù)所有96個(gè)可能的三核苷酸變化。此外螃壤,還包括轉(zhuǎn)錄鏈等其他特征抗果,形成192個(gè)特征計(jì)數(shù)矩陣(96個(gè)三核苷酸*2個(gè)鏈)。為此奸晴,可以從ucsc中檢索到的基因定義用于確定基因中的堿基替換是位于轉(zhuǎn)錄的鏈上還是位于未轉(zhuǎn)錄的鏈上冤馏。
下載安裝
下載地址: https://github.com/CuppenResearch/MutationalPatterns
數(shù)據(jù)
要執(zhí)行突變模式分析,需要加載一個(gè)或多個(gè)vcf文件寄啼,其中包含單核苷酸變異調(diào)用和相應(yīng)的參考基因組逮光。
列出參考基因組
library(BSgenome)
head(available.genomes())
[1] "BSgenome.Alyrata.JGI.v1" "BSgenome.Amellifera.BeeBase.assembly4"
[3] "BSgenome.Amellifera.UCSC.apiMel2" "BSgenome.Amellifera.UCSC.apiMel2.masked"
[5] "BSgenome.Athaliana.TAIR.04232008" "BSgenome.Athaliana.TAIR.TAIR9"
#Download and load your reference genome of interest
ref_genome <- "BSgenome.Hsapiens.UCSC.hg19"
library(ref_genome, character.only = TRUE)
加載樣本數(shù)據(jù)
library(MutationalPatterns)
vcf_files <- list.files(path="./data",pattern = ".samtools.snp.reformated.vcf", full.names = TRUE)
sample_names <- c( "YDY019_OA","YDY019_PC","YDY022_OA","YDY022_PC","YDY069_OA","YDY069_PC","YDY106_OA", "YDY106_PC","YDY124_OA","YDY124_PC","YDY125_OA","YDY125_PC")
vcfs <- read_vcfs_as_granges(vcf_files, sample_names, ref_genome)
#定義樣本上的相關(guān)元數(shù)據(jù)
tissue <- c("YDY019_OA","YDY019_PC","YDY022_OA","YDY022_PC","YDY069_OA","YDY069_PC","YDY106_OA", "YDY106_PC","YDY124_OA","YDY124_PC","YDY125_OA","YDY125_PC")
畫圖
突變譜顯示了堿基替換目錄中每個(gè)突變類型的相對(duì)貢獻(xiàn)。圖的譜函數(shù)繪制了6個(gè)堿基替換類型中的每一個(gè)在所有樣品上的平均相對(duì)貢獻(xiàn)墩划。誤差條表示所有樣品的標(biāo)準(zhǔn)偏差涕刚。指示突變的總數(shù)
type_occurrences <- mut_type_occurrences(vcfs, ref_genome)
p1 <- plot_spectrum(type_occurrences)
p2 <- plot_spectrum(type_occurrences, CT = TRUE)
p3 <- plot_spectrum(type_occurrences, CT = TRUE, legend = FALSE)
library("gridExtra")
grid.arrange(p1, p2, p3, ncol=3, widths=c(3,3,1.75))
劃分每個(gè)樣本組,例如分別繪制每個(gè)組織的光譜
p4 <- plot _ spectrum(type _ occurrences, by = tissue, CT = TRUE, legend = TRUE)
#自定義顏色
palette <- c("pink", "orange", "blue", "lightblue", "green", "red", "purple")
p5 <- plot _ spectrum(type _ occurrences, CT=TRUE, legend=TRUE, colors=palette)
grid.arrange(p4, p5, ncol=2, widths=c(4,2.3))
Mutational signatures
Mutational signatures突變特征被認(rèn)為代表了突變過(guò)程乙帮,其特征是96種堿基替換類型對(duì)某一序列的特定貢獻(xiàn)杜漠。突變特征可以從你的突變計(jì)數(shù)矩陣中提取出來(lái),并使用非負(fù)矩陣因式分解(Nmf)。nmf中的一個(gè)關(guān)鍵參數(shù)是因式分解秩驾茴,即突變特征的數(shù)量盼樟。使用nmf包確定最優(yōu)的因式分解等級(jí)。
mut_mat <- mut_mat + 0.0001
estimate <- nmf(mut_mat, rank=2:5, method="brunet", nrun=10, seed=123456)
plot(estimate)
使用extract _ signatures從具有ExtractSignals的突變計(jì)數(shù)矩陣中提取2個(gè)突變特征
#rank值指定特征數(shù)量
#對(duì)于較大的數(shù)據(jù)集锈至,通過(guò)更改nrun參數(shù)以實(shí)現(xiàn)穩(wěn)定性和避免局部極小值來(lái)執(zhí)行更多的迭代是明智的
nmf_res <- extract_signatures(mut_mat, rank = 2, nrun = 10)
colnames(nmf_res$signatures) <- c("Signature A", "Signature B")
rownames(nmf_res$contribution) <- c("Signature A", "Signature B")
plot_96_profile(nmf_res$signatures, condensed = TRUE)
pc1 <- plot_contribution(nmf_res$contribution, nmf_res$signature,mode = "relative")
pc2 <- plot_contribution(nmf_res$contribution, nmf_res$signature,mode = "absolute")
grid.arrange(pc1, pc2)
#X和Y軸翻轉(zhuǎn)
plot_contribution(nmf_res$contribution, nmf_res$signature,mode = "absolute", coord_flip = TRUE)
每個(gè)樣本的每一個(gè)特征的相對(duì)貢獻(xiàn)也可以被繪制為一個(gè)熱圖晨缴,它可能比堆疊的樹(shù)刺圖更容易解釋和比較。這些樣本可以根據(jù)它們的歐幾里得dis-tance進(jìn)行分層聚類裹赴。這些特征可以按照用戶指定的順序繪制喜庞。
#將特征貢獻(xiàn)繪制為具有樣本聚類樹(shù)狀圖和指定特征順序的熱圖
pch1 <-plot_contribution_heatmap(nmf_res$contribution,sig_order = c("Signature B", "Signature A"))
pch2 <- plot_contribution_heatmap(nmf_res$contribution, cluster_samples=FALSE)
grid.arrange(pch1, pch2, ncol = 2, widths = c(2,1.6))
將重構(gòu)的突變剖面與原始突變剖面進(jìn)行比較
plot_compare_profiles(mut_mat[,1],nmf_res$reconstructed[,1],profile_names = c("Original", "Reconstructed"),condensed = TRUE)
根據(jù)COSMIC特征與平均鏈接的相似性對(duì)COSMIC特征進(jìn)行分級(jí)聚類
sp_url <- paste("http://cancer.sanger.ac.uk/cancergenome/assets/","signatures_probabilities.txt", sep = "")
cancer_signatures = read.table(sp_url, sep = "\t", header = TRUE)
#將突變類型的順序與變異模式標(biāo)準(zhǔn)相匹配
new_order = match(row.names(mut_mat), cancer_signatures$Somatic.Mutation.Type)
# Reorder cancer signatures dataframe
cancer_signatures = cancer_signatures[as.vector(new_order),]
# Add trinucletiode changes names as row.names
row.names(cancer_signatures) = cancer_signatures$Somatic.Mutation.Type
# Keep only 96 contributions of the signatures in matrix
cancer_signatures = as.matrix(cancer_signatures[,4:33])
hclust_cosmic = cluster_signatures(cancer_signatures, method = "average")
# store signatures in new order
cosmic_order = colnames(cancer_signatures)[hclust_cosmic$order]
plot(hclust_cosmic)
計(jì)算突變剖面與 COSMIC特征之間的成對(duì)余弦相似性
cos_sim_samples_signatures = cos_sim_matrix(mut_mat, cancer_signatures)
# Plot heatmap with specified signature order
plot_cosine_heatmap(cos_sim_samples_signatures,col_order = cosmic_order,cluster_rows = TRUE)
除了重新提取特征外,還可以量化任何一組特征對(duì)樣本突變輪廓的貢獻(xiàn)棋返。這種獨(dú)特的特性特別適用于小群體或單個(gè)樣本的突變特征分析延都,但也可以將自己的發(fā)現(xiàn)與已知的簽名和已發(fā)表的發(fā)現(xiàn)聯(lián)系起來(lái)。FIT_to_Signals函數(shù)可以找到突變簽名的最佳線性組合睛竣,這是大多數(shù)突變簽名的最佳線性組合晰房。通過(guò)求解一個(gè)非負(fù)最小二乘約束問(wèn)題來(lái)構(gòu)造變異矩陣。
fit_res <-fit_to_signatures(mut_mat, cancer_signatures)
# Select signatures with some contribution
select <- which(rowSums(fit_res$contribution) > 10)
# Plot contribution barplot
plot_contribution(fit_res$contribution[select,],cancer_signatures[,select],coord_flip = FALSE,mode = "absolute")
用樣本聚類繪制樣本中癌癥特征的相對(duì)貢獻(xiàn)圖
plot_contribution_heatmap(fit_res$contribution,cluster_samples = TRUE,method = "complete")
參考
http://bioconductor.org/packages/release/bioc/vignettes/MutationalPatterns/inst/doc/Introduction_to_MutationalPatterns.pdf
https://www.biorxiv.org/content/biorxiv/early/2016/08/30/071761.full.pdf
轉(zhuǎn)載請(qǐng)注明出處
簡(jiǎn)書(shū)作者:ODDXIX
微信公眾號(hào):oddxix