{"id":28251,"date":"2024-02-06T10:18:53","date_gmt":"2024-02-06T02:18:53","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=28251"},"modified":"2024-02-06T10:18:54","modified_gmt":"2024-02-06T02:18:54","slug":"%e6%83%b3%e6%8f%90%e9%ab%98%e5%8d%95%e7%bb%86%e8%83%9e%e6%b3%a8%e9%87%8a%e5%87%86%e7%a1%ae%e5%ba%a6%ef%bc%9f%e6%89%8b%e5%8a%a8%e6%a0%a1%e6%ad%a3%e9%aa%8c%e8%af%81%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=28251","title":{"rendered":"\u60f3\u63d0\u9ad8\u5355\u7ec6\u80de\u6ce8\u91ca\u51c6\u786e\u5ea6\uff1f\u201c\u624b\u52a8\u6821\u6b63+\u9a8c\u8bc1\u5206\u6790\u201d\u5fc5\u4e0d\u53ef\u5c11\uff01"},"content":{"rendered":"<p>\u5728\u8fdb\u884c\u5355\u4e2a\u7ec6\u80de\u6c34\u5e73\u7684\u5206\u6790\u65f6\uff0c\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u6d4b\u5e8f\u6280\u672f\u662f\u975e\u5e38\u4fbf\u5229\u9ad8\u6548\u7684\u4e00\u79cd\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u901a\u8fc7\u6d4b\u91cf\u5355\u4e2a\u7ec6\u80de\u4e2d\u6240\u6709\u57fa\u56e0\u7684\u8868\u8fbe\u6c34\u5e73\uff0c\u4ece\u800c\u8bfb\u53d6\u7ec6\u80de\u7684\u201c\u65e5\u8bb0\u201d\uff0c\u8fd9\u6837\u6211\u4eec\u5c31\u53ef\u4ee5\u5f88\u5bb9\u6613\u7684\u77e5\u9053\u7ec6\u80de\u5728\u505a\u4ec0\u4e48\uff0c\u60f3\u4ec0\u4e48\uff0c\u611f\u53d7\u4ec0\u4e48\uff0c\u4ee5\u53ca\u5176\u751f\u547d\u6d3b\u52a8\u548c\u4ec0\u4e48\u6709\u8054\u7cfb\u3002<\/p>\n<p>\u800c\u5728\u8fdb\u884c\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u6d4b\u5e8f\u5206\u6790\u7684\u65f6\u5019\uff0c\u6211\u4eec\u5e38\u5e38\u7ed5\u4e0d\u5f00\u7ed9\u7ec6\u80de\u8fdb\u884c\u6ce8\u91ca\u8fd9\u4e00\u6b65\u9aa4\uff0c\u4e5f\u5c31\u662f\u6839\u636e\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u6570\u636e\uff0c\u5bf9\u4e0d\u540c\u7684\u7ec6\u80de\u805a\u7c7b\u8fdb\u884c\u7ec6\u80de\u7c7b\u578b\u7684\u6807\u8bc6\u548c\u547d\u540d\uff0c\u8fd9\u4e00\u6b65\u4e2d\u901a\u5e38\u4f7f\u7528\u7684\u662f\u81ea\u52a8\u6ce8\u91ca\uff0c \u5bf9\u81ea\u52a8\u6ce8\u91ca\u800c\u8a00\uff0c\u662f\u4e00\u79cd\u5229\u7528\u7b97\u6cd5\u548c\u9002\u5f53\u7684\u5148\u9a8c\u751f\u7269\u5b66\u77e5\u8bc6\u5bf9\u7ec6\u80de\u6216\u7ec6\u80de\u7c07\u8fdb\u884c\u6807\u8bb0\u7684\u65b9\u6cd5\uff0c\u8fd9\u79cd\u65b9\u6cd5\u867d\u7136\u9ad8\u901f\u6709\u6548\uff0c\u5374\u5b58\u5728\u9519\u8bef\u6ce8\u91ca\u7684\u53ef\u80fd\u6027\u3002<\/p>\n<p>\u57fa\u51c6\u7814\u7a76\u8868\u660e\uff0c\u81ea\u52a8\u6ce8\u91ca\u5de5\u5177\u7684\u6027\u80fd\u662f\u5904\u4e8e\u53d8\u5316\u4e2d\u7684\uff0c\u5b83\u7684\u7cbe\u51c6\u5ea6\u53d6\u51b3\u4e8e\u88ab\u6ce8\u91ca\u7ec6\u80de\u7c7b\u578b\u7684\u6570\u636e\u96c6\u548c\u57fa\u56e0\u8868\u8fbe\u8c31\u7684\u72ec\u7279\u6027\uff0c\u6bd4\u5982\u8bf4\uff0c\u4f7f\u7528\u81ea\u52a8\u6ce8\u91ca\u533a\u5206T\u7ec6\u80de\u548cB\u7ec6\u80de\u76f8\u5bf9\u7b80\u5355\uff0c\u4f46\u4f7f\u7528\u81ea\u52a8\u6ce8\u91ca\u5de5\u5177\u533a\u5206CD8+\u7ec6\u80de\u6bd2\u6027T\u7ec6\u80de\u548c\u81ea\u7136\u6740\u4f24\u7ec6\u80de\u5374\u6bd4\u8f83\u56f0\u96be\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u5bf9\u81ea\u52a8\u6ce8\u91ca\u8fdb\u884c\u624b\u52a8\u6539\u8fdb\u4ee5\u53ca\u9a8c\u8bc1\u5206\u6790\uff0c\u4ece\u800c\u8ba9\u6211\u4eec\u7684\u6ce8\u91ca\u7ed3\u679c\u66f4\u52a0\u51c6\u786e\u53ef\u4fe1\u3002\u672c\u6b21\u4ee3\u7801\u7684\u6570\u636e\u91cf\u504f\u5927\uff0c\u6b22\u8fce\u5927\u5bb6\u6765\u79df\u8d41\u6211\u4eec\u7684\u670d\u52a1\u5668\u54e6\uff0c\u5173\u6ce8\u516c\u4f17\u53f7\u8fd8\u53ef\u4ee5\u83b7\u5f97\u72ec\u7279\u7684\u751f\u4fe1\u5206\u6790\u601d\u8def\u5b9a\u5236~<\/p>\n<p>\u63a5\u4e0b\u6765\u5c0f\u679c\u5c06\u4ece\u5934\u5f00\u59cb\uff0c\u5e26\u7740\u5c0f\u4f19\u4f34\u4eec\u4e00\u8d77\u5b8c\u6210\u5355\u7ec6\u80de\u6ce8\u91ca\u7684\u6574\u4e2a\u8fc7\u7a0b~\u672c\u6b21\u6559\u7a0b\u6211\u4eec\u4f7f\u7528\u7684\u662f\u7ec6\u80de\u662f\uff1aPeripheral blood mononuclear cells\uff08PBMC\uff09\u3002\u8fd9\u662f\u5916\u5468\u8840\u4e2d\u5177\u6709\u5355\u4e2a\u6838\u7684\u7ec6\u80de\u7684\u6df7\u5408\u7fa4\u4f53\uff0c\u662f\u514d\u75ab\u7ec6\u80de\u7684\u4e30\u5bcc\u6765\u6e90\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u7eaf\u5316\u5206\u79bb\u51fa\u591a\u4e2a\u7ec6\u80de\u7c7b\u578b\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"466\" class=\"wp-image-28252\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-1.png?resize=640%2C466\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-1.png?w=1276 1276w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-1.png?resize=300%2C219 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-1.png?resize=1024%2C746 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-1.png?resize=768%2C560 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-1.png?resize=600%2C437 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u5982\u56fe\uff0c\u662f\u672c\u6b21\u6240\u9700\u5f97\u57fa\u56e0\u6587\u4ef6\u3002\u53e6\u5916\u672c\u6b21\u5206\u6790\u6240\u9700\u7684R\u7248\u672c\u4ee5\u53caR\u5305\u7248\u672c\u5c0f\u679c\u4e5f\u5e2e\u5927\u5bb6\u6574\u7406\u597d\u4e86~<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"154\" class=\"wp-image-28253\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-2.png?resize=640%2C154\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-2.png?w=1268 1268w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-2.png?resize=300%2C72 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-2.png?resize=1024%2C247 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-2.png?resize=768%2C185 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-2.png?resize=600%2C145 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>Step 1 \u5b89\u88c5R\u5305<\/p>\n<p>install.packages(c(&#8220;BiocManager&#8221;,&#8221;Seurat&#8221;,&#8221;SCINA&#8221;,&#8221;ggplot2&#8243;,&#8221;devtools&#8221;,&#8221;shiny&#8221;))<\/p>\n<p>BiocManager::install(c(&#8220;SingleCellExperiment&#8221;,&#8221;scater&#8221;,&#8221;dplyr&#8221;, &#8220;scmap&#8221;,<\/p>\n<p>&#8220;celldex&#8221;,&#8221;SingleR&#8221;,&#8221;GSVA&#8221;,&#8221;S4Vectors&#8221;, &#8220;SummarizedExperiment&#8221;))<\/p>\n<p>devtools::install_github(&#8220;immunogenomics\/harmony&#8221;)<\/p>\n<p>devtools::install_github(&#8220;romanhaa\/cerebroApp&#8221;)<\/p>\n<p>devtools::install_github(&#8220;mw201608\/msigdb&#8221;)<\/p>\n<p>Step 2 \u57fa\u4e8e\u53c2\u8003\u7684\u81ea\u52a8\u6ce8\u91ca<\/p>\n<p>#\u4eceGEO\u6570\u636e\u5e93\u4e0b\u8f7d\u6570\u636e\uff08\u7531\u4e8e\u5df2\u7ecf\u4e0b\u8f7d\u597d\u4e86\u6240\u4ee5\u76f4\u63a5\u5bfc\u5165\u6587\u4ef6\u5373\u53ef\uff09<\/p>\n<p>set.seed(9742)<\/p>\n<p>ref &lt;- readRDS(&#8220;..\/data\/data_DICE.RData&#8221;)<\/p>\n<p>\uff03\u683c\u5f0f\u5316\u6570\u636e\uff0c\u786e\u4fdd\u4e0e\u6b63\u5728\u4f7f\u7528\u7684\u5de5\u5177\u517c\u5bb9\uff0c\u8fd9\u91cc\u4f7f\u7528\u7684\u662fscmap<\/p>\n<p># \u5728\u540d\u4e3a\u201ccell_type1\u201d\u7684\u5217\u4e2d\u5206\u914d\u5355\u5143\u683c\u7c7b\u578b\u6807\u7b7e<\/p>\n<p>SummarizedExperiment::colData(ref)$cell_type1 &lt;- SummarizedExperiment::colData(ref)$label.fine<\/p>\n<p># \u5728\u540d\u4e3a\u201cfeature_symbol\u201d\u7684\u5217\u4e2d\u5206\u914d\u57fa\u56e0\u540d\u79f0<\/p>\n<p>SummarizedExperiment::rowData(ref)$feature_symbol &lt;- rownames(ref)<\/p>\n<p># \u5c06\u6570\u636e\u8f6c\u6362\u4e3aSingleCellExperiment\u5bf9\u8c61<\/p>\n<p>ref_sce &lt;- SingleCellExperiment::SingleCellExperiment(assays=list(logcounts=Matrix::Matrix(SummarizedExperiment::assays(ref)$logcounts)),<\/p>\n<p>colData=SummarizedExperiment::colData(ref),<\/p>\n<p>rowData=SummarizedExperiment::rowData(ref))<\/p>\n<p>\u8fd9\u6837\u53c2\u8003\u6570\u636e\u5c31\u53ef\u4ee5\u4f7f\u7528\u4e86\uff0c\u7136\u540e\u6211\u4eec\u9700\u8981\u5904\u7406\u8fd9\u4e9b\u6570\u636e\u6765\u6784\u5efa\u5c06\u7528\u6765\u5c06\u672a\u6807\u8bb0\u6570\u636e\u6620\u5c04\u7684\u7d22\u5f15\u3002 \u9996\u5148\uff0c\u6211\u4eec\u9009\u62e9\u8981\u4f7f\u7528\u7684\u57fa\u56e0\uff0c\u8fd9\u4e9b\u57fa\u56e0\u5c06\u662f\u5728\u901a\u8fc7\u57fa\u56e0\u4e22\u5931\u5206\u5e03\u5c06\u7ebf\u6027\u6a21\u578b\u62df\u5408\u5230\u57fa\u56e0\u8868\u8fbe\u540e\u88ab scmap \u68c0\u7d22\u7684\u8ba4\u4e3a\u6700\u5177\u4fe1\u606f\u6027\u7684\u57fa\u56e0\uff0c\u4fe1\u606f\u6700\u4e30\u5bcc\u7684\u7ec6\u80de\u5177\u6709\u9ad8\u8868\u8fbe\u503c\u548c\u4f4e\u4e22\u5931\u7387\u3002<\/p>\n<p>#\u9996\u5148\u9009\u62e9\u4fe1\u606f\u6700\u4e30\u5bcc\u7684\u7279\u5f81\u6765\u521b\u5efa scmap-cluster \u53c2\u8003<\/p>\n<p>ref_sce &lt;- scmap::selectFeatures(ref_sce, suppress_plot=FALSE)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"398\" class=\"wp-image-28254\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-3.png?resize=640%2C398\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-3.png?w=1175 1175w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-3.png?resize=300%2C187 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-3.png?resize=1024%2C637 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-3.png?resize=768%2C478 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-3.png?resize=600%2C373 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u5982\u56fe\u662f\u901a\u8fc7\u53ef\u89c6\u5316\u6765\u5c55\u793a\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u6570\u636e\u7684\u8d28\u91cf\u63a7\u5236\uff0c\u7279\u5f81\u9009\u62e9\u7684\u7ed3\u679c\u3002log2(Expression)\u8868\u793a\u6bcf\u4e2a\u7279\u5f81\u7684\u5e73\u5747\u8868\u8fbe\u6c34\u5e73\uff0clog2(% of dropouts)\u8868\u793a\u6bcf\u4e2a\u7279\u5f81\u5728\u591a\u5c11\u6bd4\u4f8b\u7684\u7ec6\u80de\u4e2d\u6ca1\u6709\u88ab\u68c0\u6d4b\u5230\u3002\u56fe\u4e2d\u7684\u7ea2\u8272\u70b9\u5c31\u662f\u6839\u636e\u6807\u51c6\u7b97\u6cd5\u9009\u62e9\u51fa\u6765\u7684\u7279\u5f81\uff0c\u800c\u84dd\u8272\u70b9\u662f\u88ab\u6392\u9664\u7684\u7279\u5f81\u3002<\/p>\n<p>#\u68c0\u67e5 scmap \u9009\u62e9\u7684\u524d 50 \u4e2a\u57fa\u56e0<\/p>\n<p>rownames(ref_sce)[which(SummarizedExperiment::rowData(ref_sce)$scmap_features)][1:50]<\/p>\n<p>\u5982\u56fe\uff0c\u662f\u6211\u4eec\u7b5b\u9009\u7684\u524d <img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"220\" class=\"wp-image-28255\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-4.png?resize=640%2C220\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-4.png?w=860 860w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-4.png?resize=300%2C103 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-4.png?resize=768%2C263 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-4.png?resize=600%2C206 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/> 50\u4e2a\u57fa\u56e0<\/p>\n<p>#\u901a\u8fc7\u68c0\u67e5\u57fa\u56e0\u540d\u79f0\u5411\u91cf\u7684\u957f\u5ea6\u6765\u68c0\u67e5\u9009\u62e9\u4e86\u591a\u5c11\u4e2a\u57fa\u56e0<\/p>\n<p>length(rownames(ref_sce)[which(SummarizedExperiment::rowData(ref_sce)$scmap_features)])<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"34\" class=\"wp-image-28256\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-5.png?resize=640%2C34\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-5.png?w=1270 1270w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-5.png?resize=300%2C16 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-5.png?resize=1024%2C54 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-5.png?resize=768%2C41 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-5.png?resize=600%2C32 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u73b0\u5728\u6211\u4eec\u53ef\u4ee5\u770b\u5230 scmap \u9009\u62e9\u4f7f\u7528\u7684\u57fa\u56e0\u3002 \u5982\u679c\u7f3a\u5c11\u5173\u952e\u6807\u8bb0\u57fa\u56e0\uff0c\u6211\u4eec\u53ef\u4ee5\u786e\u4fdd\u5c06\u5b83\u4eec\u5305\u542b\u5728\u5185\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p>#\u521b\u5efa\u8981\u4f7f\u7528\u7684\u5173\u952e\u6807\u8bb0\u7684\u5217<\/p>\n<p>my_key_markers = c(&#8220;TRAC&#8221;, &#8220;TRBC1&#8221;, &#8220;TRBC2&#8221;, &#8220;TRDC&#8221;, &#8220;TRGC1&#8221;, &#8220;TRGC2&#8221;, &#8220;IGKC&#8221;)<\/p>\n<p># \u786e\u4fdd\u6807\u8bb0\u4f4d\u4e8e scmap \u4f7f\u7528\u7684\u529f\u80fd\u5217\u8868\u4e2d<\/p>\n<p>SummarizedExperiment::rowData(ref_sce)$scmap_features[rownames(ref_sce) %in% my_key_markers] &lt;- TRUE<\/p>\n<p># \u901a\u8fc7\u518d\u6b21\u68c0\u67e5\u57fa\u56e0\u540d\u79f0\u5411\u91cf\u7684\u957f\u5ea6\u6765\u68c0\u67e5\u662f\u5426\u6dfb\u52a0\u4e86\u4efb\u4f55\u57fa\u56e0\u957f\u5ea6<\/p>\n<p>length(rownames(ref_sce)[which(SummarizedExperiment::rowData(ref_sce)$scmap_features)])<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"29\" class=\"wp-image-28257\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-6.png?resize=640%2C29\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-6.png?w=1270 1270w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-6.png?resize=300%2C13 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-6.png?resize=1024%2C46 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-6.png?resize=768%2C34 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-6.png?resize=600%2C27 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u5220\u9664\u53ef\u80fd\u662f\u6280\u672f\u4ea7\u7269\u7684\u57fa\u56e0\uff0c\u4f8b\u5982\u7ebf\u7c92\u4f53 RNA\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p># \u4ece\u6570\u636e\u96c6\u4e2d\u521b\u5efa\u7ebf\u7c92\u4f53\u57fa\u56e0\u5217\u8868\uff08\u4ee5\u201cMT\u201d\u5f00\u5934\u7684\u57fa\u56e0\uff09<\/p>\n<p>mt_genes &lt;- rownames(ref_sce)[grep(&#8220;^MT-&#8220;, rownames(ref_sce))]<\/p>\n<p># \u4ece scmap \u4f7f\u7528\u7684\u7279\u5f81\u4e2d\u5220\u9664\u8fd9\u4e9b\u57fa\u56e0<\/p>\n<p>SummarizedExperiment::rowData(ref_sce)$scmap_features[rownames(ref_sce) %in% mt_genes] &lt;- FALSE<\/p>\n<p># \u68c0\u67e5\u6709\u591a\u5c11\u4e2a\u57fa\u56e0<\/p>\n<p>length(rownames(ref_sce)[which(SummarizedExperiment::rowData(ref_sce)$scmap_features)])<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"30\" class=\"wp-image-28258\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-7.png?resize=640%2C30\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-7.png?w=1269 1269w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-7.png?resize=300%2C14 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-7.png?resize=1024%2C48 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-7.png?resize=768%2C36 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-7.png?resize=600%2C28 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>#\u63d0\u53d6\u7279\u5f81\u5e76\u5c06\u5176\u5206\u914d\u7ed9\u65b0\u53d8\u91cf\u201cscmap_feature_genes\u201d<\/p>\n<p>scmap_feature_genes &lt;- rownames(ref_sce)[which(SummarizedExperiment::rowData(ref_sce)$scmap_features)]<\/p>\n<p>#\u57fa\u56e0\/\u7279\u5f81\u7684\u6570\u91cf\u4e0e\u6211\u4eec\u521a\u521a\u68c0\u67e5\u7684\u76f8\u540c<\/p>\n<p>length(scmap_feature_genes)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"30\" class=\"wp-image-28259\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-8.png?resize=640%2C30\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-8.png?w=1269 1269w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-8.png?resize=300%2C14 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-8.png?resize=1024%2C48 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-8.png?resize=768%2C36 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-8.png?resize=600%2C28 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u73b0\u5728\u6211\u4eec\u6784\u5efa scmap-cluster \u4e2d\u4f7f\u7528\u7684\u53c2\u8003\u914d\u7f6e\u6587\u4ef6\uff0c\u7528\u4e8e\u57fa\u4e8e\u7c07\u7684\u7ec6\u80de\u7c7b\u578b\u6ce8\u91ca\u3002\u6211\u4eec \u53ef\u4ee5\u4ece SingleCellExperiment \u5bf9\u8c61\u5185\u90e8\u8bbf\u95ee\u548c\u7ed8\u5236\u8fd9\u4e9b\u914d\u7f6e\u6587\u4ef6\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p># \u521b\u5efa\u53c2\u8003\u8d44\u6599\uff1b<\/p>\n<p># \u751f\u6210\u53c2\u8003\u914d\u7f6e\u6587\u4ef6\u540e\uff0cscmap-cluster \u4e0d\u9700\u8981\u539f\u59cb\u6570\u636e<\/p>\n<p>ref_sce &lt;- scmap::indexCluster(ref_sce)<\/p>\n<p># \u5c06\u529f\u80fd\u53ef\u89c6\u5316\u4e3a\u70ed\u56fe<\/p>\n<p># \u91cd\u65b0\u683c\u5f0f\u5316\u6570\u636e\uff0c\u4ee5\u4fbf\u5b83\u4eec\u53ef\u4ee5\u7528\u4f5c ggplot2 \u7684\u8f93\u5165<\/p>\n<p>cormat &lt;- reshape2::melt(as.matrix(S4Vectors::metadata(ref_sce)$scmap_cluster_index))<\/p>\n<p># \u7ed8\u56fe<\/p>\n<p>ggplot2::ggplot(cormat, ggplot2::aes(x = Var2, y = Var1, fill = value)) +<\/p>\n<p>ggplot2::geom_tile() +<\/p>\n<p>ggplot2::scale_fill_gradient2(low = &#8220;blue&#8221;, high = &#8220;darkred&#8221;,<\/p>\n<p>name = &#8220;Expression value&#8221;) +<\/p>\n<p>ggplot2::theme_minimal() +<\/p>\n<p>ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 1,<\/p>\n<p>size = 18, hjust = 1),<\/p>\n<p>axis.text.y = ggplot2::element_text(size = 15),<\/p>\n<p>axis.title.x = ggplot2::element_blank(),<\/p>\n<p>axis.title.y = ggplot2::element_blank())<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"631\" class=\"wp-image-28260\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-9.png?resize=640%2C631\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-9.png?w=959 959w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-9.png?resize=300%2C296 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-9.png?resize=768%2C757 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-9.png?resize=600%2C591 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-9.png?resize=100%2C100 100w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u7ed3\u679c\u5982\u56fe\u6240\u793a\uff0c\u8fd9\u4e2a\u56fe\u7247\u663e\u793a\u4e86\u4e0d\u540c\u7c7b\u578b\u7684\u7ec6\u80de\u4e0e\u7279\u5b9a\u57fa\u56e0\u4e4b\u95f4\u7684\u5173\u7cfb\u3002\u989c\u8272\u7684\u6df1\u6d45\u8868\u793a\u5173\u8054\u7a0b\u5ea6\u6216\u6d3b\u52a8\u6c34\u5e73\u7684\u9ad8\u4f4e\u3002\u5c0f\u679c\u8fd9\u91cc\u53ea\u622a\u53d6\u4e86\u4e00\u90e8\u5206\uff0c\u5b8c\u6574\u7684\u56fe\u7247\u5927\u5bb6\u53ef\u4ee5\u81ea\u5df1\u8bd5\u7740\u7ed8\u5236\u54e6~<\/p>\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u7528scmap-cell \u6765\u6ce8\u91ca\u6570\u636e\u96c6\u4e2d\u7684\u5355\u4e2a\u7ec6\u80de\u3002<\/p>\n<p># \u5c06\u8868\u8fbe\u5f0f\u4fe1\u606f\u5b58\u50a8\u4e3a\u53d8\u91cf<\/p>\n<p>scmap_cluster_reference &lt;- S4Vectors::metadata(ref_sce)$scmap_cluster_index<\/p>\n<p># \u66f4\u65b0\u4e4b\u524d\u7684\u5f15\u7528\u4ee5\u4e5f\u5305\u542b scmap-cell \u5f15\u7528<\/p>\n<p>ref_sce &lt;- scmap::indexCell(ref_sce)<\/p>\n<p>#\u4ece\u5f15\u7528\u4e2d\u63d0\u53d6 scmap \u7d22\u5f15\u5e76\u5c06\u5176\u5b58\u50a8\u4e3a\u53d8\u91cf<\/p>\n<p>scmap_cell_reference &lt;- S4Vectors::metadata(ref_sce)$scmap_cell_index<\/p>\n<p># \u4ece\u5f15\u7528\u4e2d\u63d0\u53d6\u5173\u8054\u7684\u7ec6\u80de ID \u5e76\u4fdd\u5b58\u4e3a\u53d8\u91cf<\/p>\n<p>scmap_cell_metadata &lt;- SummarizedExperiment::colData(ref_sce)<\/p>\n<p>\u7136\u540e\u5c06\u67e5\u8be2\u6570\u636e\u96c6\u4e2d\u7684\u7ec6\u80de\u5206\u914d\u7ed9\u53c2\u8003\u6570\u636e\u96c6\uff0c\u5229\u7528\u4e00\u4e2a\u5df2\u6709\u7684\u53c2\u8003\u6570\u636e\u96c6\u6765\u5bf9\u4e00\u4e2a\u65b0\u7684\u67e5\u8be2\u6570\u636e\u96c6\u8fdb\u884c\u6ce8\u91ca\u6216\u6620\u5c04\u3002\u6211\u4eec\u5c06\u4f7f\u7528\u7684\u67e5\u8be2\u6570\u636e\u96c6\u7531 10X genomics \u63d0\u4f9b\uff0c\u5927\u5bb6\u53ef\u4ee5\u4ece\u5c0f\u679c\u7ed9\u5927\u5bb6\u63d0\u4f9b\u7684\u94fe\u63a5\u4e0b\u8f7d~<\/p>\n<p>data &lt;- Seurat::Read10X(&#8220;..\/data\/hg19\/&#8221;)<\/p>\n<p># \u4ece\u539f\u59cb\u77e9\u9635\u4e2d\u8fdb\u884c SingleCellExperiment<\/p>\n<p>query_sce &lt;- SingleCellExperiment::SingleCellExperiment(assays=list(counts=data))<\/p>\n<p># \u4ece Seurat \u5bf9\u8c61\u5236\u4f5c SingleCellExperiment<\/p>\n<p>query_seur &lt;- Seurat::CreateSeuratObject(data)<\/p>\n<p>query_sce &lt;- Seurat::as.SingleCellExperiment(query_seur)<\/p>\n<p># \u4f7f\u7528 scatter \u5305\u6807\u51c6\u5316\u6570\u636e<\/p>\n<p>query_sce &lt;- scater::logNormCounts(query_sce)<\/p>\n<p># \u6dfb\u52a0feature_symbol\u5217\uff08\u5373\u57fa\u56e0\u7b26\u53f7\uff09<\/p>\n<p>SummarizedExperiment::rowData(query_sce)$feature_symbol &lt;- rownames(query_sce)<\/p>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u5df2\u51c6\u5907\u597d\u4f7f\u7528 scmap-cluster \u5bf9\u6570\u636e\u8fdb\u884c\u6ce8\u91ca\u3002<\/p>\n<p># \u8fd0\u884c scmapCluster<\/p>\n<p>scmap_cluster_res &lt;- scmap::scmapCluster(projection=query_sce,<\/p>\n<p>index_list=list(immune1 = scmap_cluster_reference),<\/p>\n<p>threshold=0.1)<\/p>\n<p># \u7ed8\u5236\u6ce8\u91ca\u7ed3\u679c<\/p>\n<p>par(mar=c(13, 4, 1, 0))<\/p>\n<p>barplot(table(scmap_cluster_res$combined_labs), las=2)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"426\" class=\"wp-image-28261\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-10.png?resize=640%2C426\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-10.png?w=1054 1054w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-10.png?resize=300%2C200 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-10.png?resize=1024%2C681 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-10.png?resize=768%2C511 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-10.png?resize=600%2C399 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u4e0a\u56fe\u5c31\u662f\u6211\u4eec\u8fdb\u884c\u6ce8\u91ca\u7684\u7ed3\u679c\u5566\uff0c\u53ef\u4ee5\u770b\u5230Monocytes CD14+\u7ec6\u80de\u7684\u6570\u91cf\u662f\u6700\u591a\u7684\u3002<\/p>\n<p># \u5c06\u6b64\u6ce8\u91ca\u4fe1\u606f\u5b58\u50a8\u5728\u67e5\u8be2\u5bf9\u8c61\u4e2d<\/p>\n<p>SummarizedExperiment::colData(query_sce)$scmap_cluster &lt;- scmap_cluster_res$combined_labs<\/p>\n<p># \u5236\u4f5c\u5355\u5143\u683c\u7684 UMAP\uff0c\u5e76\u4f7f\u7528 scmapCluster \u4e2d\u7684\u5355\u5143\u683c\u7c7b\u578b\u6ce8\u91ca\u8fdb\u884c\u6807\u8bb0<\/p>\n<p>query_sce &lt;- scater::runUMAP(query_sce)<\/p>\n<p>scater::plotReducedDim(query_sce, dimred=&#8221;UMAP&#8221;, colour_by=&#8221;scmap_cluster&#8221;)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"440\" class=\"wp-image-28262\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-11.png?resize=640%2C440\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-11.png?w=1158 1158w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-11.png?resize=300%2C206 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-11.png?resize=1024%2C705 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-11.png?resize=768%2C529 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-11.png?resize=600%2C413 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u7ed3\u679c\u5982\u56fe\uff0c\u5c55\u793a\u4e86\u4e0d\u540c\u7c7b\u578b\u7684\u7ec6\u80de\u5728\u4e8c\u7ef4\u7a7a\u95f4\u4e2d\u7684\u5206\u5e03\u548c\u805a\u7c7b\u3002\u6bcf\u79cd\u989c\u8272\u4ee3\u8868\u4e00\u79cd\u7279\u5b9a\u7c7b\u578b\u7684\u7ec6\u80de\uff0c\u4f8b\u5982B\u7ec6\u80de\u3001T\u7ec6\u80de\u7b49\u3002<\/p>\n<p>\u9664\u6b64\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u7528scmap_cell\uff0csingleR\uff0cHarmony_lab\u7b49\u65b9\u5f0f\u8fdb\u884c\u81ea\u52a8\u6ce8\u91ca~<\/p>\n<p>Step 3 \u7ec6\u5316\u6ce8\u91ca<\/p>\n<p>\u5728\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528\u8de8\u5de5\u5177\u7684\u6700\u5e38\u89c1\u6807\u7b7e\u6765\u5206\u914d\u6700\u7ec8\u7684\u81ea\u52a8\u6ce8\u91ca\u6807\u7b7e\u3002<\/p>\n<p>annotation_columns &lt;- c(&#8220;scmap_cluster&#8221;, &#8220;scmap_cell&#8221;, &#8220;singleR&#8221;, &#8220;<a id=\"post-28251-_Hlk155974312\"><\/a>Harmony_lab&#8221;)<\/p>\n<p>get_consensus_label &lt;- function(labels){<\/p>\n<p>labels &lt;- labels[labels != &#8220;ambiguous&#8221;]<\/p>\n<p>if (length(labels) == 0) {return(&#8220;ambiguous&#8221;)}<\/p>\n<p>freq &lt;- table(labels)<\/p>\n<p>label &lt;- names(freq)[which(freq == max(freq))]<\/p>\n<p>if (length(label) &gt; 1) {return(&#8220;ambiguous&#8221;)}<\/p>\n<p>return(label)<\/p>\n<p>}<\/p>\n<p>SummarizedExperiment::colData(query_sce)$consensus_lab &lt;- apply(SummarizedExperiment::colData(query_sce)[,annotation_columns], 1, get_consensus_label)<\/p>\n<p>scater::plotReducedDim(query_sce, dimred=&#8221;UMAP&#8221;, colour_by=&#8221;consensus_lab&#8221;)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"451\" class=\"wp-image-28263\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-12.png?resize=640%2C451\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-12.png?w=1138 1138w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-12.png?resize=300%2C211 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-12.png?resize=1024%2C722 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-12.png?resize=768%2C541 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-12.png?resize=600%2C423 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u7ec6\u5316\u7684\u7ed3\u679c\u5982\u56fe\uff0c\u53ef\u4ee5\u4ece\u4fa7\u8fb9\u7684\u6807\u6ce8\u770b\u51fa\u6765\u660e\u663e\u6bd4\u4e4b\u524d\u7684\u5206\u7c7b\u66f4\u52a0\u7ec6\u81f4\u4e86\u3002<\/p>\n<p>Step 4 \u624b\u52a8\u6ce8\u91ca<\/p>\n<p>\u9996\u5148\u6211\u4eec\u9700\u8981\u68c0\u7d22\u6807\u8bb0\u57fa\u56e0\uff0c\u5982\u679c\u6ca1\u6709\u6bcf\u79cd\u7ec6\u80de\u7c7b\u578b\u7684\u6807\u8bb0\u7269\u7684\u5217\u8868\uff0c\u4e5f\u6ca1\u6709\u9ad8\u8d28\u91cf\u7684\u53c2\u8003\u6570\u636e\u96c6\u7684\u8bdd\uff0c\u53ef\u4ee5\u4ece\u67e5\u8be2\u6570\u636e\u7684\u6bcf\u4e2a\u805a\u7c7b\u4e2d\u63d0\u53d6\u9876\u7ea7\u6807\u8bb0\u57fa\u56e0\u3002\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528 Seurat\u6765\u5b8c\u6210\uff0c\u5c06\u6570\u636e\u683c\u5f0f\u5316\u4e3aSeurat \u5bf9\u8c61\u3002\u5148\u5bf9\u6570\u636e\u8fdb\u884c\u5f52\u4e00\u5316\u548c\u7f29\u653e\uff0c\u5e76\u4e14\u786e\u5b9a\u7ec6\u80de\u4e4b\u95f4\u7684\u53ef\u53d8\u57fa\u56e0\u3002<\/p>\n<p># \u4f7f\u7528 Seurat \u7684 SCTransform \u51fd\u6570\u7f29\u653e\u548c\u6807\u51c6\u5316\u6570\u636e<\/p>\n<p>query_seur &lt;- Seurat::SCTransform(query_seur)<\/p>\n<p>#\u63a5\u4e0b\u6765\uff0c\u5bf9\u6570\u636e\u6267\u884c\u4e0d\u540c\u7c7b\u578b\u7684\u964d\u7ef4\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u5728\u4e8c\u7ef4\u7a7a\u95f4\u4e2d\u5c06\u5355\u5143\u683c\u7ec4\u5408\u5728\u4e00\u8d77\u3002<\/p>\n<p>query_seur &lt;- Seurat::RunPCA(query_seur)<\/p>\n<p>query_seur &lt;- Seurat::RunTSNE(query_seur)<\/p>\n<p>query_seur &lt;- Seurat::RunUMAP(query_seur, dims = 1:50)<\/p>\n<p>#\u4ee5\u9009\u5b9a\u7684\u5206\u8fa8\u7387\u5bf9\u6570\u636e\u8fdb\u884c\u805a\u7c7b<\/p>\n<p># \u786e\u5b9a\u6bcf\u4e2a\u5355\u5143\u683c\u7684\u201c\u6700\u8fd1\u90bb\u5c45\u201d<\/p>\n<p>query_seur &lt;- Seurat::FindNeighbors(query_seur, dims = 1:50)<\/p>\n<p># \u805a\u7c7b<\/p>\n<p>query_seur &lt;- Seurat::FindClusters(query_seur, resolution = 0.5)<\/p>\n<p>#\u53ef\u89c6\u5316<\/p>\n<p>Seurat::DimPlot(query_seur, reduction = &#8220;UMAP&#8221;)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"415\" class=\"wp-image-28264\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-13.png?resize=640%2C415\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-13.png?w=1197 1197w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-13.png?resize=300%2C195 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-13.png?resize=1024%2C665 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-13.png?resize=768%2C499 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-13.png?resize=600%2C389 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u5982\u56fe\uff0c\u662f\u8fd8\u6ca1\u6709\u63d0\u53d6\u6807\u8bb0\u57fa\u56e0\u7684\u521d\u6b65\u7ed8\u5236\u7684\u70ed\u56fe\uff0c\u63a5\u4e0b\u6765\u6211\u4eec\u63d0\u53d6\u9876\u90e8\u57fa\u56e0\u3002<\/p>\n<p>#\u4f7f\u7528 Seurat \u4e2d\u7684 FindAllMarkers \u51fd\u6570\u6765\u5b8c\u6210<\/p>\n<p>markers_seur &lt;- Seurat::FindAllMarkers(query_seur, only.pos = TRUE)<\/p>\n<p># \u67e5\u770b\u6807\u8bb0\uff0c\u5b83\u4eec\u6309\u7167\u6bcf\u4e2a\u7c07\u7684 p \u503c\u4ece\u6700\u4f4e\u5230\u6700\u9ad8\u7684\u987a\u5e8f\u6392\u5217<\/p>\n<p>markers_seur<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"252\" class=\"wp-image-28265\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-14.png?resize=640%2C252\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-14.png?w=1524 1524w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-14.png?resize=300%2C118 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-14.png?resize=1024%2C404 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-14.png?resize=768%2C303 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-14.png?resize=600%2C237 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-14.png?w=1280 1280w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u7ed3\u679c\u5982\u56fe\uff0c\u662f\u6211\u4eec\u6311\u9009\u7684\u6807\u8bb0\u57fa\u56e0\u3002\u4e0d\u540c\u7ec6\u80de\u7c07\u4e4b\u95f4\u7684\u6807\u8bb0\u57fa\u56e0\u7684\u8868\u8fbe\u901a\u5e38\u7528\u70b9\u56fe\u6216\u70ed\u56fe\u6765\u5c55\u793a\u3002\u70b9\u56fe\u663e\u793a\u4e86\u6bcf\u4e2a\u7ec6\u80de\u7c07\u4e2d\u8868\u8fbe\u67d0\u4e2a\u6807\u8bb0\u57fa\u56e0\u7684\u7ec6\u80de\u7684\u767e\u5206\u6bd4\uff08\u70b9\u7684\u5927\u5c0f\uff09\u548c\u8be5\u7ec6\u80de\u7c07\u7684\u5e73\u5747\u68c0\u6d4b\u5230\u7684\u57fa\u56e0\u8868\u8fbe\u6c34\u5e73\u3002\u70ed\u56fe\u663e\u793a\u4e86\u4e0d\u540c\u7ec6\u80de\u7c07\u7684\u5e73\u5747\u6807\u8bb0\u57fa\u56e0\u8868\u8fbe\u6c34\u5e73\u3002\u8fd9\u4e24\u79cd\u56fe\u90fd\u662f\u7528Seurat\u521b\u5efa\u7684\u3002<\/p>\n<p>require(dplyr)<\/p>\n<p># \u68c0\u7d22\u6bcf\u4e2a\u7c07\u7684\u524d 5 \u4e2a\u6807\u8bb0\u57fa\u56e0<\/p>\n<p># \u4f7f\u7528 AVG_LOG \u5217\u4e0b\u5177\u6709\u6700\u9ad8\u503c\u7684\u57fa\u56e0<\/p>\n<p>top5 &lt;- markers_seur %&gt;% group_by(cluster) %&gt;%<\/p>\n<p>dplyr::slice_max(get(grep(&#8220;^avg_log&#8221;, colnames(markers_seur), value = TRUE)),<\/p>\n<p>n = 5)<\/p>\n<p># \u7ed8\u5236\u70b9\u56fe<\/p>\n<p>Seurat::DotPlot(query_seur, features = unique(top5$gene)) +<\/p>\n<p>ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 1,<\/p>\n<p>size = 8, hjust = 1)) +<\/p>\n<p>Seurat::NoLegend()<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"435\" class=\"wp-image-28266\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-15.png?resize=640%2C435\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-15.png?w=1172 1172w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-15.png?resize=300%2C204 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-15.png?resize=1024%2C695 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-15.png?resize=768%2C522 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-15.png?resize=600%2C408 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u5982\u56fe\u6240\u793a\uff0c\u6e05\u6670\u7684\u663e\u793a\u4e86\u6bcf\u4e2a\u7ec6\u80de\u7c07\u4e2d\u8868\u8fbe\u67d0\u4e2a\u6807\u8bb0\u57fa\u56e0\u7684\u7ec6\u80de\u7684\u767e\u5206\u6bd4\uff08\u70b9\u7684\u5927\u5c0f\uff09\u548c\u8be5\u7ec6\u80de\u7c07\u7684\u5e73\u5747\u68c0\u6d4b\u5230\u7684\u57fa\u56e0\u8868\u8fbe\u6c34\u5e73\u3002<\/p>\n<p># \u7ed8\u5236\u70ed\u56fe<\/p>\n<p>Seurat::DoHeatmap(query_seur, features = unique(top5$gene)) +<\/p>\n<p>Seurat::NoLegend() +<\/p>\n<p>ggplot2::theme(axis.text.y = ggplot2::element_text(size = 8))<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"450\" class=\"wp-image-28267\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-16.png?resize=640%2C450\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-16.png?w=1259 1259w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-16.png?resize=300%2C211 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-16.png?resize=1024%2C721 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-16.png?resize=768%2C540 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-28251-16.png?resize=600%2C422 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u5982\u56fe\u6240\u793a\uff0c\u663e\u793a\u4e86\u4e0d\u540c\u7ec6\u80de\u7c07\u7684\u5e73\u5747\u6807\u8bb0\u57fa\u56e0\u8868\u8fbe\u6c34\u5e73\u3002<\/p>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u7684\u5de5\u5177\u548c\u65b9\u6cd5\u53ef\u4ee5\u4e3ascRNA-seq\u6570\u636e\u63d0\u4f9b\u53ef\u9760\u7684\u7ec6\u80de\u7c7b\u578b\u6807\u8bb0\u3002\u7136\u800c\uff0c\u7531\u4e8e\u7b97\u6cd5\u7684\u6d6e\u52a8\u4ee5\u53ca\u6807\u8bb0\u7684\u6a21\u7cca\u6027\uff0c\u4f7f\u7528\u5176\u4ed6\u7684\u65b9\u6cd5(\u4f8b\u5982\u7edf\u8ba1\u65b9\u6cd5)\u6216\u8fdb\u884c\u5b9e\u9a8c\u6765\u786e\u8ba4\u5355\u5143\u683c\u6ce8\u91ca\u6807\u7b7e\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u6b64\u5916\uff0c\u7531\u4e8emRNA\u6d4b\u91cf\u53ea\u80fd\u90e8\u5206\u5b9a\u4e49\u7ec6\u80de\u7c7b\u578b\u548c\u529f\u80fd\uff0c\u56e0\u6b64\u5173\u4e8e\u65b0\u7ec6\u80de\u7c7b\u578b\u7684\u91cd\u8981\u7ed3\u8bba\u5fc5\u987b\u7ecf\u8fc7\u5b9e\u9a8c\u9a8c\u8bc1\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528T\u7ec6\u80de\u53d7\u4f53(TCR)\u548cB\u7ec6\u80de\u53d7\u4f53\u514b\u9686\u5206\u578b\u6765\u6539\u8fdb\u7ec4\u7ec7\u9a7b\u7559\u514d\u75ab\u7ec6\u80de\u7684\u7ec6\u80de\u7c7b\u578b\u6807\u8bb0\uff0c\u4ee5\u68c0\u67e5T\u7ec6\u80de\u548cB\u7ec6\u80de\u7684\u8f6c\u5f55\u7279\u5f81\uff0c\u5206\u522b\u7531\u5b83\u4eec\u8868\u8fbe\u7684TCR\u548cB\u7ec6\u80de\u53d7\u4f53\u5206\u5c42\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5c0f\u679c\u4eca\u5929\u7ed9\u5927\u5bb6\u5e26\u6765\u7684\u5168\u90e8\u5185\u5bb9\u5566\uff01\u5355\u7ec6\u80de\u6ce8\u91ca\u662f\u5355\u7ec6\u80de\u7684\u8f6c\u5f55\u7ec4\u5206\u6790\u4e2d\u975e\u5e38\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u65e0\u8bba\u662f\u81ea\u52a8\u6ce8\u91ca\u8fd8\u662f\u624b\u52a8\u9009\u62e9\u6807\u8bb0\u57fa\u56e0\u8fdb\u884c\u6ce8\u91ca\uff0c\u90fd\u5177\u6709\u4e00\u5b9a\u7684\u4e0d\u786e\u5b9a\u6027\uff0c\u4f46\u662f\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5c06\u591a\u79cd\u81ea\u52a8\u6ce8\u91ca\u4ee5\u53ca\u624b\u52a8\u6ce8\u91ca\u7684\u7ed3\u679c\u8fdb\u884c\u6574\u5408\uff0c\u4f7f\u5f97\u81ea\u5df1\u5f97\u5206\u6790\u6570\u636e\u505a\u5230\u76f8\u5bf9\u7684\u7cbe\u51c6\u3002\u5982\u679c\u5c0f\u4f19\u4f34\u4eec\u6709\u4efb\u4f55\u7591\u95ee\uff0c\u6b22\u8fce\u5173\u6ce8\u5c0f\u679c\uff0c\u5f53\u7136\uff0c\u4e5f\u53ef\u4ee5\u8bd5\u4e00\u8bd5\u6211\u4eec\u7684\u4e91\u751f\u4fe1\u5c0f\u5de5\u5177\uff0c\u53ea\u8981\u8f93\u5165\u5408\u9002\u7684\u6307\u4ee4\u5c31\u53ef\u4ee5\u76f4\u63a5\u7ed8\u5236\u60f3\u8981\u7684\u56fe\u5462\uff0c\u94fe\u63a5\uff1ahttp:\/\/www.biocloudservice.com\/home.html\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u8fdb\u884c\u5355\u4e2a\u7ec6\u80de\u6c34\u5e73\u7684\u5206\u6790\u65f6\uff0c\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u6d4b\u5e8f\u6280\u672f\u662f\u975e\u5e38\u4fbf\u5229\u9ad8\u6548\u7684\u4e00\u79cd\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u901a\u8fc7\u6d4b\u91cf\u5355\u4e2a\u7ec6\u80de\u4e2d\u6240\u6709\u57fa\u56e0\u7684\u8868 [&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\/28251"}],"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=28251"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/28251\/revisions"}],"predecessor-version":[{"id":28268,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/28251\/revisions\/28268"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28251"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}