Seq Logo

作者: LET149 | 来源:发表于2023-05-30 13:55 被阅读0次

https://blog.csdn.net/qazplm12_3/article/details/103318532
https://www.plob.org/article/12630.html

所属包:ggseqlogo

ggplot() + geom_logo(data=, namespace=, method=, stack_width=) + theme_logo()

    1. namespace= : 字符串,字母的范围,可以随意更改要展示的字母,但是这个参数要包括要展示的字母
    1. method= : y轴的单位,包括bitsprobability两种,默认为bits
    1. stack_width= : 字母的宽度,介于01之间的数,默认是0.95

1. 基础绘图

> kk <- matrix(1:30, nrow = 5)
> rownames(kk) <- LETTERS[1:5]
> colnames(kk) <- 1:6

> kk
  1  2  3  4  5  6
A 1  6 11 16 21 26
B 2  7 12 17 22 27
C 3  8 13 18 23 28
D 4  9 14 19 24 29
E 5 10 15 20 25 30

> ggplot()+geom_logo(kk, namespace=LETTERS, method="bits", stack_width=0.75)+theme_logo()  #示例一
示例一

2. 改变配色

> color_list <- make_col_scheme(rownames(kk), cols=c("red","blue","green","pink","orange"))  '#构建新配色

> ggplot()+geom_logo(data=kk, namespace=LETTERS, method="bits", stack_width=0.75, col_scheme=color_list)+theme_logo()  #在绘图中使用新配色,示例二
示例二

相关文章

网友评论

      本文标题:Seq Logo

      本文链接:https://www.haomeiwen.com/subject/ymfsgltx.html