{"id":30341,"date":"2024-02-29T15:03:19","date_gmt":"2024-02-29T07:03:19","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=30341"},"modified":"2024-02-29T15:03:20","modified_gmt":"2024-02-29T07:03:20","slug":"%e9%b2%9c%e6%b4%bb%e7%9a%84%e7%83%ad%e5%9b%be%ef%bc%8c%e8%af%a0%e9%87%8a%e5%85%8d%e7%96%ab%e7%bb%86%e8%83%9e%e7%bb%84%e6%88%90%ef%bc%9a%e4%bd%bf%e7%94%a8cibersort%e5%b9%b6%e5%ae%9e%e7%8e%b0%e5%8f%af","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=30341","title":{"rendered":"\u9c9c\u6d3b\u7684\u70ed\u56fe\uff0c\u8be0\u91ca\u514d\u75ab\u7ec6\u80de\u7ec4\u6210\uff1a\u4f7f\u7528CIBERSORT\u5e76\u5b9e\u73b0\u53ef\u89c6\u5316\u5206\u6790\uff01"},"content":{"rendered":"<p><strong>\u9c9c\u6d3b\u7684\u70ed\u56fe\uff0c\u8be0\u91ca\u514d\u75ab\u7ec6\u80de\u7ec4\u6210\uff1a\u4f7f\u7528CIBERSORT\u5e76\u5b9e\u73b0\u53ef\u89c6\u5316\u5206\u6790\uff01<\/strong><\/p>\n<p>\u57fa\u4e8e\u4e4b\u524d\u5bf9CIBERSORT\u8f6f\u4ef6\u5305\u7684\u4ecb\u7ecd\u548c\u4f7f\u7528\uff0c\u4eca\u5929\u5c0f\u679c\u8981\u6559\u5927\u5bb6\u5982\u4f55\u5728\u4f7f\u7528CIBERSORT\u5305\u7684\u524d\u63d0\u4e0b\u5bf9\u5176\u7ed3\u679c\u8fdb\u884c\u53ef\u89c6\u5316\uff0c\u53ef\u89c6\u5316\u6211\u4eec\u8981\u7528\u5230\u7684R\u5305\u4e3b\u8981\u4e3aggplot2\uff0c\u611f\u5174\u8da3\u7684\u8bdd\u5c31\u548c\u5c0f\u679c\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u5427\uff01<\/p>\n<p><strong>\u51c6\u5907\u5de5\u4f5c\u53ca\u514d\u75ab\u7ec6\u80de\u5206\u6790<\/strong><\/p>\n<p>\u8fd9\u4e00\u90e8\u5206\u5176\u5b9e\u5728\u4e4b\u524d\u5c0f\u679c\u5df2\u7ecf\u7ed9\u5927\u5bb6\u505a\u8fc7\u8be6\u7ec6\u7684\u4ecb\u7ecd\uff0c\u5728\u8fd9\u91cc\u6211\u4eec\u518d\u6b21\u7b80\u5355\u7684\u56de\u987e\u4e00\u4e0b\u5427\uff01\u8fd9\u4e00\u6b65\u6211\u4eec\u4e3b\u8981\u8981\u505a\u7684\u5de5\u4f5c\u6709\uff1a<\/p>\n<ul>\n<li>\n    \u5b89\u88c5\u4ee5\u4e0b R \u5e93\uff1aggplot2, ggpubr, reshape2, dplyr, CIBERSORT\uff1b<\/li>\n<li>\n    \u4e0b\u8f7d LM22.txt\u6570\u636e\u96c6 \u548c TCGA deg_fpkm.tsv \u6570\u636e\u6587\u4ef6\uff1b<\/li>\n<li>\n    \u4ece LM22.txt \u548c TCGA deg_fpkm.tsv \u6587\u4ef6\u4e2d\u8bfb\u53d6\u57fa\u56e0\u8868\u8fbe\u6570\u636e\uff1b<\/li>\n<li>\n    \u4f7f\u7528 CIBERSORT \u5e93\u5bf9\u57fa\u56e0\u8868\u8fbe\u6570\u636e\u8fdb\u884c\u514d\u75ab\u7ec6\u80de\u7c7b\u578b\u7684\u5206\u6790\uff0c\u5e76\u4f7f\u7528 CIBERSORT \u51fd\u6570\u8ba1\u7b97\u51fa\u5404\u79cd\u514d\u75ab\u7ec6\u80de\u7c7b\u578b\u7684\u6bd4\u4f8b\uff1b<\/li>\n<li>\n    \u5c06 CIBERSORT \u8ba1\u7b97\u7ed3\u679c\u8f93\u51fa\u5230\u6587\u4ef6\u4e2d<\/li>\n<\/ul>\n<p>library(ggplot2)<\/p>\n<p>library(reshape2)<\/p>\n<p>library(ggpubr)<\/p>\n<p>library(dplyr)<\/p>\n<p>\u200b<\/p>\n<p>lm22.file &lt;- &#8220;LM22.txt&#8221;<\/p>\n<p>rawdata_file.file&lt;-&#8220;TCGA deg_fpkm.tsv&#8221;<\/p>\n<p>cibersort_file &lt;-  &#8220;TCGA cibersort.txt&#8221;<\/p>\n<p>library(&#8216;CIBERSORT&#8217;)<\/p>\n<p>#\u8ba1\u7b97\u514d\u75ab\u7ec6\u80de<\/p>\n<p>TCGA_TME.results &lt;- CIBERSORT(lm22.file ,rawdata_file.file, perm = 50, QN = F)<\/p>\n<p>TCGA_TME.results<\/p>\n<p>write.csv(TCGA_TME.results, &#8220;TCGA_CIBERSORT_Results_fromRcode.csv&#8221;)<\/p>\n<p>\u73b0\u5728\uff0c\u4f60\u5df2\u7ecf\u6210\u529f\u5b8c\u6210\u4e86\u514d\u75ab\u7ec6\u80de\u7c7b\u578b\u5206\u6790\u54e6\uff01\u600e\u4e48\u6837\uff0c\u662f\u4e0d\u662f\u5f88\u7b80\u5355\u5462\uff01<\/p>\n<p><strong>\u5c06CIBERSORT\u7684\u8f93\u51fa\u6570\u636e\u8fdb\u884c\u6574\u7406\uff0c\u4ee5\u9002\u5e94ggplot2\u7684\u7ed8\u56fe\u8981\u6c42<\/strong><\/p>\n<p>data &lt;- t(TCGA_TME.results[,-c(9:11)])<\/p>\n<p>col=rainbow(nrow(data),s=0.85,v=0.85)<\/p>\n<p>df.long &lt;- reshape2::melt(data, value.name=&#8217;abundance&#8217;, variable.name=&#8217;group&#8217;)<\/p>\n<p><strong>\u4f7f\u7528ggplot2\u5305\u751f\u6210\u70ed\u56fe<\/strong><\/p>\n<p>ggplot(df.long, aes(x=Var2, y=abundance, group=Var1)) +<\/p>\n<p>theme_classic()+<\/p>\n<p>geom_bar(stat=&#8221;identity&#8221;, \u00a0position=&#8221;fill&#8221;, aes(fill=Var1))+<\/p>\n<p>scale_y_continuous(labels = scales::percent) +<\/p>\n<p>labs(x=&#8221;,y=&#8217;Relative Percent&#8217;,title=&#8217;Immune Cell Subset Proportions&#8217;)+<\/p>\n<p>scale_fill_manual(values =col)+<\/p>\n<p>theme( panel.grid=element_blank(),legend.title=element_blank(),<\/p>\n<p>plot.title = element_text(hjust = 0.5),<\/p>\n<p>axis.text.x = element_text(angle =90))<\/p>\n<p>\u751f\u6210\u7684\u7ed3\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<strong><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"269\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?resize=640%2C269\" class=\"wp-image-30342\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?w=2500 2500w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?resize=300%2C126 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?resize=1024%2C430 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?resize=768%2C323 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?resize=1536%2C646 1536w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?resize=2048%2C861 2048w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?resize=600%2C252 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?w=1280 1280w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-30341-1.png?w=1920 1920w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/strong><\/p>\n<p><strong>\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3aPDF\u683c\u5f0f<\/strong><\/p>\n<p>ggsave(&#8220;cibersort_barplot.pdf&#8221;,height=10,width=25)<\/p>\n<p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528reshape2\u5305\u7684melt\u51fd\u6570\u5c06CIBERSORT\u7684\u8f93\u51fa\u6570\u636e\u8fdb\u884c\u6574\u7406\uff0c\u751f\u6210\u957f\u683c\u5f0f\u7684\u6570\u636e\u6846\u3002\u7136\u540e\uff0c\u6211\u4eec\u4f7f\u7528ggplot2\u5305\u7684geom_bar\u51fd\u6570\u751f\u6210\u5806\u79ef\u6761\u5f62\u56fe\uff0c\u5e76\u4f7f\u7528scale_fill_manual\u51fd\u6570\u8bbe\u7f6e\u989c\u8272\uff0ctheme\u51fd\u6570\u8bbe\u7f6e\u6837\u5f0f\uff0clabs\u51fd\u6570\u8bbe\u7f6e\u56fe\u50cf\u6807\u9898\u548c\u8f74\u6807\u7b7e\u3002\u6700\u540e\uff0c\u6211\u4eec\u4f7f\u7528ggsave\u51fd\u6570\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3aPDF\u683c\u5f0f\u3002<\/p>\n<p>\u5230\u6b64\u4e3a\u6b62\uff0c\u6211\u4eec\u5df2\u7ecf\u6210\u529f\u5730\u5b8c\u6210\u4e86\u514d\u75ab\u7ec6\u80de\u6bd4\u4f8b\u5206\u6790\uff0c\u5e76\u53ef\u89c6\u5316\u4e86\u7ed3\u679c\u3002\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u5206\u6790\u7ed3\u679c\u6765\u8fdb\u4e00\u6b65\u7814\u7a76\u514d\u75ab\u7ec6\u80de\u5728\u80bf\u7624\u7ec4\u7ec7\u4e2d\u7684\u4f5c\u7528\u548c\u673a\u5236\uff0c\u4e3a\u80bf\u7624\u514d\u75ab\u6cbb\u7597\u63d0\u4f9b\u79d1\u5b66\u4f9d\u636e\u548c\u6307\u5bfc\uff01\u600e\u4e48\u6837\uff0c\u4eca\u5929\u7684\u70ed\u56fe\u7ed8\u5236\u4f60\u5b66\u4f1a\u600e\u4e48\u7528\u4e86\u5417\uff01<\/p>\n<p>\u66f4\u591a\u5b66\u4e60\u8d44\u6e90\u8bf7\u5927\u5bb6\u79fb\u6b65\u5c0f\u679c\u4e13\u5c5e\u4e91\u751f\u4fe1\u5e73\u53f0\u641c\u7d22\u66f4\u591a\u8d44\u6e90\u54e6\uff01<\/p>\n<p><strong>\u5c0f\u679c\u4e13\u5c5e\u4e91\u751f\u4fe1\u5e73\u53f0\uff1a<\/strong><a href=\"http:\/\/www.biocloudservice.com\/home.html\">\u4e91\u751f\u4fe1 \u00a0&#8211; \u5b66\u751f\u7269\u4fe1\u606f\u5b66 (biocloudservice.com)<\/a><\/p>\n<p>\u4e91\u751f\u4fe1\u5e73\u53f0\u4e5f\u6709\u514d\u75ab\u4e13\u7248\u7684\u5b66\u4e60\u6a21\u5757\u54e6\uff0c\u5feb\u6765\u627e\u5230\u4f60\u60f3\u5b66\u4e60\u7684\u4e13\u5c5e\u6a21\u5757\u5427\uff01<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"239\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-131.png?resize=640%2C239\" class=\"wp-image-30343\" alt=\"\u8868\u683c\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-131.png?w=895 895w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-131.png?resize=300%2C112 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-131.png?resize=768%2C287 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/unnamed-file-131.png?resize=600%2C224 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9c9c\u6d3b\u7684\u70ed\u56fe\uff0c\u8be0\u91ca\u514d\u75ab\u7ec6\u80de\u7ec4\u6210\uff1a\u4f7f\u7528CIBERSORT\u5e76\u5b9e\u73b0\u53ef\u89c6\u5316\u5206\u6790\uff01 \u57fa\u4e8e\u4e4b\u524d\u5bf9CIBERSORT\u8f6f\u4ef6\u5305\u7684\u4ecb [&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\/30341"}],"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=30341"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/30341\/revisions"}],"predecessor-version":[{"id":30348,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/30341\/revisions\/30348"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30341"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}