参考
ggmsa: a visual exploration tool for multiple sequence alignment and associated data
https://github.com/YuLab-SMU/ggmsa
http://yulab-smu.top/ggmsa/ (需梯子)
公众号 | YuLabSMU | 文章发表:ggmsa - 多序列比对和相关数据的可视化探索工具
公众号 | YuLabSMU | 从彩虹图到序列之眼
主要用途就是多序列比对可视化,还不太了解展示RNA二级结构的序列之眼,以及其依赖文件,没做过相应分析。
geom_seqlogo()和geom_msaBar()一起使用时,多序列比对中的文字会受到挤压?
# 下载 R 包if (!requireNamespace("devtools", quietly=TRUE))install.packages("devtools")devtools::install_github("YuLab-SMU/ggmsa")# 加载 R 包library(ggmsa)# 导入实例数据,多序列比对 fa 文件protein_sequences <- system.file("extdata", "sample.fasta", package = "ggmsa")protein_sequences#> [1] "D:/2_software/5_R/R-4.1.1/library/ggmsa/extdata/sample.fasta"pdf("a.pdf")ggmsa(protein_sequences, start = 221, end = 280, char_width = 0.5, seq_name = TRUE) +geom_seqlogo() +geom_msaBar()dev.off()
1. Annotation | 注释
具体:http://yulab-smu.top/ggmsa/articles/guides/Annotations.html
其实不止以下几种,所有函数请看:http://yulab-smu.top/ggmsa/reference/index.html,比如 DNA序列重组可视化方法 中用到的
seqdiff()。
geom_seqlogo(): 多序列比对可视化geom_GC(): 用气泡图显示 GC 含量geom_seed(): 突出 miRNA 序列上的 seed 区geom_msaBar(): 用条形图显示序列保守性geom_helix(): 用圆弧图表示RNA二级结构(需要额外数据),但我不了解这方面。
2. Color Schemes and Font Families | 配色和字体
具体:http://yulab-smu.top/ggmsa/articles/guides/Color_schemes_And_Font_Families.html
color = "Chemistry_AA": 配色,默认根据侧链化学成分font = "TimesNewRoman": 字体
available_colors()#> 1.color schemes for nucleotide sequences currently available:#> Chemistry_NT Shapely_NT Taylor_NT Zappo_NT#>#> 2.color schemes for AA sequences currently available:#> ClustalChemistry_AA Shapely_AA Zappo_AA Taylor_AA LETTER CN6 Hydrophobicity#>available_fonts()#> font families currently available:#> helvetical mono TimesNewRoman DroidSansMono#>
3. Theme | 主题
具体:http://yulab-smu.top/ggmsa/articles/guides/MSA_theme.html
char_width: 字符宽度,默认 0.9none_bg = TRUE: 仅显示字符,去除有色背景seq_name = TRUE: 显示序列名称show.legend = TRUE: 显示多序列比对图的图例border = NA: 去除描边;border = "white": 白色描边poHighlighted = c(185, 190): 特定位置高亮
4. Other Modules | 其他模块
具体:http://yulab-smu.top/ggmsa/articles/guides/Other_Modules.html
seqlogo(): 相当于只显示geom_seqlogo()的上半部分ggSeqBundle(): 序列束gghelix(): 相当于只显示geom_helix()的上半部分
5. View Modes | 视图模式
具体:http://yulab-smu.top/ggmsa/articles/guides/View_modes.html
consensus_views = TRUE: 根据序列一致性disagreement = TRUE,use_dot = TRUE: 将一致性位点用·代替,注意搭配两个逻辑值。ignore_gaps = TRUEref: 字符串,指定参考序列by_conservation = TRUE: 根据序列保守性 配色,越保守颜色越深。
