您好,登錄后才能下訂單哦!
這篇文章主要為大家展示了“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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。