这篇文章主要为大家展示了“VennDiagram各区域信息提取的示例分析”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“VennDiagram各区域信息提取的示例分析”这篇文章吧。
VennDiagram是进行Venn图绘制的 R包,最多能够绘制五组数据,其中一个主要的绘图函数为venn.diagram()
针对该参数相关的参数调整,可以直接对Venn图的颜色字体等多主题进行修改。而其绘图数据,也就是venn.diagram() 对应的数据是一个list向量,
数据的读取和整理可以参考:
R语言绘制维恩图空值NA处理:https://www.亿速云.com/article/259 数据读取方式,
1、譬如经相似读取数据和处理之后,获取一个向量xList,数据基本情况如下:
summary(xList) Length Class Mode AT_4000 4000 -none- character AT_3892 3892 -none- character AT_3593 3593 -none- character AT_3000 3000 -none- character AT_2987 2987 -none- character
一共五组数据,各组数据如上所示,venn.diagram()绘图:
venn.plot =venn.diagram(xList,filename = NULL) grid.newpage() grid.draw(venn.plot)
之后基于相关代码调整即可。
2 如何获取各区域信息是绘制Venn图的一个关键问题
可以基于VennDiagram提供的计算函数 calculate.overlap 或者get.venn.partitions
以前者为例:
area=calculate.overlap(xList) > typeof(area) [1] "list" > summary(area) Length Class Mode a31 220 -none- character a30 286 -none- character a29 285 -none- character a28 175 -none- character a27 178 -none- character a26 149 -none- character a25 136 -none- character a24 206 -none- character a23 232 -none- character a22 356 -none- character a21 217 -none- character a20 284 -none- character a19 255 -none- character a18 147 -none- character a17 204 -none- character a16 131 -none- character a15 123 -none- character a14 213 -none- character a13 187 -none- character a12 300 -none- character a11 278 -none- character a10 216 -none- character a9 392 -none- character a8 209 -none- character a7 204 -none- character a6 153 -none- character a5 165 -none- character a4 153 -none- character a3 211 -none- character a2 224 -none- character a1 273 -none- character
如上结果显示 五组一共获得31各区域的数据,可以利用返回的list提取每一个区域的结果,譬如取出a1区域(共273)的前10个:
> area$a1[1:10] [1] "AT3G27960" "AT4G12170" "AT1G58270" "AT3G55290" "AT1G27360" "AT2G02790" "AT1G42990" "AT3G25011" [9] "AT2G24617" "AT5G55910"
以上是“VennDiagram各区域信息提取的示例分析”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。