{"id":36799,"date":"2024-06-10T09:16:37","date_gmt":"2024-06-10T01:16:37","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=36799"},"modified":"2024-06-10T09:16:37","modified_gmt":"2024-06-10T01:16:37","slug":"if16-6%e6%96%87%e7%ab%a0%e4%b8%ad%e5%8d%95%e7%bb%86%e8%83%9e%e6%95%b0%e6%8d%ae%e5%8f%af%e8%a7%86%e5%8c%96%e7%9a%84%e5%a0%86%e5%8f%a0%e5%b0%8f%e6%8f%90%e7%90%b4%e5%9b%be%e6%b0%94%e6%b3%a1%e7%83%ad-2","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=36799","title":{"rendered":"IF16.6\u6587\u7ae0\u4e2d\u5355\u7ec6\u80de\u6570\u636e\u53ef\u89c6\u5316\u7684\u5806\u53e0\u5c0f\u63d0\u7434\u56fe+\u6c14\u6ce1\u70ed\u56fe\uff0c\u8fd8\u4e0d\u5feb\u8ddf\u7740\u5c0f\u56fe\u53bb\u5b66\u4e60\uff1f"},"content":{"rendered":"<p>\u5c0f\u56fe\u6700\u8fd1\u9605\u8bfb\u6587\u732e\u65f6\u5019\u53d1\u73b0\u6709\u5173\u5355\u7ec6\u80de\u5206\u6790\u662f\u8d8a\u6765\u8d8a\u591a\uff0c\u5e76\u4e14\u8bb8\u591a\u9ad8\u5206\u6587\u7ae0\u4e2d\u7684\u5355\u7ec6\u80de\u56fe\u90fd\u975e\u5e38\u7684\u597d\u770b\u3002\u5c0f\u56fe\u5c31\u7a81\u53d1\u5947\u60f3\u60f3\u53bb\u590d\u73b0\u8fd9\u4e9b\u9ad8\u5206\u6587\u7ae0\u4e2d\u7684\u56fe\u7247\uff0c\u60f3\u5230\u4ed6\u4eec\u80fd\u53d1\u8fd9\u4e48\u9ad8\u5206\u7684\u6587\u7ae0\uff0c\u8fd9\u91cc\u9762\u56fe\u60f3\u5fc5\u52a0\u4e86\u4e0d\u5c11\u5206\uff0c\u6bd5\u7adf\u6570\u636e\u53ef\u89c6\u5316\u624d\u6700\u80fd\u4f53\u73b0\u6570\u636e\u7684\u7f8e\u89c2\u6027\uff0c\u624d\u80fd\u591f\u5438\u5f15\u8bfb\u8005\u3002\u6240\u4ee5\uff0c\u6211\u4eec\u6709\u65f6\u5019\u60f3\u4e0d\u77e5\u9053\u5982\u4f55\u53ef\u89c6\u5316\u6570\u636e\u65f6\u5019\uff0c\u53ef\u4ee5\u501f\u9274\u9ad8\u5206\u6587\u7ae0\u4e2d\u7684\u56fe\u7247\uff0c\u7528\u5728\u81ea\u5df1\u7684\u6587\u7ae0\u4e2d\u3002\u56e0\u6b64\u5462\uff0c\u5c0f\u56fe\u5c31\u627e\u4e86\u4e00\u7bc7\u6587\u7ae0\uff0c\u300a<strong>Single cell transcriptomic analyses implicate an immunosuppressive tumor microenvironment in pancreatic cancer liver metastasis<\/strong>\u300bIF16.6\uff0c\u8fd9\u4e48\u9ad8\u5206\u7684\u6587\u7ae0\uff0c\u5c0f\u56fe\u770b\u4e86\u770b\u8fd9\u7bc7\u6587\u7ae0\u7684\u56fe\uff0c\u53d1\u73b0\u8bb8\u591a\u56fe\u90fd\u662f\u6211\u4eec\u89c1\u8fc7\u7684\uff0c\u8fd8\u5f88\u597d\u590d\u73b0\uff0c\u8fd9\u4e9b\u56fe\u90fd\u662f\u62fc\u63a5\u800c\u6210\u7684\uff0c\u7ec4\u6210\u4e00\u4e2a\u975e\u5e38\u597d\u770b\u7684\u56fe\u3002\u5c31\u6bd4\u5982\u4e0b\u9762\u8fd9\u4e2a\u56feb<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"291\" class=\"wp-image-36800\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-1.png?resize=640%2C291\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-1.png?w=1440 1440w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-1.png?resize=300%2C136 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-1.png?resize=1024%2C465 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-1.png?resize=768%2C349 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-1.png?resize=600%2C273 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-1.png?w=1280 1280w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u4e0a\u56fe\u4e2d\u7684\u56feb\u662f\u4e0d\u662f\u633a\u597d\u770b\u7684\uff0c\u4f46\u662f\u5c0f\u4f19\u4f34\u53d1\u73b0\u6ca1\uff0c\u8fd9\u4e2a\u56feb\u662f\u6211\u4eec\u975e\u5e38\u719f\u6089\u7684\u56fe\uff0c\u53ef\u80fd\u6211\u4eec\u5e73\u65f6\u90fd\u7ed8\u5236\u8fc7\uff0c\u4f46\u662f\u53c8\u4e0d\u4e00\u6837\uff0c\u5c0f\u56fe\u8fd9\u91cc\u5c31\u5e26\u5c0f\u4f19\u4f34\u53bb\u590d\u73b0\u8fd9\u4e2a\u56feb\uff0c<\/p>\n<p>\u6211\u4eec\u60f3\u8981\u590d\u73b0\u8fd9\u4e2a\u56fe\uff0c\u80af\u5b9a\u9700\u8981\u4ece\u54ea\u91cc\u4e0b\u624b\uff0c\u9996\u5148\u5c31\u662f\u4e86\u89e3\u8fd9\u4e2a\u56fe\u7684\u7ec4\u6210\uff0c\u4ed4\u7ec6\u89c2\u5bdf\uff0c\u5c0f\u56fe\u53d1\u73b0\u8fd9\u662f\u7531\u4e24\u79cd\u56fe\u7ec4\u6210\uff0c\u4e00\u4e2a\u662f\u5806\u53e0\u7684\u5c0f\u63d0\u7434\u56fe\uff0c\u53f3\u8fb9\u662f\u6c14\u6ce1\u70ed\u56fe\uff0c\u597d\u4e86\u6211\u4eec\u77e5\u9053\u8fd9\u4e24\u4e2a\u7ec4\u56fe\u7684\u540d\u5b57\u4e4b\u540e\u5c31\u662f\u53bb\u5b9e\u73b0\u4ed6\u4eec\u3002<\/p>\n<p>\u6211\u4eec\u4ece\u53f3\u8fb9\u7684\u56fe\u4e0b\u624b\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u6587\u7ae0\u662f\u5355\u7ec6\u80de\u7684\u6587\u7ae0\uff0c\u5c0f\u56fe\u81ea\u5df1\u4e5f\u7528\u4e86\u81ea\u5df1\u5355\u7ec6\u80de\u6570\u636e\uff0c\u5c0f\u4f19\u4f34\u53ef\u4ee5\u5957\u7528\u6570\u636e\u683c\u5f0f\u53bb\u590d\u73b0\u54e6\uff0c<\/p>\n<p>\u6211\u4eec\u5f00\u59cb\u8f7d\u5165\u51e0\u4e2a\u5305\uff0c<\/p>\n<p>library(scRNAtoolVis) # \u5c0f\u56fe\u52a0\u8f7d\u8fd9\u4e2a\u5305\uff0c\u4e3a\u4e86\u4f7f\u7528\u8fd9\u4e2a\u5305\u7684\u6570\u636e\uff0c<\/p>\n<p>library(Seurat) # dotplot\uff0c\u5355\u7ec6\u80de\u7ed8\u56fe\u4f7f\u7528<\/p>\n<p>library(cowplot) # plot_grid<\/p>\n<p>httest &lt;- system.file(&#8220;extdata&#8221;, &#8220;htdata.RDS&#8221;, package = &#8220;scRNAtoolVis&#8221;)<\/p>\n<p>pbmc &lt;- readRDS(httest)<\/p>\n<p>\u7136\u540e\u6211\u4eec\u8f7d\u5165\u6570\u636e<\/p>\n<p># \u6dfb\u52a0\u5206\u7ec4<\/p>\n<p>pbmc$groups &lt;- rep(c(&#8216;stim&#8217;,&#8217;control&#8217;),each = 1319)<\/p>\n<p># \u6dfb\u52a0\u7ec6\u80de\u7c7b\u578b<\/p>\n<p>pbmc$celltype &lt;- Seurat::Idents(pbmc)<\/p>\n<p># \u8f7d\u5165 markergene<\/p>\n<p>data(&#8220;top3pbmc.markers&#8221;)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"550\" height=\"514\" class=\"wp-image-36801\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-2.png?resize=550%2C514\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-2.png?w=550 550w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-2.png?resize=300%2C280 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u8fd9\u4e2a\u5176\u5b9e\u5c31\u662f\u6211\u4eec\u4e00\u822c\u5355\u7ec6\u80de\u64cd\u4f5c\u5b98\u65b9\u6d41\u7a0b\u540e\uff0c\u8dd1\u5b8c\u7b2c\u4e00\u4e2a\u6570\u636e\u7ed3\u679c\uff0c\u5c0f\u4f19\u4f34\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528<\/p>\n<p>\u540e\u9762\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u6570\u636e\u53bb\u7ed8\u5236\u56fe\u7247<\/p>\n<p># check<\/p>\n<p>head(top3pbmc.markers,3)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"167\" class=\"wp-image-36802\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-3.png?resize=640%2C167\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-3.png?w=749 749w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-3.png?resize=300%2C78 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-3.png?resize=600%2C156 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>p &lt;- DotPlot(pbmc,<\/p>\n<p>features = split(top3pbmc.markers$gene, top3pbmc.markers$cluster),<\/p>\n<p>cols = c(&#8220;#dddddd&#8221;, &#8220;#448444&#8221;)<\/p>\n<p>) +<\/p>\n<p>RotatedAxis() + # \u6765\u81eaSeurat<\/p>\n<p>theme(<\/p>\n<p>panel.border = element_rect(color = &#8220;black&#8221;),<\/p>\n<p>panel.spacing = unit(1, &#8220;mm&#8221;),<\/p>\n<p>axis.title = element_blank(),<\/p>\n<p>axis.text.y = element_blank(),<\/p>\n<p>)#\u8bbe\u7f6e\u4e3b\u9898\uff0c<\/p>\n<p>p$data$feature.groups2 &lt;- factor(p$data$feature.groups,<\/p>\n<p>levels = c(&#8220;Platelet&#8221;,&#8221;DC&#8221;,&#8221;NK&#8221;,<\/p>\n<p>&#8220;FCGR3A+ Mono&#8221;,&#8221;CD8 T&#8221;,&#8221;B&#8221;,<\/p>\n<p>&#8220;Memory CD4 T&#8221;,&#8221;CD14+ Mono&#8221;,&#8221;Naive CD4 T&#8221;))#\u6ce8\u91ca\u5355\u7ec6\u80de\u6570\u636e<\/p>\n<p>P<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"278\" class=\"wp-image-36803\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-4.png?resize=640%2C278\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-4.png?w=1269 1269w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-4.png?resize=300%2C130 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-4.png?resize=1024%2C445 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-4.png?resize=768%2C333 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-4.png?resize=600%2C261 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u8fd9\u6837\u4e00\u6765\u6587\u7ae0\u4e2d\u53f3\u8fb9\u7684\u56fe\u5c31\u5927\u81f4\u7684\u7ed8\u5236\u51fa\u6765\u4e86\uff0c\u4e0a\u9762\u5c0f\u56fe\u8fd8\u52a0\u4e86\u5355\u7ec6\u80de\u7684\u6ce8\u91ca\u7ed3\u679c\uff0c\u66f4\u52a0\u4e30\u5bcc\uff0c\u4f46\u662f\u53d1\u73b0\u6709\u4e00\u4e9b\u5c0f\u7ec6\u8282\u6ca1\u6709\u5904\u7406\u5230\u4f4d\uff0c\u4e2d\u95f4\u8fd8\u6709\u5206\u5272\u7684\u7ebf\uff0c\u4e0b\u9762\u6211\u4eec\u5728\u7ee7\u7eed\u7ed8\u5236\uff0c\u6211\u4eec\u5bf9\u7ec6\u8282\u7684\u4fee\u6539\u9700\u8981\u7528\u5230ggplot2\u4e2d\u7684\u53c2\u6570\u5904\u7406\u6765\u770b\u770b\u5982\u4f55\u5904\u7406<\/p>\n<p>\u6211\u4eec\u4f7f\u7528ggplot2\u4ece\u5934\u7ed8\u5236<\/p>\n<p>library(ggh4x)#\u9700\u8981\u7528\u5230\u91cc\u9762\u7684\u51fd\u6570\u5904\u7406\u6570\u636e<\/p>\n<p>library(RColorBrewer)#\u52a0\u8f7d\u8fd9\u4e2a\u5305\u53ea\u662f\u4e3a\u4e86\u586b\u5145\u989c\u8272<\/p>\n<p>#\u4e0b\u9762\u628a\u6570\u636e\u586b\u5145\u4e00\u4e0b\uff0c<\/p>\n<p>strip &lt;- strip_themed(<\/p>\n<p>background_x = elem_list_rect(fill = brewer.pal(9, &#8220;Paired&#8221;)))<\/p>\n<p>#\u4e0b\u9762\u7ed8\u5236\u56fe\u7247\uff0c\u4ece\u4e3b\u9898\u989c\u8272\u7b49\uff0c<\/p>\n<p>p$data %&gt;%<\/p>\n<p>ggplot(aes(x = features.plot,<\/p>\n<p>y = id)) +<\/p>\n<p>geom_point(aes(size = pct.exp,<\/p>\n<p>color = avg.exp.scaled)) +<\/p>\n<p>facet_wrap2(~feature.groups2,<\/p>\n<p>scales = &#8220;free_x&#8221;,<\/p>\n<p>strip = strip,<\/p>\n<p>nrow = 1) +<\/p>\n<p>#\u4e3b\u9898\u7684\u4fee\u6b63<\/p>\n<p>theme_classic() +<\/p>\n<p>theme(axis.text.x = element_text(angle = 90,<\/p>\n<p>hjust = 0.5, #\u6c14\u6ce1\u95f4\u8ddd<\/p>\n<p>vjust = 0.3,<\/p>\n<p>color = &#8220;black&#8221;),<\/p>\n<p>axis.title = element_blank(),<\/p>\n<p>strip.background = element_rect(color = &#8220;white&#8221;),<\/p>\n<p>axis.text.y = element_blank()) +<\/p>\n<p>scale_color_gradient(low = &#8220;#ffffff&#8221;,#\u5e95\u6570\u636e\u989c\u8272\u8bbe\u7f6e<\/p>\n<p>high = &#8220;#448444&#8221;,<\/p>\n<p>name = &#8220;avg.exp&#8221;) -&gt; p<\/p>\n<p>#\u4e0a\u8ff0\u7684\u7ed8\u56fe\uff0c\u8bb8\u591a\u90fd\u662f\u9ed8\u8ba4\u7684\u53c2\u6570\uff0c\u5c0f\u4f19\u4f34\u53ef\u4ee5\u65b9\u5411\u53bb\u4f7f\u7528<\/p>\n<p>P#\u67e5\u770b\u4e00\u4e0b\u56fe<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"280\" class=\"wp-image-36804\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-5.png?resize=640%2C280\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-5.png?w=1269 1269w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-5.png?resize=300%2C131 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-5.png?resize=1024%2C448 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-5.png?resize=768%2C336 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-5.png?resize=600%2C262 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u8fd9\u6837\u4e00\u6765\u6211\u4eec\u53f3\u8fb9\u7684\u56fe\u5c31\u590d\u73b0\u7684\u5dee\u4e0d\u591a\uff0c\u5bf9\u6bd4\u4e00\u4e0b<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"202\" class=\"wp-image-36805\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-6.png?resize=640%2C202\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-6.png?w=924 924w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-6.png?resize=300%2C94 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-6.png?resize=768%2C242 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-6.png?resize=600%2C189 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u53d1\u73b0\u90fd\u5df2\u7ecf\u5dee\u4e0d\u591a\u4e86\uff0c\u53ea\u662f\u989c\u8272\u7684\u8bbe\u7f6e\uff0c\u5c0f\u4f19\u4f34\u5bf9\u6b64\u53ef\u4ee5\u81ea\u884c\u53bb\u8bbe\u7f6e\uff0c\u8fd8\u6709\u5c0f\u56fe\u81ea\u5df1\u52a0\u7684\u5355\u7ec6\u80de\u5206\u7ec4\u4fe1\u606f\u5728\u4e0a\u65b9\uff0c\u5c0f\u4f19\u4f34\u4e0d\u559c\u6b22\u8fd9\u4e2a\u5355\u7ec6\u80de\u5206\u7ec4\u53ef\u4ee5\u5220\u9664\uff0c\u53ea\u9700\u8981\u628astrip\u8fd9\u4e2a\u4fe1\u606f\u6ce8\u91ca\u6389\u5c31\u53ef\u4ee5\uff0c<\/p>\n<p>\u597d\u4e86\u6211\u4eec\u5b9e\u73b0\u4e86\u53f3\u8fb9\u7684\u56fe\u7247\uff0c\u53bb\u590d\u73b0\u4e00\u4e0b\u5de6\u8fb9\u7684\u5806\u53e0\u5c0f\u63d0\u7434\u56fe\u5427<\/p>\n<p>\u6211\u4eec\u5148\u8f7d\u5165\u4f7f\u7528\u7684\u5305<\/p>\n<p>library(Seurat)<\/p>\n<p>library(ggpubr)<\/p>\n<p>library(ggsignif)<\/p>\n<p>\u8f7d\u5165\u6211\u4eec\u5b9e\u4f8b\u7684\u6570\u636e<\/p>\n<p>\u5176\u5b9e\u5806\u53e0\u5c0f\u63d0\u7434\u56fe\uff0c\u5c0f\u4f19\u4f34\u4e0d\u5c11\u89c1\uff0c\u505a\u5355\u7ec6\u80de\u6570\u636e\u90fd\u4f1a\u7528\u5f97\u5230\uff0c\u6765\u770b\u770b\u5982\u4f55\u7ed8\u5236\u7684<\/p>\n<p># \u52a0\u8f7d\u6570\u636e\u5bf9\u8c61<\/p>\n<p>#<\/p>\n<p>pbmc &lt;- readRDS(&#8220;pbmc_2k_1.rds&#8221;)<\/p>\n<p>identity &lt;- readRDS(&#8220;pbmc_2k_2.rds&#8221;)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"320\" class=\"wp-image-36806\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-7.png?resize=640%2C320\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-7.png?w=853 853w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-7.png?resize=300%2C150 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-7.png?resize=768%2C384 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-7.png?resize=600%2C300 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>features &lt;- c(&#8220;CD79A&#8221;, &#8220;MS4A1&#8221;, &#8220;CD8A&#8221;, &#8220;CD8B&#8221;, &#8220;LYZ&#8221;,<\/p>\n<p>&#8220;LGALS3&#8221;)<\/p>\n<p>\u6211\u4eec\u63d0\u53d6\u51e0\u4e2a\u57fa\u56e0\u7ed8\u5236<\/p>\n<p># \u63d0\u53d6\u6570\u636e\u6846\u5b50\u96c6<\/p>\n<p>pbmc &lt;- pbmc[,features]<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"535\" height=\"419\" class=\"wp-image-36807\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-8.png?resize=535%2C419\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-8.png?w=535 535w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-8.png?resize=300%2C235 300w\" sizes=\"(max-width: 535px) 100vw, 535px\" data-recalc-dims=\"1\" \/><\/p>\n<p># \u6dfb\u52a0\u7ec6\u80dename\u548c\u7ec6\u80de\u7fa4\u8eab\u4efd<\/p>\n<p>pbmc$Cell &lt;- rownames(pbmc)<\/p>\n<p>pbmc$Idents &lt;- identity<\/p>\n<p>\u5bf9\u4e0a\u8ff0\u6570\u636e\u5904\u7406\u4e00\u4e0b<\/p>\n<p># melt\u6570\u636e\u53d8\u957f<\/p>\n<p>pbmc &lt;- reshape2::melt(pbmc,<\/p>\n<p>id.vars = c(&#8220;Cell&#8221;,&#8221;Idents&#8221;),<\/p>\n<p>measure.vars = features,<\/p>\n<p>variable.name = &#8220;Feat&#8221;,<\/p>\n<p>value.name = &#8220;Expr&#8221;)<\/p>\n<p># \u67e5\u770b\u6570\u636e\u524d10\u884c<\/p>\n<p>head(pbmc, 10)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"509\" height=\"282\" class=\"wp-image-36808\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-9.png?resize=509%2C282\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-9.png?w=509 509w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-9.png?resize=300%2C166 300w\" sizes=\"(max-width: 509px) 100vw, 509px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u4e0b\u9762\u6211\u4eec\u5c31\u53bb\u7ed8\u5236\u56fe\u7247<\/p>\n<p>#\u4e3b\u9898theme\uff08\u5927\u5c0f\uff0c\u989c\u8272\uff09\uff0clegend<\/p>\n<p>p2 &lt;- ggplot(pbmc, aes(Feat, Expr, fill = Feat)) +<\/p>\n<p>geom_violin(scale = &#8220;width&#8221;, adjust = 1, trim = TRUE) +<\/p>\n<p>scale_y_continuous(expand = c(0, 0),<\/p>\n<p>position=&#8221;right&#8221;,<\/p>\n<p>labels = function(x)#\u5bf9\u4e3b\u9898\u6c34\u5e73\u7684\u8bbe\u7f6e<\/p>\n<p>c(rep(x = &#8220;&#8221;, times = length(x)-2), x[length(x) &#8211; 1], &#8220;&#8221;)) +<\/p>\n<p>facet_grid(rows = vars(Idents), scales = &#8220;free&#8221;, switch = &#8220;y&#8221;) +<\/p>\n<p>#\u4e0b\u9762\u662f\u5bf9\u4e3b\u9898\u7684\u8bbe\u7f6e<\/p>\n<p>theme_cowplot(font_size = 12) +<\/p>\n<p>theme(legend.position = &#8220;none&#8221;,<\/p>\n<p>panel.spacing = unit(0, &#8220;lines&#8221;),#\u56fe\u4e2d\u7ebf\u7684\u8bbe\u7f6e<\/p>\n<p>plot.title = element_text(hjust = 0.5),<\/p>\n<p>panel.background = element_rect(fill = NA, color = &#8220;black&#8221;),#\u989c\u8272\u586b\u5145<\/p>\n<p>plot.margin = margin(6, 6, 0, 6, &#8220;pt&#8221;),#\u56fe\u4e2d\u5c0f\u63d0\u7434\u56fe\u7684\u95f4\u8ddd<\/p>\n<p>strip.background = element_blank(),<\/p>\n<p>strip.text = element_text(face = &#8220;bold&#8221;),<\/p>\n<p>strip.text.y.left = element_text(angle = 0),<\/p>\n<p>axis.title.x = element_blank(),<\/p>\n<p>axis.ticks.x = element_blank(),<\/p>\n<p>axis.text.x = element_blank()) +<\/p>\n<p>ggtitle(&#8220;&#8221;) +#\u6dfb\u52a0\u4e3b\u9898\u540d\u5b57\uff0c\u53ef\u4ee5\u4e0d\u5199<\/p>\n<p>ylab(&#8220;Expression Level&#8221;)#Y\u8f74\u7684\u540d\u79f0<\/p>\n<p>#coord_flip()#\u53ef\u4ee5\u4fee\u6539\u6a2a\u7eb5\u5750\u6807<\/p>\n<p>p2<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"530\" height=\"587\" class=\"wp-image-36809\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-10.png?resize=530%2C587\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-10.png?w=530 530w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-10.png?resize=271%2C300 271w\" sizes=\"(max-width: 530px) 100vw, 530px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u8fd9\u4e2a\u56fe\u662f\u4e0d\u662f\u548c\u6587\u7ae0\u4e2d\u5dee\u4e0d\u591a\u4e86<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"480\" height=\"265\" class=\"wp-image-36810\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-11.png?resize=480%2C265\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-11.png?w=480 480w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-11.png?resize=300%2C166 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u4e00\u4e9b\u7ec6\u8282\u8fd8\u6ca1\u5904\u7406\u5230\u4f4d\uff0c\u5c0f\u4f19\u4f34\u8981\u662f\u9700\u8981\u5c06\u5c0f\u63d0\u7434\u53cd\u8f6c\u53ef\u4ee5\u4f7f\u7528coord_flip()<\/p>\n<p>\u6211\u4eec\u4e0b\u9762\u5bf9\u6570\u636e\u989c\u8272\u7684\u8bbe\u7f6e\u4e00\u4e0b<\/p>\n<p>spring &lt;- c(&#8220;#f6bcfd&#8221;,&#8221;#8dd3c6&#8243;,&#8221;#ffc512&#8243;,&#8221;#ffa300&#8243;,&#8221;#ff7d00&#8243;,&#8221;#ff6581&#8243;,&#8221;#f8d90d&#8221;,&#8221;#a5da6b&#8221;,&#8221;#e578d6&#8243;,&#8221;#ffd2d8&#8243;,&#8221;#90e4cd&#8221;,&#8221;#84dce0&#8243;,&#8221;#fe65b3&#8243;)<\/p>\n<p>\u5bf9\u989c\u8272\u8d4b\u503c<\/p>\n<p>library(scales)<\/p>\n<p>show_col(spring,ncol=5)#\u67e5\u770b\u4e00\u4e0b\u6709\u90a3\u4e9b\u989c\u8272<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"520\" height=\"350\" class=\"wp-image-36811\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-12.png?resize=520%2C350\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-12.png?w=520 520w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-12.png?resize=300%2C202 300w\" sizes=\"(max-width: 520px) 100vw, 520px\" data-recalc-dims=\"1\" \/><\/p>\n<p>p1 &lt;- ggplot(pbmc, aes(Feat, Expr, color = Feat, fill = Feat)) +<\/p>\n<p>geom_violin(scale = &#8220;width&#8221;, adjust = 1, trim = TRUE) +<\/p>\n<p>scale_y_continuous(expand = c(0, 0),<\/p>\n<p>position=&#8221;right&#8221;,<\/p>\n<p>labels = function(x)<\/p>\n<p>c(rep(x = &#8220;&#8221;, times = length(x)-2), x[length(x) &#8211; 1], &#8220;&#8221;)) +<\/p>\n<p>facet_grid(rows = vars(Idents), scales = &#8220;free&#8221;, switch = &#8220;y&#8221;) +<\/p>\n<p>theme_cowplot(font_size = 12) +<\/p>\n<p>theme(legend.position = &#8220;none&#8221;,<\/p>\n<p>panel.spacing = unit(0, &#8220;lines&#8221;),<\/p>\n<p>plot.title = element_text(hjust = 0.5),<\/p>\n<p>panel.background = element_rect(fill = NA, color = &#8220;black&#8221;),<\/p>\n<p>plot.margin = margin(6, 6, 0, 6, &#8220;pt&#8221;),<\/p>\n<p>strip.background = element_blank(),<\/p>\n<p>strip.text = element_text(face = &#8220;bold&#8221;),<\/p>\n<p>strip.text.y.left = element_text(angle = 0),<\/p>\n<p>axis.title.x = element_blank(),<\/p>\n<p>axis.ticks.x = element_blank(),<\/p>\n<p>axis.text.x = element_blank()) +<\/p>\n<p>ggtitle(&#8220;&#8221;) +<\/p>\n<p>ylab(&#8220;Expression Level&#8221;) +<\/p>\n<p>scale_fill_manual(values = spring) +<\/p>\n<p>scale_color_manual(values = spring)<\/p>\n<p>\u548c\u4e0a\u8ff0\u4ee3\u7801\u4e00\u6837\uff0c\u5c0f\u4f19\u4f34\u591a\u591a\u7406\u89e3\u4e00\u4e0b<\/p>\n<p>p1<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"529\" height=\"586\" class=\"wp-image-36812\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-13.png?resize=529%2C586\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-13.png?w=529 529w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-13.png?resize=271%2C300 271w\" sizes=\"(max-width: 529px) 100vw, 529px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u989c\u8272\u53ef\u80fd\u6ca1\u505a\u5230\u4e00\u6837\uff0c\u4f46\u662f\u4e5f\u633a\u597d\u770b\uff0c\u90a3\u4e48\u8fd9\u4e24\u4e2a\u56fe\u6211\u4eec\u90fd\u7ed8\u5236\u5b8c\u6210\u4e86\uff0c\u6211\u4eec\u5c31\u53bb\u7ec4\u5408\u4e00\u4e0b\u8fd9\u4e24\u4e2a\u56fe\uff0c\u6765\u770b\u770b\u6700\u7ec8\u7684\u6b65\u9aa4<\/p>\n<p>plot_grid(p1,p, align =&#8221;h&#8221;, axis=&#8221;bt&#8221;, rel_widths = c(2,7))<\/p>\n<p>rel_widths\u8fd9\u4e2a\u53ef\u4ee5\u8bbe\u7f6e\u4e24\u4e2a\u7ec4\u7ec4\u5408\u7684\u6bd4\u4f8b<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"265\" class=\"wp-image-36813\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-14.png?resize=640%2C265\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-14.png?w=1269 1269w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-14.png?resize=300%2C124 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-14.png?resize=1024%2C424 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-14.png?resize=768%2C318 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/04\/word-image-36799-14.png?resize=600%2C248 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u597d\u4e86\uff0c\u6211\u4eec\u7684\u7ec4\u5408\u56fe\u5c31\u7ed8\u5236\u5b8c\u6210\u4e86<\/p>\n<p>\u5bf9\u4e8e\u4e0a\u8ff0\u7684\u6570\u636e\uff0c\u5c0f\u4f19\u4f34\u53ef\u4ee5\u4f7f\u7528\u81ea\u5df1\u7684\u6570\u636e\u53bb\u8bbe\u7f6e\u4e00\u4e0b\uff0c\u8981\u591a\u591a\u7406\u89e3\u4ee3\u7801\u7684\u610f\u601d\uff0c\u5176\u5b9e\u8bb8\u591a\u9ad8\u5206\u6587\u7ae0\u4e2d\u7684\u56fe\u7247\u90fd\u662f\u4e00\u6b65\u4e00\u6b65\u7ec4\u5408\u800c\u6765\u7684\uff0c\u7406\u89e3\u4ee3\u7801\u7684\u610f\u601d\uff0c\u628a\u81ea\u5df1\u7684\u56fe\u7ed8\u5236\u9ad8\u7ea7\u8d77\u6765\uff0c\u5c0f\u4f19\u4f34\u5feb\u53bb\u52a8\u624b\u8bd5\u8bd5\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0f\u56fe\u6700\u8fd1\u9605\u8bfb\u6587\u732e\u65f6\u5019\u53d1\u73b0\u6709\u5173\u5355\u7ec6\u80de\u5206\u6790\u662f\u8d8a\u6765\u8d8a\u591a\uff0c\u5e76\u4e14\u8bb8\u591a\u9ad8\u5206\u6587\u7ae0\u4e2d\u7684\u5355\u7ec6\u80de\u56fe\u90fd\u975e\u5e38\u7684\u597d\u770b\u3002\u5c0f\u56fe\u5c31\u7a81\u53d1\u5947\u60f3\u60f3\u53bb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","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\/36799"}],"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=36799"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/36799\/revisions"}],"predecessor-version":[{"id":46774,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/36799\/revisions\/46774"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36799"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}