华东师范大学学报(自然科学版) ›› 2019, Vol. 2019 ›› Issue (1): 124-135,143.doi: 10.3969/j.issn.1000-5641.2019.01.014

• 生命科学 • 上一篇    下一篇

R语言在生物科学研究绘图中的应用

蓝洋, 何秀, 朱诚勖, 张玉娟   

  1. 重庆师范大学 生命科学学院, 重庆 401331
  • 收稿日期:2017-12-06 出版日期:2019-01-25 发布日期:2019-01-24
  • 通讯作者: 张玉娟,女,教授,硕士生导师,研究方向为生物信息、化学计量组学、比较基因组学.E-mail:zhangyj@cqnu.edu.cn E-mail:zhangyj@cqnu.edu.cn
  • 作者简介:蓝洋,女,硕士研究生,研究方向为生物信息.E-mail:908805060@qq.com.
  • 基金资助:
    国家自然科学基金(31871274);重庆市教育委员会科学技术研究项目(KJ1600304);重庆市科委基础研究与前沿探索项目(cstc2018jcyjA2487)

Application of R language graphics in biological research

LAN Yang, HE Xiu, ZHU Cheng-xu, ZHANG Yu-juan   

  1. College of Life Sciences, Chongqing Normal University, Chongqing 401331, China
  • Received:2017-12-06 Online:2019-01-25 Published:2019-01-24

摘要: R语言具有强大的数据分析处理和可视化绘图功能,可以在Window、Linux以及Mac系统上使用,并且根据其编写新代码或调整已有代码可轻松实现科研中数据呈现与图形绘制的要求.然而其代码学习较为艰难、R-package使用复杂,所以未受到科研新手的青睐.基于生物科学相关领域的背景,整理汇集已出版的文献、公共数据库以及国家统计局中提供的数据,使用R语言、R编辑器RStudio并载入相关的R-package绘制出地图、热图、关联网络图、韦恩图和柱形图等高质量的图片,并提供相应的脚本与说明,以方便生物科研人员直接更改使用.本研究对生物科研中合理、直观地表述研究结果提供了良好的范例,并进行了详细讨论,且与其他绘图软件作了比较,以期R语言能够成为生物科学领域科研工作者入门学习、研究应用中绘制图片的首选工具.

关键词: 地图, 热图, 关联网络图, 韦恩图, 柱形图, R语言

Abstract: The R programming language offers powerful statistical analysis, data processing, and visualization capabilities, which can run on Windows, Linux, and Mac operating systems; the software allows users to show scientific research data through graphics by writing new code or adjusting existing code. However, it is difficult to learn R's programming code and use R packages, so R is not commonly favored by novices in the scientific research community. Based on the context of bioscience fields and data from published papers, public databases, and the National Bureau of Statistics, this study demonstrates how to plot high quality maps, heat maps, functional networks, Venn diagrams, and column charts using R, R Studio, and R-packages. To facilitate the use of R, we offer detailed scripts for biological researchers. After comparing R with other graphing software, this study provides good examples and discussions of how to reasonably and intuitively present results in biological research. We hope R will become the preferred plotting tool for elementary biological researchers in their learning and research activities.

Key words: map, heat map, functional network, Venn diagram, column chart, R language

中图分类号: