{"id":28308,"date":"2024-02-06T10:28:26","date_gmt":"2024-02-06T02:28:26","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=28308"},"modified":"2024-02-06T10:28:28","modified_gmt":"2024-02-06T02:28:28","slug":"%e5%91%8a%e5%88%ab%e5%8a%a0%e7%8f%ad%ef%bc%81gggenes%e8%ae%a9%e4%bd%a05%e5%88%86%e9%92%9f%e8%8e%b7%e5%be%97%e5%9f%ba%e5%9b%a0%e7%bb%93%e6%9e%84%e5%9b%be","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=28308","title":{"rendered":"\u544a\u522b\u52a0\u73ed\uff01gggenes\u8ba9\u4f605\u5206\u949f\u83b7\u5f97\u57fa\u56e0\u7ed3\u6784\u56fe"},"content":{"rendered":"<p>\u5404\u4f4d\u5c0f\u4f19\u4f34\u5927\u5bb6\u597d\u554a\uff0c\u53c8\u5230\u4e86\u5c0f\u679c\u7684\u4ee3\u7ec3\u65f6\u95f4\u5566\uff0c\u662f\u4e0d\u662f\u5f88\u6fc0\u52a8\u5462\uff1f\u8ba9\u6211\u4eec\u8fd9\u5c31\u5f00\u59cb\u4eca\u5929\u7684\u95ee\u9898\u5427~<\/p>\n<p>\u6628\u665a\u5c0f\u679c\u5728\u6574\u7406\u81ea\u5df1\u7684\u5de5\u4f5c\u5185\u5bb9\u7684\u65f6\u5019\uff0c\u770b\u5230\u540c\u4e8b\u5728\u5bf9\u5df2\u83b7\u5f97\u90e8\u5206\u7814\u7a76\u7ed3\u679c\u7684\u57fa\u56e0\u7ec4\u6570\u636e\u8fdb\u884c\u5206\u6790\uff0c\u95ee\u9898\u60c5\u5883\u662f\uff1a\u8981\u5177\u73b0\u591a\u4e2a\u67d3\u8272\u4f53\u4e0a\uff0c\u4e2a\u522b\u57fa\u56e0\u7684\u4f4d\u7f6e\u5173\u7cfb\uff0c\u5e76\u6839\u636e\u5176\u57fa\u56e0\u957f\u5ea6\u548c\u4f4d\u7f6e\u95f4\u9699\u7b49\u6bd4\u4f8b\u7f29\u653e\u3002\u7136\u540e\u540c\u4e8b\u5c31\u4f7f\u7528\u8ba1\u7b97\u5668\u8fdb\u884c\u7b49\u6bd4\u4f8b\u7f29\u653e\uff0c\u4f7f\u7528AI\u8fdb\u884c21\u4e2a\u67d3\u8272\u4f53\uff0c\u4e00\u5171143\u4e2a\u57fa\u56e0\u7684\u7ed8\u5236\u3002\u5e78\u4e8f\u6700\u540e\u5c0f\u679c\u53ca\u65f6\u51fa\u624b\uff0c\u8981\u4e0d\u7136\u540c\u4e8b\u8fd9\u4e2a\u73ed\u52a0\u7684\u592a\u201c\u4e8f\u201d\u4e86\u3002\u6240\u4ee5\u4eca\u5929\uff0c\u5c0f\u679c\u60f3\u628a\u8fd9\u4e2aR\u5305\u5206\u4eab\u7ed9\u5404\u4f4d\u5c0f\u4f19\u4f34\uff0c\u4ee5\u4fbf\u51cf\u8f7b\u5c0f\u4f19\u4f34\u4eec\u7684\u5de5\u4f5c\u538b\u529b\u548c\u7f8e\u5316\u6211\u4eec\u7684\u7ed3\u679c\u3002<\/p>\n<p>\u4eca\u5929\u8fd9\u4e2a\u80fd\u7ed9\u5927\u5bb6\u5e26\u6765\u65b9\u4fbf\u7684R\u5305\u53eb\u505agggenes\uff0c\u6ca1\u9519\uff01\u770b\u540d\u5b57\u5c31\u77e5\u9053\u5b83\u662fggplot2\u5305\u7684\u62d3\u5c55\u5305\uff0c\u56e0\u6b64\u5b83\u80fd\u5b8c\u7f8e\u7ee7\u627f\u5404\u79cdggplot2\u5305\u7684\u57fa\u7840\u51fd\u6570\uff0c\u8fbe\u5230\u9ad8\u5ea6\u7684\u8c03\u63a7\u6027\uff0c\u56e0\u6b64\u80fd\u53ef\u89c6\u5316\u51fa\u6548\u679c\u8f83\u597d\u7684\u57fa\u56e0\u7ed3\u6784\u56fe\uff0c\u8fd9\u79cd\u56fe\u5f62\u901a\u5e38\u663e\u793a\u57fa\u56e0\u7684\u5916\u663e\u5b50\u548c\u5185\u542b\u5b50\uff0c\u4ee5\u53ca\u5404\u8f6c\u5f55\u672c\u7684\u57fa\u56e0\u7ed3\u6784\u4fe1\u606f\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u8981\u8fdb\u884c\u8be5\u57fa\u56e0\u7ed3\u6784\u56fe\u7684\u7ed8\u5236\uff0c\u4e0d\u80fd\u907f\u514d\u7684\u8981\u5bf9\u57fa\u56e0\u7ed3\u6784\u8fdb\u884c\u7814\u7a76\uff0c\u800c\u5bf9\u4e8e\u8fd9\u79cd\u9488\u5bf9\u6d4b\u5e8f\u6570\u636e\u7ed3\u6784\u6587\u4ef6\u7684\u5904\u7406\uff0c\u5c0f\u679c\u63a8\u8350\u4f7f\u7528\u670d\u52a1\u5668\u8fdb\u884c\uff0c\u56e0\u4e3a\u6709\u591a\u4e2a\u8f6f\u4ef6\u662f\u9488\u5bf9Linux\u7cfb\u7edf\u8fdb\u884c\u7f16\u5199\uff0c\u5bf9\u5927\u6570\u636e\u7684\u5904\u7406\u66f4\u52a0\u53cb\u597d\uff0c\u5982\u679c\u5404\u4f4d\u5c0f\u4f19\u4f34\u73b0\u5728\u6ca1\u6709\u670d\u52a1\u5668\u7684\u8bdd\uff0c\u53ef\u4ee5\u8054\u7cfb\u5c0f\u679c\u8fdb\u884c\u79df\u8d41\u54e6~<\/p>\n<p>\u90a3\u4e0b\u9762\u5c31\u5f00\u59cb\u6211\u4eec\u4eca\u5929\u7684\u4ee3\u7ec3\u5427\uff01<\/p>\n<p>#BiocManager::install(&#8220;wilkox\/gggenes&#8221;)<\/p>\n<p>library(gggenes)<\/p>\n<p>library(ggplot2)<\/p>\n<p>library(RColorBrewer)<\/p>\n<p>\u7684\u786e\u6709\u7684\u5305\u53ef\u4ee5\u901a\u8fc7install.packages(\u2018\u2019)\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff0c\u4f46\u8fd9\u662f\u5728CRAN\u4e2d\u539f\u672c\u5c31\u5df2\u7ecf\u5b58\u5728\u7684\uff0cgggenes\u4e3a\u4e2a\u4eba\u7f16\u5199\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728Github\u4e0a\u8fdb\u884c\u4e0b\u8f7d\u5b89\u88c5\uff0c\u5176\u4e2d\u2018\/\u2019\u524d\u7684\u2018wilkox\u2019\u4e3a\u7f16\u5199\u4eba\u7684\u4ed3\u5e93\u540d\u79f0\uff0c\u540e\u9762\u5219\u4e3a\u5305\u7684\u540d\u79f0\u3002<\/p>\n<p>display.brewer.all() #\u662fRcolorBrewer\u7684\u51fd\u6570\uff0c\u80fd\u67e5\u770b\u8be5\u5305\u4e2d\u6240\u6709\u7684\u8272\u5757\uff0c\u5bf9\u753b\u56fe\u65f6\u989c\u8272\u7684\u9009\u53d6\u6709\u5e2e\u52a9<\/p>\n<p>#\u6570\u636e\u8bfb\u5165<\/p>\n<p>data &lt;- read.table(&#8216;gggenes.txt&#8217;,header = T,sep = &#8216;\\t&#8217;)<\/p>\n<p>head(data)<\/p>\n<p>chr\u4ee3\u8868\u5206\u522b\u662f\u54ea\u51e0\u6761\u67d3\u8272\u4f53\uff0cgene\u4ee3\u8868\u7684\u662f\u67d0\u4e00\u67d3\u8272\u4f53\u4e0a\u7684\u54ea\u4e2a\u57fa\u56e0\uff0cstar\u548cend\u8868\u793a\u57fa\u56e0\u7684\u8d77\u59cb\u4e0e\u7ec8\u6b62\u5e76\u7528strand\u8868\u793a\u57fa\u56e0\u7684\u65b9\u5411\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"611\" height=\"166\" class=\"wp-image-28309\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-37.png?resize=611%2C166\" alt=\"\u6587\u672c\n\n\u4e2d\u5ea6\u53ef\u4fe1\u5ea6\u63cf\u8ff0\u5df2\u81ea\u52a8\u751f\u6210\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-37.png?w=611 611w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-37.png?resize=300%2C82 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-37.png?resize=600%2C163 600w\" sizes=\"(max-width: 611px) 100vw, 611px\" data-recalc-dims=\"1\" \/><\/p>\n<p>subdata &lt;- read.table(&#8216;subgene.txt&#8217;,header = T,sep=&#8217;\\t&#8217;)<\/p>\n<p>head(subdata)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"132\" class=\"wp-image-28310\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-38.png?resize=640%2C132\" alt=\"\u6587\u672c\n\n\u63cf\u8ff0\u5df2\u81ea\u52a8\u751f\u6210\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-38.png?w=796 796w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-38.png?resize=300%2C62 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-38.png?resize=768%2C158 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-38.png?resize=600%2C124 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u5927\u5bb6\u53ef\u4ee5\u770b\u5230\uff0csubdata\u76f8\u8f83\u4e8edata\u800c\u8a00\u591a\u4e86\u2018subgene\u2019\uff0c\u2018from\u2019\u548c\u2018to\u2019\u8fd9\u4e09\u5217\uff0c\u5206\u8868\u8868\u793a\uff0c\u67d0\u67d3\u8272\u4f53\u4e0a\u67d0\u57fa\u56e0\u7684\u8f6c\u5f55\u672c\u6216\u5185\u542b\u5b50\u7684\u8d77\u59cb\u548c\u7ec8\u6b62\u4f4d\u70b9\u3002<\/p>\n<p>#\u7b80\u5355\u51fa\u56fe<\/p>\n<p>P1 &lt;- ggplot(data , aes(xmin = start, xmax = end, y = chr, fill = gene)) +<\/p>\n<p>geom_gene_arrow(arrowhead_width = grid::unit(2, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u5bbd\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrowhead_height = grid::unit(4, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u9ad8\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrow_body_height = grid::unit(4, &#8220;mm&#8221;),) + #\u5bf9\u7bad\u5934\u7684\u4f53\u5bbd\u8fdb\u884c\u8c03\u6574<\/p>\n<p>facet_wrap(~ chr, #\u53ef\u4ee5\u662f\u53d8\u53ef\u4ee5\u662f\u516c\u5f0f\uff0c\u4ee3\u8868\u6839\u636echr\u8fd9\u4e00\u53d8\u91cf\u5206\u522b\u7ed8\u5236\u4e00\u5f20\u56fe<\/p>\n<p>scales = &#8220;free&#8221;, #\u6709fixed\u548cfree\u4e24\u79cd\uff0c\u63a7\u5236\u7684\u662f\u6bcf\u5f20\u56fe\u7684\u523b\u5ea6\u6570\uff0cfree\u8868\u793a\u6bcf\u4e2a\u56fe\u6709\u72ec\u7acb\u7684\u523b\u5ea6<\/p>\n<p>ncol = ) + #\u5728\u5c4f\u5e55\u4e0a\u7684\u5c55\u793a\u65b9\u5f0f\u6709ncol\u548cnrow\u4e24\u4e2a\u51fd\u6570\u63a7\u5236<\/p>\n<p>scale_fill_brewer(palette = &#8220;Set3&#8221;)<\/p>\n<p>P1<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"366\" class=\"wp-image-28311\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-39.png?resize=640%2C366\" alt=\"\u56fe\u7247\u5305\u542b \u65e5\u7a0b\u8868\n\n\u63cf\u8ff0\u5df2\u81ea\u52a8\u751f\u6210\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-39.png?w=1486 1486w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-39.png?resize=300%2C171 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-39.png?resize=1024%2C585 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-39.png?resize=768%2C439 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-39.png?resize=600%2C343 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-39.png?w=1280 1280w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>#\u66f4\u6539\u4e3b\u9898<\/p>\n<p>P2 &lt;- ggplot(data , aes(xmin = start, xmax = end, y = chr, fill = gene)) +<\/p>\n<p>geom_gene_arrow(arrowhead_width = grid::unit(2, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u5bbd\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrowhead_height = grid::unit(4, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u9ad8\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrow_body_height = grid::unit(4, &#8220;mm&#8221;),) + #\u5bf9\u7bad\u5934\u7684\u4f53\u5bbd\u8fdb\u884c\u8c03\u6574<\/p>\n<p>facet_wrap(~ chr, #\u53ef\u4ee5\u662f\u53d8\u53ef\u4ee5\u662f\u516c\u5f0f\uff0c\u4ee3\u8868\u6839\u636echr\u8fd9\u4e00\u53d8\u91cf\u5206\u522b\u7ed8\u5236\u4e00\u5f20\u56fe<\/p>\n<p>scales = &#8220;free&#8221;, #\u6709fixed\u548cfree\u4e24\u79cd\uff0c\u63a7\u5236\u7684\u662f\u6bcf\u5f20\u56fe\u7684\u523b\u5ea6\u6570\uff0cfree\u8868\u793a\u6bcf\u4e2a\u56fe\u6709\u72ec\u7acb\u7684\u523b\u5ea6<\/p>\n<p>ncol = 1) + #\u5728\u5c4f\u5e55\u4e0a\u7684\u5c55\u793a\u65b9\u5f0f\u6709ncol\u548cnrow\u4e24\u4e2a\u51fd\u6570\u63a7\u5236<\/p>\n<p>scale_fill_brewer(palette = &#8220;Set3&#8243;) +<\/p>\n<p>ylab(&#8221;) +<\/p>\n<p>theme_bw() #\u56e0\u4e3a\u8be5\u51fd\u6570\u662fggplot2\u7684\u62d3\u5c55\uff0c\u6240\u4ee5\u53ef\u4ee5\u901a\u8fc7theme\u51fd\u6570\u81ea\u5b9a\u4e49\uff0ctheme_gene\u662f\u5176\u81ea\u5e26\u51fd\u6570<\/p>\n<p>P2<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"369\" class=\"wp-image-28312\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-40.png?resize=640%2C369\" alt=\"\u65e5\u7a0b\u8868\n\n\u63cf\u8ff0\u5df2\u81ea\u52a8\u751f\u6210\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-40.png?w=1480 1480w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-40.png?resize=300%2C173 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-40.png?resize=1024%2C591 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-40.png?resize=768%2C443 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-40.png?resize=600%2C346 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-40.png?w=1280 1280w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>#\u6dfb\u52a0gene\u6807\u7b7e<\/p>\n<p>P3 &lt;- ggplot(data , aes(xmin = start, xmax = end, y = chr, fill = gene, label = gene)) +<\/p>\n<p>geom_gene_arrow(arrowhead_width = grid::unit(2, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u5bbd\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrowhead_height = grid::unit(4, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u9ad8\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrow_body_height = grid::unit(4, &#8220;mm&#8221;),) + #\u5bf9\u7bad\u5934\u7684\u4f53\u5bbd\u8fdb\u884c\u8c03\u6574<\/p>\n<p>facet_wrap(~ chr, #\u53ef\u4ee5\u662f\u53d8\u53ef\u4ee5\u662f\u516c\u5f0f\uff0c\u4ee3\u8868\u6839\u636echr\u8fd9\u4e00\u53d8\u91cf\u5206\u522b\u7ed8\u5236\u4e00\u5f20\u56fe<\/p>\n<p>scales = &#8220;free&#8221;, #\u6709fixed\u548cfree\u4e24\u79cd\uff0c\u63a7\u5236\u7684\u662f\u6bcf\u5f20\u56fe\u7684\u523b\u5ea6\u6570\uff0cfree\u8868\u793a\u6bcf\u4e2a\u56fe\u6709\u72ec\u7acb\u7684\u523b\u5ea6<\/p>\n<p>ncol = 1) + #\u5728\u5c4f\u5e55\u4e0a\u7684\u5c55\u793a\u65b9\u5f0f\u6709ncol\u548cnrow\u4e24\u4e2a\u51fd\u6570\u63a7\u5236<\/p>\n<p>scale_fill_brewer(palette = &#8220;Set3&#8221;) +<\/p>\n<p>geom_gene_label(align = &#8216;left&#8217;) + #\u6807\u7b7e\u89d2\u5ea6&#8217;centre&#8217;,&#8217;left&#8217; and &#8216;right&#8217;.<\/p>\n<p>theme_genes() #\u56e0\u4e3a\u8be5\u51fd\u6570\u662fggplot2\u7684\u62d3\u5c55\uff0c\u6240\u4ee5\u53ef\u4ee5\u901a\u8fc7theme\u51fd\u6570\u81ea\u5b9a\u4e49\uff0ctheme_gene\u662f\u5176\u81ea\u5e26\u51fd\u6570<\/p>\n<p>P3<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"357\" class=\"wp-image-28313\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-41.png?resize=640%2C357\" alt=\"\u56fe\u793a\n\n\u4f4e\u53ef\u4fe1\u5ea6\u63cf\u8ff0\u5df2\u81ea\u52a8\u751f\u6210\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-41.png?w=1485 1485w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-41.png?resize=300%2C167 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-41.png?resize=1024%2C572 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-41.png?resize=768%2C429 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-41.png?resize=600%2C335 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-41.png?w=1280 1280w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>#\u6309\u7167\u57fa\u56e0\u65b9\u5411\u8fdb\u884c\u7ffb\u8f6c<\/p>\n<p>P4 &lt;- ggplot(data , aes(xmin = start, xmax = end, y = chr, fill = gene, label = gene,forward = orientation)) +<\/p>\n<p>geom_gene_arrow(arrowhead_width = grid::unit(4, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u5bbd\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrowhead_height = grid::unit(4, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u9ad8\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrow_body_height = grid::unit(4, &#8220;mm&#8221;),) + #\u5bf9\u7bad\u5934\u7684\u4f53\u5bbd\u8fdb\u884c\u8c03\u6574<\/p>\n<p>facet_wrap(~ chr, #\u53ef\u4ee5\u662f\u53d8\u53ef\u4ee5\u662f\u516c\u5f0f\uff0c\u4ee3\u8868\u6839\u636echr\u8fd9\u4e00\u53d8\u91cf\u5206\u522b\u7ed8\u5236\u4e00\u5f20\u56fe<\/p>\n<p>scales = &#8220;free&#8221;, #\u6709fixed\u548cfree\u4e24\u79cd\uff0c\u63a7\u5236\u7684\u662f\u6bcf\u5f20\u56fe\u7684\u523b\u5ea6\u6570\uff0cfree\u8868\u793a\u6bcf\u4e2a\u56fe\u6709\u72ec\u7acb\u7684\u523b\u5ea6<\/p>\n<p>ncol = 1) + #\u5728\u5c4f\u5e55\u4e0a\u7684\u5c55\u793a\u65b9\u5f0f\u6709ncol\u548cnrow\u4e24\u4e2a\u51fd\u6570\u63a7\u5236<\/p>\n<p>scale_fill_brewer(palette = &#8220;Set3&#8221;) +<\/p>\n<p>geom_gene_label(align = &#8216;centre&#8217;) +<\/p>\n<p>theme_genes() #\u56e0\u4e3a\u8be5\u51fd\u6570\u662fggplot2\u7684\u62d3\u5c55\uff0c\u6240\u4ee5\u53ef\u4ee5\u901a\u8fc7theme\u51fd\u6570\u81ea\u5b9a\u4e49\uff0ctheme_gene\u662f\u5176\u81ea\u5e26\u51fd\u6570<\/p>\n<p>P4<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"362\" class=\"wp-image-28314\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-42.png?resize=640%2C362\" alt=\"\u56fe\u793a, \u65e5\u7a0b\u8868\n\n\u63cf\u8ff0\u5df2\u81ea\u52a8\u751f\u6210\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-42.png?w=1479 1479w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-42.png?resize=300%2C170 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-42.png?resize=1024%2C579 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-42.png?resize=768%2C434 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-42.png?resize=600%2C339 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-42.png?w=1280 1280w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>#\u5bf9\u4e2a\u522b\u57fa\u56e0\u7684\u5185\u90e8\u7ed3\u6784\u505a\u6807\u8bc6<\/p>\n<p>P5 &lt;- ggplot(subdata , aes(xmin = start, xmax = end, y = chr, forward = orientation)) +<\/p>\n<p>geom_gene_arrow(arrowhead_width = grid::unit(4, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u5bbd\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrowhead_height = grid::unit(4, &#8220;mm&#8221;), #\u5bf9\u7bad\u5934\u7684\u5934\u7684\u9ad8\u5ea6\u8fdb\u884c\u8c03\u6574<\/p>\n<p>arrow_body_height = grid::unit(4, &#8220;mm&#8221;),) + #\u5bf9\u7bad\u5934\u7684\u4f53\u5bbd\u8fdb\u884c\u8c03\u6574<\/p>\n<p>geom_subgene_arrow(data = subdata,aes(xmin = start, xmax = end,y = chr,fill = subgene,<\/p>\n<p>xsubmin = from,xsubmax = to),color = &#8216;black&#8217;) +<\/p>\n<p>facet_wrap(~ chr, #\u53ef\u4ee5\u662f\u53d8\u53ef\u4ee5\u662f\u516c\u5f0f\uff0c\u4ee3\u8868\u6839\u636echr\u8fd9\u4e00\u53d8\u91cf\u5206\u522b\u7ed8\u5236\u4e00\u5f20\u56fe<\/p>\n<p>scales = &#8220;free&#8221;, #\u6709fixed\u548cfree\u4e24\u79cd\uff0c\u63a7\u5236\u7684\u662f\u6bcf\u5f20\u56fe\u7684\u523b\u5ea6\u6570\uff0cfree\u8868\u793a\u6bcf\u4e2a\u56fe\u6709\u72ec\u7acb\u7684\u523b\u5ea6<\/p>\n<p>ncol = 1) + #\u5728\u5c4f\u5e55\u4e0a\u7684\u5c55\u793a\u65b9\u5f0f\u6709ncol\u548cnrow\u4e24\u4e2a\u51fd\u6570\u63a7\u5236<\/p>\n<p>scale_fill_brewer(palette = &#8220;Set3&#8243;) +<\/p>\n<p>theme_bw() +<\/p>\n<p>ylab(&#8221;)<\/p>\n<p>P5<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"369\" class=\"wp-image-28315\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-43.png?resize=640%2C369\" alt=\"\u56fe\u7247\u5305\u542b \u56fe\u793a\n\n\u63cf\u8ff0\u5df2\u81ea\u52a8\u751f\u6210\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-43.png?w=1472 1472w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-43.png?resize=300%2C173 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-43.png?resize=1024%2C591 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-43.png?resize=768%2C443 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-43.png?resize=600%2C346 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-43.png?w=1280 1280w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u597d\u5566\uff0c\u4ee5\u4e0a\u5c31\u662f\u4eca\u5929\u5168\u90e8\u7684\u4ee3\u7801\u4ee3\u7ec3\u54e6\uff0c\u662f\u4e0d\u662f\u5f88\u7b80\u5355\u5462\uff0c\u5176\u4e2d\u524d4\u5f20\u56fe\u7528\u5230\u7684\u6570\u636e\u662fdata\uff0c\u6700\u540e\u4e00\u5f20\u56fe\u7528\u5230\u7684\u6570\u636e\u662fsubdata\u3002\u4e0d\u77e5\u9053\u5927\u5bb6\u6709\u6ca1\u6709\u6ce8\u610f\uff0c\u5728\u6700\u540e\u7ed8\u56fe\u7684\u65f6\u5019ggplot\u540e\u9762\u7684aes\u4e2d\u88ab\u5c0f\u679c\u5220\u9664\u4e86fill\u8fd9\u4e2a\u9009\u9879\uff0c\u800c\u5728\u540e\u9762\u7684geom_subgene_arrow\u7684\u51fd\u6570\u4e2d\u6dfb\u52a0\u4e86fill = subgene\uff0c\u8fd9\u662f\u56e0\u4e3a\u5982\u679c\u4e0d\u5220\u9664ggplot\u4e2d\u7684\u586b\u5145\u6620\u5c04\u7684\u8bdd\u4f1a\u5bfc\u81f4\u6574\u4e2a\u57fa\u56e0\u90fd\u88ab\u586b\u5145\u4e0a\u989c\u8272\uff0c\u800c\u5bfc\u81f4\u65e0\u6cd5\u5206\u8fa8\u67d0\u4e2a\u57fa\u56e0\u7684\u5185\u90e8\u7ed3\u6784\u3002<\/p>\n<p>\u5176\u5b9e\uff0c\u57fa\u56e0\u7ed3\u6784\u56fe\u53ef\u9002\u7528\u4e8e\u591a\u4e2a\u573a\u5408\uff0c\u5305\u62ec\u57fa\u56e0\u6ce8\u91ca\u3001\u7ed3\u6784\u53d8\u5f02\u548c\u8d28\u7c92\u6784\u5efa\u7b49\uff0c\u8bf4\u660e\u8fd9\u8fd8\u662f\u5f88\u91cd\u8981\u7684\u3002\u4f46\u5982\u679c\u5404\u4f4d\u5c0f\u4f19\u4f34\u5e76\u4e0d\u60f3\u5728\u56fe\u5f62\u53ef\u89c6\u5316\u4e0a\u4e0b\u592a\u5927\u7684\u529f\u592b\uff0c\u53ef\u4ee5\u6765\u5c0f\u679c\u7684\u4e91\u751f\u4fe1\u5e73\u53f0\uff0c\u91cc\u9762\u6709\u591a\u4e2a\u5df2\u7ecf\u6210\u719f\u7684\u4ee3\u7801\uff0c\u80fd\u5e2e\u52a9\u5404\u4f4d\u5c0f\u4f19\u4f34\u706b\u901f\u51fa\u56fe\uff0c\u4e14\u652f\u6301\u5b57\u4f53\u548c\u989c\u8272\u7684\u5b9a\u5236\u54e6\uff01\u5feb\u6765\u52a0\u5165\u6211\u4eec\u5427\u3002<\/p>\n<p>http:\/\/www.biocloudservice.com\/home.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5404\u4f4d\u5c0f\u4f19\u4f34\u5927\u5bb6\u597d\u554a\uff0c\u53c8\u5230\u4e86\u5c0f\u679c\u7684\u4ee3\u7ec3\u65f6\u95f4\u5566\uff0c\u662f\u4e0d\u662f\u5f88\u6fc0\u52a8\u5462\uff1f\u8ba9\u6211\u4eec\u8fd9\u5c31\u5f00\u59cb\u4eca\u5929\u7684\u95ee\u9898\u5427~ \u6628\u665a\u5c0f\u679c\u5728\u6574\u7406\u81ea\u5df1\u7684 [&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\/28308"}],"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=28308"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/28308\/revisions"}],"predecessor-version":[{"id":28319,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/28308\/revisions\/28319"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28308"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}