突变signature上下游碱基bar图绘制

介绍

显示某个样本突变信号情况

代码讲解

加载包,读入数据
library(MutationalPatterns)
nhdp <- readRDS('mousesignatures_norm.rds'

 

它的输入数据’nhdp’部分如下,每一行是对应的上下游剪辑,每一列是信号类型

> str(nhdp)
 num [1:96, 1:11] 0.01985 0.01188 0.00248 0.01138 0.01724 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:96] "1" "2" "3" "4" ...
  ..$ : chr [1:11] "SBS5" "SBS40" "SBS19" "SBS_N1" ..
.

作者原来是用在Python里面使用SigprofilerPlotting 进行绘图,后来使用R包MutationalPatterns的plot_96_profile函数

#I used SigprofilerPlotting in python, however here I obtain the same results using MutationalPatterns
#for Figure 5b 
#I want to show mSBS19 and some liver samples where I found with SBS19 

signb=cbind(nhdp[,3],humandata[,c('Liver-HCC::SP97771','Liver-HCC::SP112141')])
colnames(signb)=c('mSB19','Liver-HCC:SP97771','Liver-HCC:SP112141')

fig5b<-plot_96_profile(signb,ymax=0.09)

ggsave(plot=fig5b, file='figure-5b.pdf', device=cairo_pdf, width=7, height=5)
main_layer <- theme_grey()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1,size=7,color=1))

 

 


mSBS19 and two spectra of human hepatocellular carcinomas where SBS19 was identified are shown.

结果解读

显示人类癌症样本中识别的SBS19信号

参考文献

Riva, L., Pandiri, A. R., Li, Y. R., Droop, A., Hewinson, J., Quail, M. A., … Adams, D. J. (2020). The mutational signature profile of known and suspected human carcinogens in mice. Nature Genetics. doi:10.1038/s41588-020-0692-4

原始文章

http://www.thecodesearch.com/2020/11/12/%e7%aa%81%e5%8f%98signature%e4%b8%8a%e4%b8%8b%e6%b8%b8%e7%a2%b1%e5%9f%babar%e5%9b%be%e7%bb%98%e5%88%b6/

posted @ 2020-11-13 00:26  ywliao  阅读(579)  评论(0)    收藏  举报