MotifStack:多motif序列比较和可视化
  YqjIGb6XwPoE 2023年11月02日 40 0


最近大量跑chip-seq,看到一篇2016Cell的文章《Cistrome and Epicistrome Features Shape the Regulatory DNA Landscape》感觉图3好惊艳。

MotifStack:多motif序列比较和可视化_大数据

找了下材料和方法,发现是一个叫MotifStack(http://www.bioconductor.org/packages/release/bioc/html/motifStack.html)的包画的。

什么是motif?

Motif是在生物学中是一个基于数据的数学统计模型,典型的是一段sequence也可以是一个结构。如转录因子倾向于结合某些特定的序列。把这个R包和数据下载下来自己画一下,它motif的测试数据是pcm格式的文本。MotifStack 还有一些motif格式转换的函数。(Cell重磅综述:关于人类转录因子,你想知道的都在这)

MotifStack:多motif序列比较和可视化_python_02

motif的格式是什么?

Chip-seq鉴定出的motif,是一个ATCG的序列矩阵。对于这个字母矩阵,目前主流Motif的序列格式主要有JASPAR\MEME\RAW PFM。此外JASPAR数据库 (http://jaspar.genereg.net/) 提供了转录因子与DNA结合位点motif最全面的公开数据,共收集了脊椎动物、植物、昆虫、线虫、真菌和尾索动物六大类不同类生物的数据 (AnimalTFDB 动物转录因子注释和预测的综合资源库)。

1 Single motif log



pcm <- read.table("/Users/zt/learn/软件包/motifStack/test_data/bin_SOLEXA.pcm",header = F)
# 创造Motif对象
pcm <- pcm[,3:ncol(pcm)]
rownames(pcm) <- c("A","C","G","T")
motif <- new("pcm", mat=as.matrix(pcm), name="bin_SOLEXA")
opar<-par(mfrow=c(4,1))
plot(motif)
#plot the logo with same height
plot(motif, ic.scale=FALSE, ylab="probability")
#try a different font
plot(motif, font="mono,Courier")
#try a different font and a different color group
motif@color <- colorset(colorScheme='basepairing')
plot(motif,font="Times")
# 创造Motif对象

MotifStack:多motif序列比较和可视化_python_03

2 Affinity motif log

需要画出双链。



motif<-matrix(
c(
.846, .631, .593, .000, .000, .000, .434, .410, 1.00, .655, .284, .000, .000, .771, .640, .961,
.625, .679, .773, 1.00, 1.00, .000, .573, .238, .397, 1.00, 1.00, .000, .298, 1.00, 1.00, .996,
1.00, 1.00, 1.00, .228, .000, 1.00, 1.00, .597, .622, .630, .000, 1.00, 1.00, .871, .617, 1.00,
.701, .513, .658, .000, .000, .247, .542, 1.00, .718, .686, .000, .000, .000, .595, .437, .970
), nrow=4, byrow = TRUE)
rownames(motif) <- c("A", "C", "G", "T")
motif<-new("psam", mat=motif, name="affinity logo")
plot(motif)
c(

MotifStack:多motif序列比较和可视化_java_04

3 Stacked motif

当要画多个motif以堆积起来,对不同的motif进行距离计算构建进化树。导入的数据文件是单个motif一个pcm文件,通过file.path命令读取整个目录



motifs<-importMatrix(dir(file.path("/Users/zt/learn/软件包/motifStack/test_data"),"pcm$", full.names = TRUE))
motifStack(motifs, layout="stack", ncex=1.0)
# 建立进化树
motifStack(motifs, layout="tree")
4  Circle Motif

MotifStack:多motif序列比较和可视化_java_05

4 Circle motif

设置layout的格式,可以设置成环形,有点像circles



motifStack(motifs, layout="radialPhylog",
circle=0.5, cleaves = 0.3,
clabel.leaves = 0.3,
col.bg=rep(color, each=5), col.bg.alpha=0.3,
col.leaves=rep(color, each=5),
col.inner.label.circle=rep(color, each=5),
inner.label.circle.width=0.05,
col.outer.label.circle=rep(color, each=5),
outer.label.circle.width=0.1,
circle.motif=1.2,
angle=350)
circle=0.5, cleaves = 0.3,

MotifStack:多motif序列比较和可视化_python_06



【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
YqjIGb6XwPoE