{"id":29403,"date":"2024-02-22T17:56:04","date_gmt":"2024-02-22T09:56:04","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=29403"},"modified":"2024-02-22T17:56:06","modified_gmt":"2024-02-22T09:56:06","slug":"%e7%94%9f%e7%89%a9%e4%bf%a1%e6%81%af%e5%ad%a6%e4%b9%a0%e4%b9%8bseurat%e7%9a%84%e5%ae%89%e8%a3%85%e4%b8%8e%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=29403","title":{"rendered":"\u751f\u7269\u4fe1\u606f\u5b66\u4e60\u4e4bSeurat\u7684\u5b89\u88c5\u4e0e\u4f7f\u7528"},"content":{"rendered":"<p>\u751f\u7269\u4fe1\u606f\u5b66\u4e60\u4e4bSeurat\u7684\u5b89\u88c5\u4e0e\u4f7f\u7528<\/p>\n<ol>\n<li>\n  \u4ec0\u4e48\u662fSeurat\uff1f<\/li>\n<\/ol>\n<p>Seurat\u662fR\u8bed\u8a00\u4e2d\u88ab\u7528\u4e8e\u5355\u7ec6\u80deRNA-seq\u8d28\u63a7\u3001\u5206\u6790\u7684\u4e00\u4e2ar\u5305\u3002\u4ece\u800c\u65f6\u7528\u6237\u53ef\u4ee5\u9274\u5b9a\u6765\u81ea\u5355\u7ec6\u80de\u8f6c\u5f55\u672c\u6d4b\u5b9a\u7684\u5f02\u8d28\u6027\u6765\u6e90\u3002<\/p>\n<p>\u5176\u4e2d\uff0cSeurat\u5305\u7684\u5e94\u7528\u4e3b\u8981\u5305\u542b\u4e86\uff1a\u6570\u636e\u5bfc\u5165\u3001\u6570\u636e\u8fc7\u6ee4\u3001\u6570\u636e\u5f52\u4e00\u5316\u3001\u7279\u5f81\u9009\u62e9\u3001\u6570\u636e\u7f29\u653e\u3001\u6570\u636e\u964d\u7ef4\u3001\u805a\u7c7b\u3001\u6570\u636e\u53ef\u89c6\u5316\u4ee5\u53ca\u5dee\u5f02\u8868\u8fbe\u57fa\u56e0\u5206\u6790\u7684\u529f\u80fd\u3002<\/p>\n<p>\u672c\u6587\u4e3b\u8981\u8bb2\u89e3Seurat\u5305\u7684\u5b89\u88c5\u4ee5\u53ca\u5176\u7b80\u5355\u7684\u5e94\u7528\uff0c\u5305\u62ec\u6570\u636e\u5bfc\u5165\u3001\u6570\u636e\u8fc7\u6ee4\u3001\u6570\u636e\u7279\u5f81\u53ef\u89c6\u5316\u3002<\/p>\n<ol>\n<li>\n  Seurat\u7684\u5b89\u88c5<\/li>\n<\/ol>\n<p>1.\u5b89\u88c5\u547d\u4ee4<\/p>\n<p><em>&gt; install.packages(&#8216;Seurat&#8217;)<\/em><\/p>\n<p>\u6ce8\u610f\uff1a\u76ee\u524dSeurat\u6700\u9ad8\u7248\u672c\u662f3.0\u7248\u672c\uff0c\u9700\u8981\u9002\u914d\u7684R\u7684\u7248\u672c\u57283.4\u53ca\u4ee5\u4e0a\uff0c\u5982\u679c\u4f60\u7684R\u7248\u672c\u57283.4\u4ee5\u4e0a\uff0c\u5373\u53ef\u76f4\u63a5\u5728R\u4e2d\u5b89\u88c5\u3002<\/p>\n<p>2.\u5b89\u88c5\u6210\u529f\u540e\u5f15\u7528R\u5305\u53ef\u80fd\u4f1a\u51fa\u73b0\u7684\u9519\u8bef<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"59\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772716116.png?resize=640%2C59\" class=\"wp-image-29406\" alt=\"1678772716116\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772716116.png?w=984 984w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772716116.png?resize=300%2C27 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772716116.png?resize=768%2C70 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772716116.png?resize=600%2C55 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u6b64\u65f6\uff0c\u6211\u4eec\u9700\u8981\u518d\u5b89\u88c5spatstat.data\u8fd9\u4e2a\u5305\uff1a<\/p>\n<p><em>&gt; install.packages(&#8216;spatstat.data&#8217;)<\/em><\/p>\n<p>\u5f53\u5b89\u88c5spatstat.data\u5305\u65f6\uff0c\u53ef\u80fd\u8fd8\u4f1a\u51fa\u73b0spatstat.utils\u548cspatstat.data\u7248\u672c\u4e0d\u9002\u914d\u7684\u95ee\u9898\uff0c\u5bfc\u81f4spatstat.data\u65e0\u6cd5\u6b63\u786e\u88ab\u5b89\u88c5\u3002<\/p>\n<p>\u5b89\u88c5\u65f6\u62a5\u9519\u4fe1\u606f\uff1a<\/p>\n<p>Error: package or namespace load failed for \u2018Seurat\u2019 in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):<\/p>\n<p>\u8f7d\u5165\u4e86\u540d\u5b57\u7a7a\u95f4\u2018spatstat.utils\u2019 3.0-1\uff0c\u4f46\u9700\u8981\u7684\u662f&gt;= 3.0.2<\/p>\n<p>\u6b64\u65f6\uff0c\u6211\u4eec\u9700\u8981\u91cd\u65b0\u4e0b\u8f7d\u5bf9\u5e94\u7248\u672c\u7684spatstat.utils\uff0c\u5e76\u5728\u4e0b\u8f7d\u4e4b\u524d\u5220\u9664\u539f\u6765\u7248\u672c\u7684spatstat.utils\u3002<\/p>\n<p><em>&gt;remove.packages(&#8220;spatstat.utils&#8221;)<\/em><\/p>\n<p>\u5220\u9664\u539f\u6765\u7248\u672c\u7684r\u5305\u540e\uff0c\u6211\u4eec\u9700\u8981\u9996\u5148\u53bb\u4e0b\u8f7d\u597d\u5bf9\u5e94R\u5305\u7684\u538b\u7f29\u5305\uff0c\u8fd9\u91cc\u9700\u8981\u7279\u522b\u6ce8\u610f\u7684\u662f\uff0c\u4e0b\u8f7d\u597d\u7684\u5fc5\u987b\u662f.tar,\u800c\u4e0d\u80fd\u662f.zip\u3002\u8fd9\u91cc\u8d34\u4e0b\u6211\u4e0b\u8f7d\u7684\u94fe\u63a5\uff1a<\/p>\n<p><a href=\"https:\/\/mirrors.sjtug.sjtu.edu.cn\/cran\/web\/packages\/spatstat.utils\/index.html\">https:\/\/mirrors.sjtug.sjtu.edu.cn\/cran\/web\/packages\/spatstat.utils\/index.html<\/a><\/p>\n<p>\u4e0b\u8f7d\u597d\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p><em>&gt;install.packages(&#8220;C:\/\u4e0b\u8f7d\/spatstat.utils_3.0-1.tar.gz&#8221;, repos = NULL, type = &#8220;source&#8221;)<\/em><\/p>\n<p>\uff08\u7b2c\u4e00\u4e2a\u7a7a\u5c31\u586b\u5199\u4f60\u4e0b\u8f7d\u597d\u7684\u538b\u7f29\u5305\u6240\u5728\u7684\u7edd\u5bf9\u8def\u5f84\u5373\u53ef\uff09<\/p>\n<p>\u5982\u679c\u4f60\u6210\u529f\u5b89\u88c5\u4e86Rtools\u5e76\u4e14\u548cR\u4ee5\u53caRstudio\u5728\u540c\u4e00\u76ee\u5f55\u4e0b\uff0c\u5373\u53ef\u6210\u529f\u5b89\u88c5\uff0c\u5982\u679c\u8fd9\u4e00\u6b65\u4ecd\u7136\u62a5\u9519\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u68c0\u67e5\u4ee5\u4e0b\u662f\u5426\u6b63\u786e\u5b89\u88c5\u4e86Rtools\uff0c\u540c\u65f6\u4e5f\u8981\u6ce8\u610fR\u548cRStudio\u7684\u7248\u672c\u5bf9\u5e94\u95ee\u9898\u54e6~<\/p>\n<p>\u4ee5\u4e0a\u95ee\u9898\u89e3\u51b3\u540e\uff0c\u5f53\u6211\u4eec\u5728R\u4e2d\u5f15\u7528Seurat\u5305\u5c31\u4e0d\u4f1a\u62a5\u9519\u4e86\uff01<\/p>\n<ol>\n<li>\n  Seurat\u5305\u7684\u7b80\u5355\u4f7f\u7528<\/li>\n<\/ol>\n<p>\u7ecf\u8fc7\u4e00\u756a\u5468\u6298\uff0c\u6211\u4eec\u6210\u529f\u5b89\u88c5\u4e86Seurat\u5305\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u8981\u5b66\u4e60\u600e\u6837\u4f7f\u7528Seurat\u5305\u3002<\/p>\n<p>1.\u5bfc\u5165\u6570\u636e\/\u521b\u5efaSeurat\u5bf9\u8c61<\/p>\n<p><em>&gt;library(dplyr)<\/em><\/p>\n<p><em>&gt;library(Seurat)<\/em><\/p>\n<p><em>#\u5bfc\u5165pbmc\u6570\u636e<\/em><\/p>\n<p><em>&gt;pbmc.data &lt;- Read10X(data.dir=&#8221;Rdata\/filtered_gene_bc_matrices\/hg19\/&#8221;)<\/em><\/p>\n<p><em>&gt;pbmc &lt;- CreateSeuratObject(counts = pbmc.data, project = &#8220;pbmc3k&#8221; , min.cells = 3,min.features = 200)<\/em><\/p>\n<p><em>&gt;pbmc<\/em><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"77\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772876662.png?resize=640%2C77\" class=\"wp-image-29407\" alt=\"1678772876662\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772876662.png?w=744 744w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772876662.png?resize=300%2C36 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/1678772876662.png?resize=600%2C72 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u63d0\u793a\u4fe1\u606f\u544a\u8bc9\u6211\u4eec\uff0c\u751f\u6210\u7684pbmc\u5bf9\u8c61\u4e2d\u670913714\u4e2a\u57fa\u56e0\uff0c2700\u4e2a\u7ec6\u80de\u3002<\/p>\n<p>\u5bfc\u5165\u6210\u529f\u540e\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u5728Rstudio\u4e2d\u67e5\u770bpbmc\u5bf9\u8c61\u7684\u6574\u4f53\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"440\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-3.png?resize=640%2C440\" class=\"wp-image-29408\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-3.png?w=787 787w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-3.png?resize=300%2C206 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-3.png?resize=768%2C528 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-3.png?resize=600%2C412 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<ol>\n<li>\n  \u6570\u636e\u8fc7\u6ee4\/\u8d28\u91cf\u63a7\u5236<\/li>\n<\/ol>\n<p>\u4e0b\u9762\uff0c\u6211\u4eec\u4ee5\u4eba\u7684\u6570\u636e\u4e3a\u4f8b\uff0c\u4ee5MT-\u5f00\u5934\u7684\u6240\u6709\u57fa\u56e0\u96c6\u5ea7\u4f4d\u7ebf\u7c92\u4f53\u57fa\u56e0\u96c6\uff0c\u5229\u7528\u5c0f\u63d0\u7434\u56fe\u53ef\u89c6\u5316\u8d28\u63a7\u6307\u6807\uff08\u8fc7\u6ee4\u6761\u4ef6\uff1a\u8fc7\u6ee4\u7ebf\u7c92\u4f53\u57fa\u56e0\u5360\u6bd4\u5927\u4e8e5%\u7684\u7ec6\u80de\u3001\u8fc7\u6ee4UMI\u6570\u5927\u4e8e2500\u6216\u5c0f\u4e8e200\u7684\u7ec6\u80de\uff09\u3002<\/p>\n<p><em>&gt;pbmc[[&#8220;percent.mt&#8221;]]&lt;-PercentageFeatureSet(pbmc,pattern = &#8220;^MT-&#8220;)<\/em><\/p>\n<p><em>&gt;VlnPlot(pbmc,features = c(&#8220;nFeature_RNA&#8221;,&#8221;nCount_RNA&#8221;,&#8221;percent.mt&#8221;),ncol = 3)<\/em><\/p>\n<p><em>&gt;pbmc&lt;-subset(pbmc,subset=nFeature_RNA&gt;20 &amp; nFeature_RNA &lt;2500 &amp; percent.mt&lt;5)<\/em><\/p>\n<p><em>&gt;head(pbmc@meta.data, 5)<\/em><\/p>\n<p><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-29403-4.png?resize=640%2C269\" class=\"wp-image-29409\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-4.png?w=1159 1159w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-4.png?resize=300%2C126 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-4.png?resize=1024%2C430 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-4.png?resize=768%2C323 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-4.png?resize=600%2C252 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<ol>\n<li>\n  \u7279\u5f81-\u7279\u5f81\u4e4b\u95f4\u5173\u7cfb\u53ef\u89c6\u5316<\/li>\n<\/ol>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u53ef\u4ee5\u7528FeatureScatter\u51fd\u6570\u53ef\u4e66\u753b\u7279\u5f81\u4e0e\u7279\u5f81\u4e4b\u95f4\u7684\u5173\u7cfb\u3002<\/p>\n<p><em>&gt;plot3 &lt;- FeatureScatter(pbmc,feature1 = &#8220;nCount_RNA&#8221;,feature2 = &#8220;percent.mt&#8221;)<\/em><\/p>\n<p><em>&gt;CombinePlots(plots= list(plot3))<\/em><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"367\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-5.png?resize=640%2C367\" class=\"wp-image-29410\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-5.png?w=846 846w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-5.png?resize=300%2C172 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-5.png?resize=768%2C440 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-29403-5.png?resize=600%2C344 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u4ee5\u4e0a\uff0c\u5c31\u662f\u6211\u4eec\u5bf9Seurat\u5305\u7684\u5b89\u88c5\u4e0e\u57fa\u672c\u4f7f\u7528\u65b9\u6cd5\u7684\u603b\u7ed3\uff0c\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u5e2e\u52a9\u5230\u4f60\u5462~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u751f\u7269\u4fe1\u606f\u5b66\u4e60\u4e4bSeurat\u7684\u5b89\u88c5\u4e0e\u4f7f\u7528 \u4ec0\u4e48\u662fSeurat\uff1f Seurat\u662fR\u8bed\u8a00\u4e2d\u88ab\u7528\u4e8e\u5355\u7ec6\u80deRNA-seq [&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\/29403"}],"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=29403"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/29403\/revisions"}],"predecessor-version":[{"id":29411,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/29403\/revisions\/29411"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29403"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}