{"id":16536,"date":"2023-10-25T21:49:06","date_gmt":"2023-10-25T13:49:06","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=16536"},"modified":"2023-10-25T21:49:08","modified_gmt":"2023-10-25T13:49:08","slug":"%e9%a5%bc%e5%9b%be%e3%80%81%e8%8a%b1%e7%93%a3%e5%9b%be%e3%80%81upset%e5%9b%be%e6%b3%9b%e5%9f%ba%e5%9b%a0%e7%bb%84%e5%8f%af%e8%a7%86%e5%8c%96%e6%96%b9%e6%b3%95%e8%bf%99%e4%b9%88","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=16536","title":{"rendered":"\u997c\u56fe\u3001\u82b1\u74e3\u56fe\u3001upset\u56fe\u2026\u2026\u6cdb\u57fa\u56e0\u7ec4\u53ef\u89c6\u5316\u65b9\u6cd5\u8fd9\u4e48\u591a\uff01"},"content":{"rendered":"<h1><a id=\"post-16536-OLE_LINK4\"><\/a><a href=\"http:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/orthofinder_result.zip\">orthofinder_result<\/a>\uff08\u4ee3\u7801\u793a\u4f8b\u6587\u4ef6\u4e0b\u8f7d\uff09<\/h1>\n<p>\u6cdb\u57fa\u56e0\u7ec4\u53ef\u5206\u4e3a\u6838\u5fc3\u57fa\u56e0\u3001\u9644\u5c5e\u57fa\u56e0\u3001\u7279\u6709\u57fa\u56e0\uff0c\u5206\u522b\u6307\u5728\u540c\u4e00\u7269\u79cd\u7684\u6240\u6709\u4e2a\u4f53\u4e2d\u51fa\u73b0\u3001\u591a\u4e2a\u975e\u5168\u90e8\u4e2a\u4f53\u4e2d\u51fa\u73b0\u3001\u4ec5\u4e00\u4e2a\u4e2a\u4f53\u4e2d\u51fa\u73b0\u7684\u57fa\u56e0\u3002Orthofinder\u5e38\u7528\u4e8e\u505a\u6cdb\u57fa\u56e0\u7ec4\u5206\u6790\uff0c\u5176\u7ed3\u679c\u5185\u5bb9\u4e30\u5bcc\uff0c\u53ef\u662f\u5982\u4f55\u66f4\u597d\u5730\u53ef\u89c6\u5316\uff0c\u6e05\u6670\u770b\u51fa\u6838\u5fc3\u57fa\u56e0\u7b49\u7684\u5206\u5e03\u60c5\u51b5\u5462\uff1f\u4eca\u5929\uff0c\u5c0f\u82b1\u6765\u6559\u5927\u5bb6\u4f7f\u7528\u82b1\u74e3\u56fe\u3001\u997c\u56fe\u3001upset\u56fe\u6765\u5bf9Orthofinder\u7ed3\u679c\u8fdb\u884c\u53ef\u89c6\u5316\u5427\u3002<\/p>\n<ul>\n<li>\u9996\u5148\u6765\u5927\u6982\u719f\u6089\u4e0bOrthofinder\u7684\u7ed3\u679c\u5427\u3002\u7ed3\u679c\u5305\u62ec12\u4e2a\u6587\u4ef6\u5939\uff0c\u6211\u4eec\u753b\u56fe\u4e3b\u8981\u7528\u5230\u7684\u662fOrthogroups\u4e0b\u7684\u4e24\u4e2aOrthogroups.GeneCount.tsv\uff0cOrthogroups_UnassignedGenes.tsv\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"620\" height=\"462\" class=\"wp-image-16537\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-1.png?resize=620%2C462\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-1.png?w=620 620w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-1.png?resize=300%2C224 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-1.png?resize=600%2C447 600w\" sizes=\"(max-width: 620px) 100vw, 620px\" data-recalc-dims=\"1\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"611\" height=\"177\" class=\"wp-image-16538\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-2.png?resize=611%2C177\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-2.png?w=611 611w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-2.png?resize=300%2C87 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-2.png?resize=600%2C174 600w\" sizes=\"(max-width: 611px) 100vw, 611px\" data-recalc-dims=\"1\" \/><\/p>\n<ul>\n<li>\u6570\u636e\u51c6\u5907<\/li>\n<\/ul>\n<p>GeneCount\u6587\u4ef6\u5305\u542b\u4e86\u6240\u6709\u540c\u6e90\u57fa\u56e0\u7ec4\u6570\u76ee\u4e0d\u4e3a1\u7684\u6240\u6709\u57fa\u56e0\u7ec4\uff0c\u5728\u5404\u4e2a\u6837\u672c\u4e2d\u7684\u6570\u76ee\uff1bUnassignedGenes\u6587\u4ef6\u5219\u5305\u542b\u4e86\u4ec5\u5305\u542b\u4e00\u4e2a\u57fa\u56e0\u7684\u540c\u6e90\u57fa\u56e0\u7ec4\u7684\u6837\u672c\u6765\u6e90\u4fe1\u606f\u3002\u9996\u5148\uff0c\u6211\u4eec\u8981\u5148\u5c06\u4e24\u4e2a\u6570\u636e\u5408\u5e76\uff0c\u7ed3\u679c\u6587\u4ef6\u662f\u4e00\u4e2a\u5305\u542b\u6240\u6709\u57fa\u56e0\u7ec4\u7684\u8868\u683c\u3002<\/p>\n<p>library(tidyverse)<\/p>\n<p>df &lt;- read.csv(&#8216;data\/Orthogroups.GeneCount.tsv&#8217;, row.names = 1)<\/p>\n<p>df_uniq &lt;- read.csv(&#8216;data\/Orthogroups_UnassignedGenes.tsv&#8217;, row.names = 1)<\/p>\n<p>df &lt;- df[,1:(ncol(df)-1)]<\/p>\n<p>df_uniq[df_uniq != &#8221;] &lt;- 1<\/p>\n<p>df_uniq[df_uniq == &#8221;] &lt;- 0<\/p>\n<p>df &lt;- rbind(df, df_uniq)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"241\" class=\"wp-image-16539\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-3.png?resize=640%2C241\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-3.png?w=838 838w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-3.png?resize=300%2C113 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-3.png?resize=768%2C290 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-3.png?resize=600%2C226 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<ul>\n<li>\u6838\u5fc3\u57fa\u56e0\u548c\u7279\u6709\u57fa\u56e0\u7edf\u8ba1<\/li>\n<\/ul>\n<p>\u6838\u5fc3\u57fa\u56e0\u7684\u7b5b\u9009\u601d\u8def\u4e3a\uff1a\u4f7f\u7528apply\u51fd\u6570\u6309\u884c\u5206\u6790\uff0c\u82e5\u4e00\u884c\u4e2d\u6240\u6709\u503c\u90fd\u4e0d\u4e3a0\uff0c\u5373\u8868\u793a\u8be5\u57fa\u56e0\u7ec4\u5728\u5168\u90e8\u6837\u672c\u4e2d\u51fa\u73b0\uff0c\u5bf9\u5e94\u7684\u884c\u540d\u4e3a\u6838\u5fc3\u57fa\u56e0\u3002<\/p>\n<p>\u7279\u6709\u57fa\u56e0\u7684\u7b5b\u9009\u601d\u8def\u4e3a\uff1a\u4f7f\u7528apply\u51fd\u6570\u6309\u884c\u5206\u6790\uff0c\u82e5\u4e00\u884c\u4e2d\u4ec5\u67091\u4e2a\u503c\u4e0d\u4e3a0\uff0c\u5219\u4e3a\u7279\u6709\u57fa\u56e0\uff0c\u5e76\u63d0\u53d6\u4e0d\u4e3a0\u5217\u7684\u5217\u540d\u4e3a\u62e5\u6709\u8be5\u57fa\u56e0\u7684\u4e2a\u4f53\u3002<\/p>\n<p>\u9644\u5c5e\u57fa\u56e0\uff1a\u9664\u6838\u5fc3\u57fa\u56e0\u3001\u7279\u6709\u57fa\u56e0\u5916\u8005\uff0c\u4e3a\u7279\u6709\u57fa\u56e0\u3002<\/p>\n<p>df_summary &lt;- data.frame(gene=rownames(df))<\/p>\n<p>df_summary$type &lt;- apply(df, 1, function(x) if (length(x[x!=0]) == 1) colnames(df)[which(x != 0)] else NA)<\/p>\n<p>df_summary$type[apply(df, 1, function(x) all(x != 0))] &lt;- &#8216;core&#8217;<\/p>\n<p>df_summary[is.na(df_summary)] &lt;- &#8216;accessory&#8217;<\/p>\n<p>st_u &lt;- data.frame(t(table(df_summary$type))) %&gt;% rename(strain=Var2) %&gt;%select(strain, Freq) %&gt;%<\/p>\n<p>merge(., data.frame(strain = colnames(df)), all.y=T)<\/p>\n<p>st_u[is.na(st_u)] &lt;- 0<\/p>\n<p>\u6211\u4eec\u4e00\u8d77\u6765\u770b\u4e0b\u6574\u7406\u597d\u7684\u6570\u636e\u7ed3\u6784\uff0cdf_summary\u5305\u542b\u6bcf\u4e2a\u57fa\u56e0\u7ec4\u7c7b\u578b\uff0c\u82e5\u4e3a\u7279\u6709\u57fa\u56e0\uff0c\u5219\u6807\u8bb0\u6240\u5c5e\u6837\u672c\u3002st_u\u8fdb\u4e00\u6b65\u7edf\u8ba1\u4e86\u6bcf\u4e2a\u6837\u672c\u5305\u542b\u7684\u7279\u6709\u57fa\u56e0\u6570\u76ee\u3002<\/p>\n<p>df_summary: <img decoding=\"async\" loading=\"lazy\" width=\"186\" height=\"322\" class=\"wp-image-16540\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-4.png?resize=186%2C322\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-4.png?w=186 186w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-4.png?resize=173%2C300 173w\" sizes=\"(max-width: 186px) 100vw, 186px\" data-recalc-dims=\"1\" \/> table(df_summary$type): <img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"69\" class=\"wp-image-16541\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-5.png?resize=640%2C69\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-5.png?w=1044 1044w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-5.png?resize=300%2C32 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-5.png?resize=1024%2C111 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-5.png?resize=768%2C83 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-5.png?resize=600%2C65 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>st_u: <img decoding=\"async\" loading=\"lazy\" width=\"192\" height=\"292\" class=\"wp-image-16542\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/word-image-16536-6.png?resize=192%2C292\" data-recalc-dims=\"1\" \/><\/p>\n<ul>\n<li>\u997c\u56fe<\/li>\n<\/ul>\n<p>\u997c\u56fe\u5c55\u793a\u6838\u5fc3\u57fa\u56e0\u3001\u9644\u5c5e\u57fa\u56e0\u3001\u7279\u6709\u57fa\u56e0\u5404\u81ea\u7684\u6570\u76ee\u548c\u6bd4\u4f8b\u3002\u6211\u4eec\u4f7f\u7528ggpubr\u6765\u7ed8\u5236\u3002\u8bdd\u4e0d\u591a\u8bf4\uff0c\u76f4\u63a5\u4e0a\u4ee3\u7801\uff01<\/p>\n<p>library(ggpubr)<\/p>\n<p>pdata1 &lt;- data.frame(group = factor(c(&#8216;core&#8217;,&#8217;unique&#8217;,&#8217;accessory&#8217;), levels = c(&#8216;core&#8217;,&#8217;unique&#8217;,&#8217;accessory&#8217;)),<\/p>\n<p>freq = c(nrow(df_summary %&gt;% filter(type==&#8217;core&#8217;)),sum(st_u$Freq), nrow(df_summary %&gt;% filter(type==&#8217;accessory&#8217;))))<\/p>\n<p>piedata1 &lt;- pdata1%&gt;%<\/p>\n<p>mutate(labs=paste0(freq,&#8217;\\n(&#8216;,100*round(freq\/sum(freq),4),&#8217;%)&#8217;))<\/p>\n<p>ggpie(piedata1, &#8216;freq&#8217;, #\u7ed8\u56fe\uff0c\u53ea\u7528\u5199\u9891\u6570\u5c31\u884c\uff0c\u5207\u8bb0\u4e0d\u7528\u518d\u5199\u5206\u7ec4<\/p>\n<p>fill = &#8216;group&#8217;, palette = &#8216;jco&#8217;,#\u989c\u8272\u677f\u4e3ajco.<\/p>\n<p>label = &#8216;labs&#8217;, lab.pos = &#8216;in&#8217;, lab.font = c(4, &#8216;white&#8217;))+ #\u8bbe\u7f6e\u6807\u7b7e\uff0c\u6807\u7b7e\u7684\u4f4d\u7f6e\u5728\u56fe\u7684\u5185\u90e8\uff0c\u6807\u7b7e\u7684\u5927\u5c0f\u4e3a4\uff0c \u989c\u8272\u4e3a\u767d\u8272.<\/p>\n<p>theme(legend.position = &#8220;top&#8221;)+ labs(fill=&#8221;&#8221;)<\/p>\n<p>ggsave(&#8216;result\/pie.png&#8217;)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"485\" class=\"wp-image-16543\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/pie.png?resize=640%2C485\" alt=\"pie\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/pie.png?w=1109 1109w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/pie.png?resize=300%2C227 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/pie.png?resize=1024%2C776 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/pie.png?resize=768%2C582 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/pie.png?resize=600%2C454 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<ul>\n<li>\u82b1\u74e3\u56fe<\/li>\n<\/ul>\n<p>\u82b1\u74e3\u56fe\u5305\u542b\u4e86\u5bf9\u6838\u5fc3\u57fa\u56e0\u548c\u6bcf\u4e2a\u6837\u672c\u7684\u7279\u6709\u57fa\u56e0\u7684\u6570\u76ee\u7edf\u8ba1\u3002\u6211\u4eec\u57fa\u4e8eplotrix\u5305\u6765\u5b8c\u6210\u3002<\/p>\n<p>\u9996\u5148\u5148\u5bfc\u5165r\u5305\u548c\u7ed8\u56fe\u529f\u80fd\u53c2\u6570\uff0c\u5e76\u6307\u5b9a\u989c\u8272\u3002<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6307\u5b9a\u7684\u989c\u8272\u662f8\u4f4d\u5b57\u7b26\u7684\u54e6\uff0c\u6bd4\u8d776\u4f4d\u5b57\u7b26\u989c\u8272\uff0c\u6700\u540e\u4e24\u4f4d\u8868\u793a\u5176\u900f\u660e\u5ea6\u3002<\/p>\n<p>\u6b64\u5916\uff0cflower_plot &lt;- function(){}\u90e8\u5206\uff0c\u53ef\u80fd\u4f1a\u6709\u4e00\u70b9\u96be\u61c2\uff0c\u4e0d\u8fc7\u6ca1\u5173\u7cfb\uff0c\u4f60\u53ea\u8981\u628a\u5b83\u590d\u5236\u7c98\u8d34\u8fd0\u884c\u5c31\u597d\u5566\uff0c\u540e\u9762\u5c0f\u82b1\u4f1a\u6559\u5927\u5bb6\u57fa\u7840\u7684\u8c03\u53c2\u54e6\u3002<\/p>\n<p>ellipse_col &lt;- c(&#8216;#6181BD4E&#8217;,&#8217;#F348004E&#8217;,&#8217;#64A10E4E&#8217;,&#8217;#9300264E&#8217;,&#8217;#464E044E&#8217;,&#8217;#049a0b4E&#8217;,&#8217;#daa5204E&#8217;,&#8217;#1e90ff4e&#8217;,&#8217;#ba55d34E&#8217;)# \u692d\u5706\u7684\u989c\u8272\u8bbe\u7f6e<\/p>\n<p>flower_plot &lt;- function(sample, otu_num, core_otu, start, a, b, r, ellipse_col, circle_col) {<\/p>\n<p>par( bty = &#8216;n&#8217;, ann = F, xaxt = &#8216;n&#8217;, yaxt = &#8216;n&#8217;, mar = c(1,1,1,1))#start\u4e3a\u692d\u5706\u7684\u8d77\u59cb\u4f4d\u7f6e, a\u4e3a\u692d\u5706\u7684\u77ed\u8f74, b\u4e3a\u692d\u5706\u7684\u957f\u8f74, r\u4e3a\u4e2d\u5fc3\u5706\u7684\u534a\u5f84<\/p>\n<p>plot(c(0,10),c(0,10),type=&#8217;n&#8217;)<\/p>\n<p>n &lt;- length(sample)<\/p>\n<p>deg &lt;- 360 \/ n<\/p>\n<p>res &lt;- lapply(1:n, function(t){<\/p>\n<p>draw.ellipse(x = 5 + cos((start + deg * (t &#8211; 1)) * pi \/ 180), #\u7ed8\u5236\u692d\u5706<\/p>\n<p>y = 5 + sin((start + deg * (t &#8211; 1)) * pi \/ 180),<\/p>\n<p>col = ellipse_col[t],<\/p>\n<p>border = ellipse_col[t],<\/p>\n<p>a = a, b = b, angle = deg * (t &#8211; 1))<\/p>\n<p>text(x = 5 + 2.5 * cos((start + deg * (t &#8211; 1)) * pi \/ 180),#\u5728\u56fe\u4e0a\u8bbe\u7f6e\u6bcf\u4e2a\u6837\u54c1\u7684otu_num\u6570\u76ee<\/p>\n<p>y = 5 + 2.5 * sin((start + deg * (t &#8211; 1)) * pi \/ 180),<\/p>\n<p>otu_num[t])<\/p>\n<p>if (deg * (t &#8211; 1) &lt; 180 &amp;&amp; deg * (t &#8211; 1) &gt; 0 ) {<\/p>\n<p>text(x = 5 + 3.3 * cos((start + deg * (t &#8211; 1)) * pi \/ 180),#\u8bbe\u7f6e\u6bcf\u4e2a\u6837\u54c1\u540d<\/p>\n<p>y = 5 + 3.3 * sin((start + deg * (t &#8211; 1)) * pi \/ 180),<\/p>\n<p>sample[t],<\/p>\n<p>srt = deg * (t &#8211; 1) &#8211; start,<\/p>\n<p>adj = 1,<\/p>\n<p>cex = 1<\/p>\n<p>)<\/p>\n<p>} else {<\/p>\n<p>text(x = 5 + 3.3 * cos((start + deg * (t &#8211; 1)) * pi \/ 180),<\/p>\n<p>y = 5 + 3.3 * sin((start + deg * (t &#8211; 1)) * pi \/ 180),<\/p>\n<p>sample[t],<\/p>\n<p>srt = deg * (t &#8211; 1) + start,<\/p>\n<p>adj = 0,<\/p>\n<p>cex = 1<\/p>\n<p>)<\/p>\n<p>}<\/p>\n<p>})<\/p>\n<p>draw.circle(x = 5, y = 5, r = r, col = circle_col, border = NA)#\u7ed8\u5236\u4e2d\u5fc3\u5706<\/p>\n<p>text(x = 5, y = 5, paste(&#8216;Core:&#8217;, core_otu))#\u8bbe\u7f6e\u4e2d\u5fc3\u5706\u540d\u5b57<\/p>\n<p>}<\/p>\n<p>\u63a5\u4e0b\u6765\u5c31\u662f\u7ed8\u56fe\u5566\uff01sample\u6307\u5b9a\u5404\u4e2a\u82b1\u74e3\u7684\u540d\u79f0\uff0cotu_num\u6307\u5b9a\u7279\u6709\u57fa\u56e0\u6570\u76ee\uff0c\u6ce8\u610f\u8981\u548csample\u5bf9\u5e94\u54e6\uff0ccore_otu\u6307\u5b9a\u6838\u5fc3\u57fa\u56e0\u7684\u6570\u76ee\uff0c\u7136\u540e\u53ef\u4ee5\u6839\u636e\u82b1\u74e3\u4e2a\u6570\u8c03\u6574\u4e0ba\uff0cb\uff0c\u4f7f\u692d\u5706\u5927\u5c0f\u7f8e\u89c2\u5373\u53ef\uff0cr\u8868\u793a\u82b1\u854a\u534a\u5f84\uff0cellipse_col\u8868\u793a\u82b1\u74e3\u989c\u8272\uff0c\u4e5f\u5c31\u662f\u6211\u4eec\u5f00\u59cb\u6307\u5b9a\u7684\u90a3\u4e2a\uff0ccircle_col\u8868\u793a\u82b1\u854a\u989c\u8272\u3002<\/p>\n<p>png(&#8216;result\/flower.png&#8217;, w=500, h=500)<\/p>\n<p>flower_plot(sample = st_u$strain, otu_num = st_u$Freq, core_otu =nrow(df_summary %&gt;% filter(type==&#8217;core&#8217;)),<\/p>\n<p>start = 90, a = 0.7, b = 2, r = 0.8, ellipse_col = ellipse_col, circle_col = &#8216;white&#8217;)<\/p>\n<p>dev.off()<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"500\" height=\"500\" class=\"wp-image-16544\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/flower.png?resize=500%2C500\" alt=\"flower\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/flower.png?w=500 500w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/flower.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/flower.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/flower.png?resize=100%2C100 100w\" sizes=\"(max-width: 500px) 100vw, 500px\" data-recalc-dims=\"1\" \/><\/p>\n<ul>\n<li>upset\u56fe<\/li>\n<\/ul>\n<p>\u5f53\u6837\u672c\u6570\u5c11\u4e8e5\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u97e6\u6069\u56fe\u8868\u793a\uff0c\u5927\u4e8e\u7b49\u4e8e5\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528upset\u56fe\uff0c\u6211\u4eec\u9700\u8981\u52a0\u8f7dupsetR\u5305\uff0c\u5177\u4f53\u4f7f\u7528\u65b9\u6cd5\u5c0f\u82b1\u6709\u5728\u300a\u97e6\u6069\u56fe\u4e0d\u591f\u7528\uff1f\u5c0f\u82b1\u6559\u4f60\u7528upset\u56fe\u96c6\u5408\u53ef\u89c6\u5316\u300b\u4e00\u6587\u4e2d\u63d0\u5230\u54e6\uff0c\u8fd9\u91cc\u5c31\u53ea\u7b80\u5355\u770b\u770b\u6548\u679c\u5566\u3002<\/p>\n<p>library(UpSetR)<\/p>\n<p>upsetdf &lt;- as.data.frame(lapply(df, as.numeric))<\/p>\n<p>upsetdf [upsetdf != 0] &lt;- 1<\/p>\n<p>upset(upsetdf, nset = 9,<\/p>\n<p>order.by = &#8216;freq&#8217;)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"365\" class=\"wp-image-16545\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/upset.png?resize=640%2C365\" alt=\"upset\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/upset.png?w=804 804w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/upset.png?resize=300%2C171 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/upset.png?resize=768%2C437 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2023\/10\/upset.png?resize=600%2C342 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5c0f\u82b1\u5e38\u7528\u7684\u5173\u4e8eorthofinder\u7ed3\u679c\u53ef\u89c6\u5316\u7684\u65b9\u6cd5\u5566\u3002\u997c\u56fe\u5c55\u793a\u4e86\u6838\u5fc3\u57fa\u56e0\u3001\u9644\u5c5e\u57fa\u56e0\u3001\u7279\u6709\u57fa\u56e0\u7684\u6bd4\u4f8b\uff1b\u82b1\u74e3\u56fe\u8fdb\u4e00\u6b65\u5c55\u5f00\u8868\u793a\u4e86\u7279\u6709\u57fa\u56e0\u5728\u5404\u4e2a\u6837\u672c\u4e2d\u7684\u5206\u5e03\uff1bupset\u56fe\u5c06\u9644\u5c5e\u57fa\u56e0\u7684\u6837\u672c\u5206\u5e03\u4e5f\u5c55\u5f00\u8868\u793a\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u8fd8\u6709\u5176\u4ed6\u7ed8\u56fe\u9700\u6c42\u4e5f\u6b22\u8fce\u8303\u56f4\u6211\u4eec\u7684\u5de5\u5177\u4e91\u751f\u4fe1\u5e73\u53f0\u5728\u7ebf\u5206\u6790http:\/\/www.biocloudservice.com\/home.html\u3002<\/p>\n<p>\u4eca\u5929\u7684\u5206\u4eab\u5c31\u5230\u8fd9\u91cc\u5566\uff0c\u5927\u5bb6\u8fd8\u6709\u4ec0\u4e48\u597d\u7684\u5173\u4e8eorthofinder\u7ed3\u679c\u53ef\u89c6\u5316\u7684\u65b9\u6cd5\uff0c\u6b22\u8fce\u6765\u548c\u5c0f\u82b1\u8ba8\u8bba\u5440~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>orthofinder_result\uff08\u4ee3\u7801\u793a\u4f8b\u6587\u4ef6\u4e0b\u8f7d\uff09 \u6cdb\u57fa\u56e0\u7ec4\u53ef\u5206\u4e3a\u6838\u5fc3\u57fa\u56e0\u3001\u9644\u5c5e\u57fa\u56e0\u3001\u7279\u6709\u57fa\u56e0\uff0c\u5206\u522b\u6307\u5728 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/16536"}],"collection":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16536"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/16536\/revisions"}],"predecessor-version":[{"id":16547,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/16536\/revisions\/16547"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16536"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}