{"id":695,"date":"2024-06-25T23:22:36","date_gmt":"2024-06-25T15:22:36","guid":{"rendered":"https:\/\/linguopeng.top\/?p=695"},"modified":"2024-06-25T23:22:36","modified_gmt":"2024-06-25T15:22:36","slug":"%e8%b7%9f%e7%9d%80imeta%e5%ad%a6%e5%81%9a%e5%9b%be%ef%bd%9cggplot2%e7%bb%98%e5%88%b6%e6%9b%bc%e5%93%88%e9%a1%bf%e5%9b%be%e5%b1%95%e7%8e%b0%e7%89%a9%e7%a7%8d%e4%b8%b0%e5%ba%a6%e5%b7%ae%e5%bc%82","status":"publish","type":"post","link":"https:\/\/linguopeng.top\/?p=695","title":{"rendered":"\u8ddf\u7740iMeta\u5b66\u505a\u56fe\uff5cggplot2\u7ed8\u5236\u66fc\u54c8\u987f\u56fe\u5c55\u73b0\u7269\u79cd\u4e30\u5ea6\u5dee\u5f02"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code># \u519c\u5fc3\u751f\u4fe1\u5de5\u4f5c\u5ba4\n# 2022-10-05\n# \u4ee3\u7801\u7f16\u5199\u53ca\u6ce8\u91ca\uff1a\u519c\u5fc3\u751f\u4fe1\u5de5\u4f5c\u5ba4\n# \u66fc\u54c8\u987f\u56fe (Manhattan Plot) \u662f\u6563\u70b9\u56fe\u7684\u4e00\u79cd\uff0c\u5728\u5fae\u751f\u7269\u7ec4\u7814\u7a76\u4e2d\u901a\u5e38\u7528\u4e8e\u8868\u793a\u5fae\u751f\u7269\u5dee\u5f02\u4e30\u5ea6\u7684\u7ed3\u679c\uff0c\n# \u662f\u5fae\u751f\u7269\u7ec4\u5206\u6790\u4e2d\u5e38\u7528\u7684\u5c55\u793a\u65b9\u5f0f\u3002\u672c\u671f\u6211\u4eec\u6311\u90092022\u5e746\u670823\u65e5\u520a\u767b\u5728iMeta\u4e0a\u7684Biochar stimulates tomato roots to recruit a bacterial assemblage contributing to disease resistance against Fusarium wilt- iMeta | \n# \u4e1c\u519c\u5434\u51e4\u829d\/\u5357\u519c\u97e6\u4e2d\u7b49\u63ed\u793a\u751f\u7269\u70ad\u6291\u5236\u4f5c\u7269\u571f\u4f20\u75c5\u5bb3\u673a\u7406\uff0c\u9009\u62e9\u6587\u7ae0\u7684Figure 2D\u8fdb\u884c\u590d\u73b0\uff0c\n# \u964d\u89e3\u548c\u63a2\u8ba8\u66fc\u54c8\u987f\u56fe\u7684\u7ed8\u5236\u65b9\u6cd5\uff0c\u5148\u4e0a\u539f\u56fe\uff1a\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image1.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1405\" height=\"1057\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image1.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-696\" style=\"width:827px;height:auto\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># \u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u901a\u8fc7\u8be6\u5c3d\u7684\u4ee3\u7801\u9010\u6b65\u62c6\u89e3\u66fc\u54c8\u987f\u56fe\uff0c\u6700\u7ec8\u5b9e\u73b0\u5bf9\u539f\u56fe\u7684\u590d\u73b0\u3002\n# R\u5305\u68c0\u6d4b\u548c\u5b89\u88c5\n# 1.\u5b89\u88c5\u6838\u5fc3R\u5305ggplot2\u4ee5\u53ca\u4e00\u4e9b\u529f\u80fd\u8f85\u52a9\u6027R\u5305\uff0c\u5e76\u8f7d\u5165\u6240\u6709R\u5305\nif (!require(\"ggplot2\"))\n  install.packages('ggplot2') \nif (!require(\"dplyr\"))\n  install.packages('dplyr') \nif (!require(\"ggrepel\"))\n  install.packages('ggrepel') \n# \u52a0\u8f7d\u5305\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(ggrepel)\n# 2.\u7531\u4e8e\u5e76\u672a\u627e\u5230\u539f\u6587\u56fe\u7247\u5bf9\u5e94\u7684\u6570\u636e\uff0c\n# \u5728\u8fd9\u91cc\u6211\u4eec\u751f\u6210\u6d4b\u8bd5\u6570\u636e\u3002\u6d4b\u8bd5\u6570\u636e\u5e94\u4e3a\u5dee\u5f02\u4e30\u5ea6\u5206\u6790\u540e\u4ea7\u751f\u7684\u6570\u636e\u6846\u3002\u8bbe\u7f6e\u968f\u673a\u79cd\u5b50\u5e76\u751f\u6210df\n# \u8bbe\u7f6e\u968f\u673a\u6570\u79cd\u5b50\uff0c\u786e\u4fdd\u6570\u636e\u53ef\u91cd\u590d\nset.seed(123)\n# \u6839\u636e\u56fe\u7247\uff0c\u63a8\u6d4b\u81f3\u5c11\u9700\u8981\u4ee5\u4e0b\u51e0\u5217\u5173\u952e\u6570\u636e\n# OTU\u7684ID\uff1a\u5b57\u7b26\u4e32\uff0c\u6bcf\u4e00\u4e2aOTU\u7684ID\u540d\n# P\u503c\uff1a0-1\u4e4b\u95f4\u7684\u968f\u673a\u6570\uff0c\u4e3a\u4e86\u66f4\u63a5\u8fd1\u539f\u56fe\uff0c\u5148\u751f\u6210\u7edd\u5927\u591a\u65700.05-1\u95f4\u7684\u968f\u673a\u6570\uff0c\u5728\u6839\u636e\u56fe\u50cf\u751f\u6210\u4e00\u4e9b\u7279\u5b9a\u6570\u503c\n# RA\u503c\uff1a\u8fd9\u91cc\u9009\u62e90.05-5\u4e4b\u95f4\u7684\u968f\u673a\u6570\n# group\uff1a\u5b57\u7b26\u4e32\uff0c\u6807\u660eOTU\u5206\u522b\u5c5e\u4e8e\u54ea\u4e9b\u5c5e\n# level\uff1a\u5b57\u7b26\u4e32\uff0c\u6807\u6ce8\u8be5OTU\u662f\u5426\u663e\u8457\u5bcc\u96c6\n# \u672c\u4f8b\u4e2d\u751f\u62101000 OTUs\ndf = data.frame(OTU=c(paste(\"OTU\",seq(1,997),sep = \"\")),\n                P=as.matrix(runif(997,min=0.05,max=1)),\n                RA=as.matrix(runif(997,min=0.05,max=5)),\n                Group=c(rep(\"Alphaproteobacteria\",100),\n                        rep(\"Betaproteobacteria\",40),rep(\"Gammaproteobacteria\",60),\n                        rep(\"Deltaproteobacteria\",80),rep(\"Acidobacteria\",45),\n                        rep(\"Actinobacteria\",110),rep(\"Bacteroidetes\",100),\n                        rep(\"Chloroflexi\",140),rep(\"Gemdfimonadetes\",40),\n                        rep(\"Firmicutes\",75),rep(\"Planctomycetes\",117),\n                        rep(\"Others\",90))\n) %>% rbind(data.frame(OTU=c(\"OTU9998\",\"OTU9999\",\"OTU10000\"),P=c(1e-23,1e-6,1e-7),RA=c(5,2.5,0.05),Group=c(\"Gammaproteobacteria\",\"Actinobacteria\",\"Bacteroidetes\")))\n#\u901a\u8fc7ifelse\u51fd\u6570\uff0c\u57fa\u4e8eP\u503c\u7ed9df\u6dfb\u52a0\u65b0\u7684\u4e00\u5217Level\uff0cP\u5c0f\u4e8e0.05\u7684\u5c5e\u4e8e\"enriched\",\u5176\u4ed6\u5c5e\u4e8e\"nosig\"\ndf$Level=ifelse(df$P&lt;0.05,\"enriched\",\"nosig\")\n#\u7ed9df\u6dfb\u52a0\u65b0\u7684\u4e00\u5217NegativeLogP\uff0c\u5373\u4e3aP\u503c\u7684\u4ee510\u4e3a\u5e95\u7684\u9006\u5bf9\u6570\ndf$NegativeLogP=-log10(df$P)\n#\u89c2\u5bdf\u539f\u56fe\uff0c\u53d1\u73b0x\u8f74\u5750\u6807\u523b\u5ea6\u540d\u79f0\u662f\u56fa\u5b9a\u7684\uff0c\u57fa\u4e8eOTU\u7684\u5c5e\u5206\u7ec4\uff0c\u56e0\u6b64\u5728\u8fd9\u91cc\u6211\u4eec\u901a\u8fc7factor\u51fd\u6570\u56fa\u5b9a\u5c5e\u5206\u7ec4\u987a\u5e8f\uff0c\u5e76\u6309\u5c5e\u5206\u7ec4\u5bf9df\u6392\u5e8f\ndf$Group=factor(df$Group,levels = c(\"Alphaproteobacteria\",\"Betaproteobacteria\",\"Gammaproteobacteria\",\"Deltaproteobacteria\",\"Acidobacteria\",\"Actinobacteria\",\"Bacteroidetes\",\"Chloroflexi\",\"Gemdfimonadetes\",\"Firmicutes\",\"Planctomycetes\",\"Others\"))#\u56fa\u5b9a\u5c5e\u5206\u7ec4\u987a\u5e8f\ndf=arrange(df,Group)#dplyr\u5305\u7684arrange\u51fd\u6570\u5bf9df\u6392\u5e8f\ndf$OTU=factor(df$OTU,levels = df$OTU)#\u56fa\u5b9aOTU\u540d\u987a\u5e8f\n# \u66fc\u54c8\u987f\u56fe\u7ed8\u5236\n# 3.\u4f7f\u7528ggplot2\u5305\u7ed8\u5236\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u66fc\u54c8\u987f\u56fe\uff08\u8fd9\u65f6\u53ea\u662f\u4e00\u5f20\u7b80\u5355\u7684\u6563\u70b9\u56fe\uff09\uff0cx\u8f74\u4e3aOTU\u540d\uff0cy\u8f74\u4e3aNegativeLogP\u503c\uff0c\n# \u989c\u8272\u6620\u5c04\u5230\u5c5e\u5206\u7ec4\uff0c\u6563\u70b9\u5927\u5c0f\u6620\u5c04RA\u503c\uff0c\u6563\u70b9\u5f62\u72b6\u6620\u5c04Level\uff1a\np&lt;-ggplot(df, aes(x=OTU, y=NegativeLogP, color=Group, size=RA, shape=Level)) +\n  geom_point(alpha=.7)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image2.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1185\" height=\"892\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image2.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-697\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># 4. \u8bbe\u7f6e\u6563\u70b9\u7684\u5f62\u72b6\u4ee5\u53ca\u5c3a\u5bf8,\u5e76\u9690\u85cfcolor\u548cshape\u5bf9\u5e94\u7684\u56fe\u4f8b\np&lt;-ggplot(df, aes(x=OTU, y=NegativeLogP, color=Group, size=RA, shape=Level)) +\n  geom_point(alpha=.7)+\n  scale_shape_manual(values=c(16,1))+ #\u9009\u62e9\u5f62\u72b6\uff0cnosig\u5bf9\u5e94\u7a7a\u5fc3\u5706\uff0cenrich\u5bf9\u5e94\u5b9e\u5fc3\u5706\n  scale_size_continuous(range = c(0.5,5),\n                        breaks = c(0.05, 0.10,0.50,1.00,5.00),\n                        labels = c('0.05', '0.10','0.50','1.00','5.00'))+ #\u8bbe\u7f6e\u6563\u70b9\u5c3a\u5bf8\n  guides(color=\"none\",shape=\"none\")#\u9690\u85cf\u56fe\u4f8b<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image3.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1188\" height=\"885\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image3.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-698\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>#5. \u89c2\u5bdf\u9884\u89c8\u56fe\uff0c\u6211\u4eec\u53d1\u73b0x\u8f74\u523b\u5ea6\u6807\u7b7e\u521d\u663e\u793a\u662f\u4e00\u6761\u7c97\u9ed1\u7ebf\uff0c\u5176\u5b9e\u662f1000\u4e2aOTU\u540d\u540c\u65f6\u663e\u793a\u5bfc\u81f4\u7684\uff0c\u6211\u4eec\u89c2\u5bdf\u539f\u56fe\uff0c\u53d1\u73b0\u539f\u56fe\u662f\u4ee5\u5c5e\u5206\u7ec4\u7684\u5c5e\u540d\u4f5c\u4e3ax\u8f74\u523b\u5ea6\u6807\u7b7e\uff0c\u523b\u5ea6\u7ebf\u662f\u5c5e\u5206\u7ec4\u4e2d\u4f4d\u7684OTU\u3002\u4e3a\u4e86\u83b7\u5f97\u4f5c\u4e3a\u523b\u5ea6\u7684\u6bcf\u4e2a\u5c5e\u4e2d\u4f4dOTU\uff0c\u6211\u4eec\u7f16\u5199\u5e76\u8fd0\u884c\u51fd\u6570getBreak()\u6765\u5b9e\u73b0\uff1a<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>getBreak&lt;-function(x,y){\n  freq&lt;-as.vector(table(y))  #table()\u8ba1\u7b97\u9891\u6570\n  half_freq&lt;-freq%\/%2\n  for (i in seq(2,length(freq))){\n    new_num&lt;-freq&#91;i]+freq&#91;i-1]\n    freq&#91;i]=new_num}\n  pos&lt;-freq-half_freq\n  break_point&lt;-as.vector(x&#91;pos])\n  return(break_point)\n}\n#\u8fd0\u884c\u51fd\u6570getBreak()\u540e\uff0c\u4fee\u6539x\u8f74\u523b\u5ea6\u53ca\u6807\u7b7e\uff0c\u5e76\u589e\u52a0x\u8f74\u5de6\u53f3\u7684\u7a7a\u767d\uff1a<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>p&lt;-ggplot(df, aes(x=OTU, y=NegativeLogP, color=Group, size=RA, shape=Level)) +\n  geom_point(alpha=.7)+\n  scale_shape_manual(values=c(16,1))+ #\u9009\u62e9\u5f62\u72b6\uff0cnosig\u5bf9\u5e94\u7a7a\u5fc3\u5706\uff0cenrich\u5bf9\u5e94\u5b9e\u5fc3\u5706\n  scale_size_continuous(range = c(0.5,5),\n                        breaks = c(0.05, 0.10,0.50,1.00,5.00),\n                        labels = c('0.05', '0.10','0.50','1.00','5.00'))+ #\u8bbe\u7f6e\u6563\u70b9\u5c3a\u5bf8\n  guides(color=\"none\",shape=\"none\")+#\u9690\u85cf\u56fe\u4f8b\n  scale_x_discrete(breaks=getBreak(df$OTU,df$Group),\n                   labels=c(\"Alphaproteobacteria\",\"Betaproteobacteria\",\"Gammaproteobacteria\",\"Deltaproteobacteria\",\"Acidobacteria\",\"Actinobacteria\",\"Bacteroidetes\",\"Chloroflexi\",\"Gemdfimonadetes\",\"Firmicutes\",\"Planctomycetes\",\"Others\"),\n                   expand = expansion(mult = 0.03))#expansion\u51fd\u6570\u7684\u53c2\u6570mult: \u767e\u5206\u6bd4\u95f4\u8ddd\uff0c\u53ef\u4ee5\u63a5\u53d7\u4e00\u4e2a\u5411\u91cf<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image4.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"547\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image4.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-699\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># 5 \u7ed9\u6563\u70b9\u6dfb\u52a0\u6587\u5b57\u6807\u7b7e\uff0c\u672c\u4f8b\u4e2d\u9700\u8981\u6dfb\u52a0\u6807\u7b7e\u7684\u662fOTU9998\uff0c\u901a\u8fc7ggrepel\u5305\u7684geom_text_repel\u51fd\u6570\u6765\u6dfb\u52a0\u6587\u5b57\u6807\u7b7e\uff1a<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>gtext&lt;-filter(df,df$OTU==\"OTU9998\")\n\np&lt;-ggplot(df, aes(x=OTU, y=NegativeLogP, color=Group, size=RA, shape=Level)) +\n  geom_point(alpha=.7,key_glyph=\"point\")+\n  scale_shape_manual(values=c(16,1))+ #\u9009\u62e9\u5f62\u72b6\uff0cnosig\u5bf9\u5e94\u7a7a\u5fc3\u5706\uff0cenrich\u5bf9\u5e94\u5b9e\u5fc3\u5706\n  scale_size_continuous(range = c(0.5,5),\n                        breaks = c(0.05, 0.10,0.50,1.00,5.00),\n                        labels = c('0.05', '0.10','0.50','1.00','5.00'))+ #\u8bbe\u7f6e\u6563\u70b9\u5c3a\u5bf8\n  guides(color=\"none\",shape=\"none\")+#\u9690\u85cf\u56fe\u4f8b\n  scale_x_discrete(breaks=getBreak(df$OTU,df$Group),\n                   labels=c(\"Alphaproteobacteria\",\"Betaproteobacteria\",\"Gammaproteobacteria\",\"Deltaproteobacteria\",\"Acidobacteria\",\"Actinobacteria\",\"Bacteroidetes\",\"Chloroflexi\",\"Gemdfimonadetes\",\"Firmicutes\",\"Planctomycetes\",\"Others\"),\n                   expand = expansion(mult = 0.03))+#expansion\u51fd\u6570\u7684\u53c2\u6570mult: \u767e\u5206\u6bd4\u95f4\u8ddd\uff0c\u53ef\u4ee5\u63a5\u53d7\u4e00\u4e2a\u5411\u91cf\n  geom_text_repel(aes(OTU,NegativeLogP,label=\"OTU9998\\n(Psedomonas sp.)\"),gtext,colour='black', size =5,box.padding = 1, \n                           point.padding = 0.8, \n                           segment.color = \"white\",\n                           show.legend = F)#\u6dfb\u52a0\u6587\u5b57\u6807\u7b7e\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image5.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"547\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image5.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-700\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># 6 \u6dfb\u52a0\u8868\u793a\u9608\u503c\u7684\u865a\u7ebf\uff0c\u9608\u503c\u4e3ap=0.05\uff1a\nthreshold&lt;--log10(0.05)\n\np&lt;-ggplot(df, aes(x=OTU, y=NegativeLogP, color=Group, size=RA, shape=Level)) +\n  geom_point(alpha=.7,key_glyph=\"point\")+\n  scale_shape_manual(values=c(16,1))+ #\u9009\u62e9\u5f62\u72b6\uff0cnosig\u5bf9\u5e94\u7a7a\u5fc3\u5706\uff0cenrich\u5bf9\u5e94\u5b9e\u5fc3\u5706\n  scale_size_continuous(range = c(0.5,5),\n                        breaks = c(0.05, 0.10,0.50,1.00,5.00),\n                        labels = c('0.05', '0.10','0.50','1.00','5.00'))+ #\u8bbe\u7f6e\u6563\u70b9\u5c3a\u5bf8\n  guides(color=\"none\",shape=\"none\")+#\u9690\u85cf\u56fe\u4f8b\n  scale_x_discrete(breaks=getBreak(df$OTU,df$Group),\n                   labels=c(\"Alphaproteobacteria\",\"Betaproteobacteria\",\"Gammaproteobacteria\",\"Deltaproteobacteria\",\"Acidobacteria\",\"Actinobacteria\",\"Bacteroidetes\",\"Chloroflexi\",\"Gemdfimonadetes\",\"Firmicutes\",\"Planctomycetes\",\"Others\"),\n                   expand = expansion(mult = 0.03))+#expansion\u51fd\u6570\u7684\u53c2\u6570mult: \u767e\u5206\u6bd4\u95f4\u8ddd\uff0c\u53ef\u4ee5\u63a5\u53d7\u4e00\u4e2a\u5411\u91cf\n  geom_text_repel(aes(OTU,NegativeLogP,label=\"OTU9998\\n(Psedomonas sp.)\"),gtext,colour='black', size =5,box.padding = 1, \n                           point.padding = 0.8, \n                           segment.color = \"white\",\n                           show.legend = F)+#\u6dfb\u52a0\u6587\u5b57\u6807\u7b7e\n  geom_hline(yintercept=threshold, linetype=2, color=\"grey\")\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image6.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"547\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image6.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-701\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># 7 \u6539\u53d8\u5206\u7ec4\u989c\u8272\uff0c\u4f18\u5316\u80cc\u666f\uff0c\u4fee\u6539\u8f74\u6807\u9898\uff0c\u503e\u659cx\u8f74\u523b\u5ea6\u6807\u7b7e\uff1a\n#\u8bbe\u7f6e\u5206\u7ec4\u989c\u8272\nmycol&lt;-c(\"#008087\",\"#00A962\",\"#86C03D\",\"#74BC56\",\n         \"#E53636\",\"#3D7ABB\",\"#EE8B15\",\"#AF4592\",\n         \"#7AC5C1\",\"#906024\",\"#6E1F86\",\"#545556\")\n\np&lt;-ggplot(df, aes(x=OTU, y=NegativeLogP, color=Group, size=RA, shape=Level)) +\n  geom_point(alpha=.7,key_glyph=\"point\")+\n  scale_shape_manual(values=c(16,1))+ #\u9009\u62e9\u5f62\u72b6\uff0cnosig\u5bf9\u5e94\u7a7a\u5fc3\u5706\uff0cenrich\u5bf9\u5e94\u5b9e\u5fc3\u5706\n  scale_size_continuous(range = c(0.5,5),\n                        breaks = c(0.05, 0.10,0.50,1.00,5.00),\n                        labels = c('0.05', '0.10','0.50','1.00','5.00'))+ #\u8bbe\u7f6e\u6563\u70b9\u5c3a\u5bf8\n  guides(color=\"none\",shape=\"none\")+#\u9690\u85cf\u56fe\u4f8b\n  scale_x_discrete(breaks=getBreak(df$OTU,df$Group),\n                   labels=c(\"Alphaproteobacteria\",\"Betaproteobacteria\",\"Gammaproteobacteria\",\"Deltaproteobacteria\",\"Acidobacteria\",\"Actinobacteria\",\"Bacteroidetes\",\"Chloroflexi\",\"Gemdfimonadetes\",\"Firmicutes\",\"Planctomycetes\",\"Others\"),\n                   expand = expansion(mult = 0.03))+#expansion\u51fd\u6570\u7684\u53c2\u6570mult: \u767e\u5206\u6bd4\u95f4\u8ddd\uff0c\u53ef\u4ee5\u63a5\u53d7\u4e00\u4e2a\u5411\u91cf\n  geom_text_repel(aes(OTU,NegativeLogP,label=\"OTU9998\\n(Psedomonas sp.)\"),gtext,colour='black', size =5,box.padding = 1, \n                  point.padding = 0.8, \n                  segment.color = \"white\",\n                  show.legend = F)+#\u6dfb\u52a0\u6587\u5b57\u6807\u7b7e\n  geom_hline(yintercept=threshold, linetype=2, color=\"grey\")+\n  labs(x=\"\", y=\"-log10(P)\")+ #\u8bbe\u7f6e\u5750\u6807\u8f74\u6807\u9898\n  scale_color_manual(values = mycol)+ #\u6539\u53d8\u5206\u7ec4\u989c\u8272\n  theme(axis.line = element_line(size = 1),panel.grid=element_blank(),\n        panel.background = element_rect(fill = 'white'),\n        axis.text.x = element_text(angle = 45, hjust = 0.5, vjust = 0.5))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image7.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"547\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image7.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-702\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># 8 \u6211\u4eec\u6ce8\u610f\u5230\u539f\u56fe\u4e0d\u540c\u533a\u5757\u6709\u4e0d\u540c\u7684\u80cc\u666f\u8272\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7annotate()\u51fd\u6570\u6765\u5b9e\u73b0\uff0c\u4f7f\u56fe\u5f62\u80cc\u666f\u5728\u4e0d\u540c\u533a\u57df\u989c\u8272\u4e0d\u540c\uff0c\u6ce8\u610f\uff0c\u56e0\u4e3a\u662f\u6539\u53d8\u56fe\u5f62\u80cc\u666f\u8272\uff0c\u56e0\u6b64\u56fe\u5c42\u5e94\u5728\u6574\u4e2a\u56fe\u5f62\u7684\u5e95\u5c42\uff1a\np&lt;-ggplot(df, aes(x=OTU, y=NegativeLogP, color=Group, size=RA, shape=Level)) +\n  annotate(\"rect\",xmin = 1, xmax = 281,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  annotate(\"rect\",xmin = 327, xmax = 437,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  annotate(\"rect\",xmin = 539, xmax = 678,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  annotate(\"rect\",xmin = 719, xmax = 793,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  annotate(\"rect\",xmin = 911, xmax = 1000,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  geom_point(alpha=.7,key_glyph=\"point\")+\n  scale_shape_manual(values=c(16,1))+ #\u9009\u62e9\u5f62\u72b6\uff0cnosig\u5bf9\u5e94\u7a7a\u5fc3\u5706\uff0cenrich\u5bf9\u5e94\u5b9e\u5fc3\u5706\n  scale_size_continuous(range = c(0.5,5),\n                        breaks = c(0.05, 0.10,0.50,1.00,5.00),\n                        labels = c('0.05', '0.10','0.50','1.00','5.00'))+ #\u8bbe\u7f6e\u6563\u70b9\u5c3a\u5bf8\n  guides(color=\"none\",shape=\"none\")+#\u9690\u85cf\u56fe\u4f8b\n  scale_x_discrete(breaks=getBreak(df$OTU,df$Group),\n                   labels=c(\"Alphaproteobacteria\",\"Betaproteobacteria\",\"Gammaproteobacteria\",\"Deltaproteobacteria\",\"Acidobacteria\",\"Actinobacteria\",\"Bacteroidetes\",\"Chloroflexi\",\"Gemdfimonadetes\",\"Firmicutes\",\"Planctomycetes\",\"Others\"),\n                   expand = expansion(mult = 0.03))+#expansion\u51fd\u6570\u7684\u53c2\u6570mult: \u767e\u5206\u6bd4\u95f4\u8ddd\uff0c\u53ef\u4ee5\u63a5\u53d7\u4e00\u4e2a\u5411\u91cf\n  geom_text_repel(aes(OTU,NegativeLogP,label=\"OTU9998\\n(Psedomonas sp.)\"),gtext,colour='black', size =5,box.padding = 1, \n                  point.padding = 0.8, \n                  segment.color = \"#F4F4F3\",\n                  show.legend = F)+#\u6dfb\u52a0\u6587\u5b57\u6807\u7b7e\n  geom_hline(yintercept=threshold, linetype=2, color=\"grey\")+\n  labs(x=\"\", y=\"-log10(P)\")+\n  scale_color_manual(values = mycol)+\n  theme(axis.line = element_line(size = 1),panel.grid=element_blank(),\n        panel.background = element_rect(fill = 'white'),\n        axis.text.x = element_text(angle = 45, hjust = 0.5, vjust = 0.5))\n\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image8.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"547\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image8.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-703\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>9 \u6700\u540e\uff0c\u6211\u4eec\u901a\u8fc7Adobe Illustrator\uff08AI\uff09\u6765\u7f8e\u5316\u4e00\u4e0b\u56fe\u7247\uff0c\u6210\u54c1\u56fe\u5982\u4e0b\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image9-4.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"2480\" height=\"1692\" data-original=\"https:\/\/linguopeng.top\/wp-content\/uploads\/2024\/06\/image9-4.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-708\"  sizes=\"auto, (max-width: 2480px) 100vw, 2480px\" \/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># \u9644.\u5b8c\u6574\u4ee3\u7801\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(ggrepel)\n\n# \u8bbe\u7f6e\u968f\u673a\u6570\u79cd\u5b50\uff0c\u786e\u4fdd\u6570\u636e\u53ef\u91cd\u590d\nset.seed(123)\n# \u6839\u636e\u56fe\u7247\uff0c\u63a8\u6d4b\u81f3\u5c11\u9700\u8981\u4ee5\u4e0b\u51e0\u5217\u5173\u952e\u6570\u636e\n# OTU\u7684ID\uff1a\u5b57\u7b26\u4e32\uff0c\u6bcf\u4e00\u4e2aOTU\u7684ID\u540d\n# P\u503c\uff1a0-1\u4e4b\u95f4\u7684\u968f\u673a\u6570\uff0c\u4e3a\u4e86\u66f4\u63a5\u8fd1\u539f\u56fe\uff0c\u5148\u751f\u6210\u7edd\u5927\u591a\u65700.05-1\u95f4\u7684\u968f\u673a\u6570\uff0c\u5728\u6839\u636e\u56fe\u50cf\u751f\u6210\u4e00\u4e9b\u7279\u5b9a\u6570\u503c\n# RA\u503c\uff1a\u8fd9\u91cc\u9009\u62e90.05-5\u4e4b\u95f4\u7684\u968f\u673a\u6570\n# group\uff1a\u5b57\u7b26\u4e32\uff0c\u6807\u660eOTU\u5206\u522b\u5c5e\u4e8e\u54ea\u4e9b\u5c5e\n# level\uff1a\u5b57\u7b26\u4e32\uff0c\u6807\u6ce8\u8be5OTU\u662f\u5426\u663e\u8457\u5bcc\u96c6\n# \u672c\u4f8b\u4e2d\u751f\u62101000 OTUs\ndf = data.frame(OTU=c(paste(\"OTU\",seq(1,997),sep = \"\")),\n                P=as.matrix(runif(997,min=0.05,max=1)),\n                RA=as.matrix(runif(997,min=0.05,max=5)),\n                Group=c(rep(\"Alphaproteobacteria\",100),\n                        rep(\"Betaproteobacteria\",40),rep(\"Gammaproteobacteria\",60),\n                        rep(\"Deltaproteobacteria\",80),rep(\"Acidobacteria\",45),\n                        rep(\"Actinobacteria\",110),rep(\"Bacteroidetes\",100),\n                        rep(\"Chloroflexi\",140),rep(\"Gemdfimonadetes\",40),\n                        rep(\"Firmicutes\",75),rep(\"Planctomycetes\",117),\n                        rep(\"Others\",90))\n) %>% rbind(data.frame(OTU=c(\"OTU9998\",\"OTU9999\",\"OTU10000\"),P=c(1e-23,1e-6,1e-7),RA=c(5,2.5,0.05),Group=c(\"Gammaproteobacteria\",\"Actinobacteria\",\"Bacteroidetes\")))\n#\u901a\u8fc7ifelse\u51fd\u6570\uff0c\u57fa\u4e8eP\u503c\u7ed9df\u6dfb\u52a0\u65b0\u7684\u4e00\u5217Level\uff0cP\u5c0f\u4e8e0.05\u7684\u5c5e\u4e8e\"enriched\",\u5176\u4ed6\u5c5e\u4e8e\"nosig\"\ndf$Level=ifelse(df$P&lt;0.05,\"enriched\",\"nosig\")\n#\u7ed9df\u6dfb\u52a0\u65b0\u7684\u4e00\u5217NegativeLogP\uff0c\u5373\u4e3aP\u503c\u7684\u4ee510\u4e3a\u5e95\u7684\u9006\u5bf9\u6570\ndf$NegativeLogP=-log10(df$P)\n#\u89c2\u5bdf\u539f\u56fe\uff0c\u53d1\u73b0x\u8f74\u5750\u6807\u523b\u5ea6\u540d\u79f0\u662f\u56fa\u5b9a\u7684\uff0c\u57fa\u4e8eOTU\u7684\u5c5e\u5206\u7ec4\uff0c\u56e0\u6b64\u5728\u8fd9\u91cc\u6211\u4eec\u901a\u8fc7factor\u51fd\u6570\u56fa\u5b9a\u5c5e\u5206\u7ec4\u987a\u5e8f\uff0c\u5e76\u6309\u5c5e\u5206\u7ec4\u5bf9df\u6392\u5e8f\ndf$Group=factor(df$Group,levels = c(\"Alphaproteobacteria\",\"Betaproteobacteria\",\"Gammaproteobacteria\",\"Deltaproteobacteria\",\"Acidobacteria\",\"Actinobacteria\",\"Bacteroidetes\",\"Chloroflexi\",\"Gemdfimonadetes\",\"Firmicutes\",\"Planctomycetes\",\"Others\"))#\u56fa\u5b9a\u5c5e\u5206\u7ec4\u987a\u5e8f\ndf=arrange(df,Group)#dplyr\u5305\u7684arrange\u51fd\u6570\u5bf9df\u6392\u5e8f\ndf$OTU=factor(df$OTU,levels = df$OTU)#\u56fa\u5b9aOTU\u540d\u987a\u5e8f\n\n\ngetBreak&lt;-function(x,y){\n  freq&lt;-as.vector(table(y))  #table()\u8ba1\u7b97\u9891\u6570\n  half_freq&lt;-freq%\/%2\n  for (i in seq(2,length(freq))){\n    new_num&lt;-freq&#91;i]+freq&#91;i-1]\n    freq&#91;i]=new_num}\n  pos&lt;-freq-half_freq\n  break_point&lt;-as.vector(x&#91;pos])\n  return(break_point)\n}\n\ngtext&lt;-filter(df,df$OTU==\"OTU9998\")\nthreshold&lt;--log10(0.05)\n#\u8bbe\u7f6e\u5206\u7ec4\u989c\u8272\nmycol&lt;-c(\"#008087\",\"#00A962\",\"#86C03D\",\"#74BC56\",\n         \"#E53636\",\"#3D7ABB\",\"#EE8B15\",\"#AF4592\",\n         \"#7AC5C1\",\"#906024\",\"#6E1F86\",\"#545556\")\n\n\np&lt;-ggplot(df, aes(x=OTU, y=NegativeLogP, color=Group, size=RA, shape=Level)) +\n  annotate(\"rect\",xmin = 1, xmax = 281,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  annotate(\"rect\",xmin = 327, xmax = 437,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  annotate(\"rect\",xmin = 539, xmax = 678,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  annotate(\"rect\",xmin = 719, xmax = 793,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  annotate(\"rect\",xmin = 911, xmax = 1000,\n           ymin = 0, ymax = 25,\n           fill=\"#F4F4F3\")+\n  geom_point(alpha=.7,key_glyph=\"point\")+\n  scale_shape_manual(values=c(16,1))+ #\u9009\u62e9\u5f62\u72b6\uff0cnosig\u5bf9\u5e94\u7a7a\u5fc3\u5706\uff0cenrich\u5bf9\u5e94\u5b9e\u5fc3\u5706\n  scale_size_continuous(range = c(0.5,5),\n                        breaks = c(0.05, 0.10,0.50,1.00,5.00),\n                        labels = c('0.05', '0.10','0.50','1.00','5.00'))+ #\u8bbe\u7f6e\u6563\u70b9\u5c3a\u5bf8\n  guides(color=\"none\",shape=\"none\")+#\u9690\u85cf\u56fe\u4f8b\n  scale_x_discrete(breaks=getBreak(df$OTU,df$Group),\n                   labels=c(\"Alphaproteobacteria\",\"Betaproteobacteria\",\"Gammaproteobacteria\",\"Deltaproteobacteria\",\"Acidobacteria\",\"Actinobacteria\",\"Bacteroidetes\",\"Chloroflexi\",\"Gemdfimonadetes\",\"Firmicutes\",\"Planctomycetes\",\"Others\"),\n                   expand = expansion(mult = 0.03))+#expansion\u51fd\u6570\u7684\u53c2\u6570mult: \u767e\u5206\u6bd4\u95f4\u8ddd\uff0c\u53ef\u4ee5\u63a5\u53d7\u4e00\u4e2a\u5411\u91cf\n  geom_text_repel(aes(OTU,NegativeLogP,label=\"OTU9998\\n(Psedomonas sp.)\"),gtext,colour='black', size =5,box.padding = 1, \n                  point.padding = 0.8, \n                  segment.color = \"#F4F4F3\",\n                  show.legend = F)+#\u6dfb\u52a0\u6587\u5b57\u6807\u7b7e\n  geom_hline(yintercept=threshold, linetype=2, color=\"grey\")+\n  labs(x=\"\", y=\"-log10(P)\")+\n  scale_color_manual(values = mycol)+\n  theme(axis.line = element_line(size = 1),panel.grid=element_blank(),\n        panel.background = element_rect(fill = 'white'),\n        axis.text.x = element_text(angle = 45, hjust = 0.5, vjust = 0.5))\n\nggsave(\"Figure2D.pdf\", p, height = 5,width = 10) # \u4fdd\u5b58\u56fe\u4e3aPDF\uff0c\u6307\u5b9a\u5bbd\u548c\u9ad8<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-695","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/posts\/695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linguopeng.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=695"}],"version-history":[{"count":1,"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/posts\/695\/revisions"}],"predecessor-version":[{"id":709,"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/posts\/695\/revisions\/709"}],"wp:attachment":[{"href":"https:\/\/linguopeng.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linguopeng.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linguopeng.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}