{"id":27787,"date":"2024-02-02T16:30:09","date_gmt":"2024-02-02T08:30:09","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=27787"},"modified":"2024-02-02T16:30:10","modified_gmt":"2024-02-02T08:30:10","slug":"%e5%8d%95%e7%bb%86%e8%83%9e%e8%bd%ac%e5%bd%95%e7%bb%84%e5%88%86%e6%9e%90%e7%a5%9e%e5%99%a8%ef%bc%813%e5%88%86%e9%92%9f%e5%b8%a6%e4%bd%a0%e7%94%a8seurat%e6%8f%aa%e5%87%ba%e8%82%bf%e7%98%a4","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=27787","title":{"rendered":"\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u5206\u6790\u795e\u5668\uff013\u5206\u949f\u5e26\u4f60\u7528Seurat\u63ea\u51fa\u80bf\u7624\u201c\u81f4\u547d\u57fa\u56e0\u201d\uff01"},"content":{"rendered":"<p>\u5728\u751f\u4fe1\u5206\u6790\u7684\u8fc7\u7a0b\u4e2d\uff0cSeurat\u4e00\u76f4\u662f\u6211\u4eec\u7684\u201c\u4f20\u5bb6\u5b9d\u201d\uff0c\u662f\u4e00\u4e2a\u7528\u4e8e\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u6570\u636e\u5206\u6790\u7684R\u8bed\u8a00\u5305\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u63a2\u7d22\u7ec6\u80de\u7684\u5f02\u8d28\u6027\u548c\u5dee\u5f02\u6027\u3002\u540c\u65f6\uff0c\u522b\u770b\u5b83\u53ea\u662f\u4e00\u4e2a\u5305\uff0c\u5374\u63d0\u4f9b\u4e86\u591a\u79cd\u7684\u7b26\u5408\u529f\u80fd\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u5957\u5b8c\u6574\u7684\u6d41\u7a0b\uff0c\u4ece\u6570\u636e\u5bfc\u5165\u3001\u8d28\u63a7\u3001\u5f52\u4e00\u5316\u3001\u7279\u5f81\u9009\u62e9\u3001\u7f29\u653e\u3001\u964d\u7ef4\u3001\u805a\u7c7b\u3001\u53ef\u89c6\u5316\u5230\u5dee\u5f02\u8868\u8fbe\u5206\u6790\u7b49\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7Seurat\u5b9e\u73b0\u3002\u672c\u6b21\u8fd0\u884c\u7684Seurat\u53ef\u80fd\u9700\u8981\u8f83\u591a\u7684\u670d\u52a1\u5668\u5185\u5b58\u7a7a\u95f4\uff0c\u5982\u679c\u5c0f\u4f19\u4f34\u4eec\u81ea\u5df1\u7684\u670d\u52a1\u5668\u4e0d\u662f\u5f88\u5408\u9002\uff0c\u6b22\u8fce\u5c0f\u4f19\u4f34\u4eec\u79df\u8d41\u6211\u4eec\u7684\u670d\u52a1\u5668\u6765\u8fd0\u884c\u4ee3\u7801\u54e6~<\/p>\n<p>\u800c\u5728\u70ed\u95e8\u7684\u80bf\u7624\u5206\u6790\u9886\u57df\uff0cSeurat\u540c\u6837\u6709\u7740\u201c\u7edf\u6cbb\u6027\u201d\u7684\u5730\u4f4d\uff0c\u5c0f\u679c\u4eca\u5929\u5c31\u6765\u6559\u6559\u5927\u5bb6\uff0c\u5982\u4f55\u7528Seurat\u5b9e\u73b0\u80bf\u7624\u7c7b\u6587\u7ae0\u7684\u5165\u95e8\u7ea7\u5206\u6790\u2014\u57fa\u56e0\u5dee\u5f02\u5206\u6790\uff0c\u4ece\u800c\u5c06\u80bf\u7624\u7ec6\u80de\u7684\u5dee\u5f02\u57fa\u56e0\u8fdb\u884c\u533a\u5206\uff0c\u627e\u5230\u5176\u4e2d\u53ef\u80fd\u7684\u201c\u81f4\u547d\u57fa\u56e0\u201d\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5c0f\u679c\u5e2e\u5927\u5bb6\u7406\u6e05\u5bf9\u80bf\u7624\u8fdb\u884c\u521d\u6b65\u5206\u6790\u7684\u601d\u8def\uff0c\u5728\u83b7\u53d6\u80bf\u7624\u7684\u76f8\u5173\u6570\u636e\u540e\uff0c\u6211\u4eec\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u6574\u5408\u5206\u6790\uff0c\u8bc4\u4f30\u7279\u5b9a\u7ec4\u7ec7\u533a\u57df\u4e2d\u7279\u5b9a\u7ec6\u80de\u7c7b\u578b\u7684\u5bcc\u96c6\u7a0b\u5ea6\uff0c\u7136\u540e\u518d\u8fdb\u884c\u5dee\u5f02\u5206\u6790\u3002<\/p>\n<p>\u6211\u4eec\u5728\u53cd\u6620\u57fa\u56e0\u7684\u5dee\u5f02\u8868\u8fbe\u7a0b\u5ea6\u65f6\uff0c\u901a\u5e38\u4f7f\u7528\u7684\u662f\u5e73\u5747\u5bf9\u6570\u6298\u53e0\u53d8\u5316\uff08avg_logFC\uff09\u3002avg_logFC\u6307\u7684\u662f\u4e24\u7ec4\u6837\u672c\uff08\u4f8b\u5982\u4e24\u79cd\u7ec6\u80de\u7c7b\u578b\u6216\u4e24\u79cd\u5904\u7406\u6761\u4ef6\uff09\u4e4b\u95f4\u57fa\u56e0\u8868\u8fbe\u91cf\u7684\u6bd4\u503c\u7684\u5bf9\u6570\u3002\u5bf9\u6570\u6298\u53e0\u53d8\u5316\u53ef\u4ee5\u53cd\u6620\u57fa\u56e0\u7684\u5dee\u5f02\u8868\u8fbe\u7a0b\u5ea6\uff0c\u6b63\u503c\u8868\u793a\u7b2c\u4e00\u7ec4\u6837\u672c\u4e2d\u57fa\u56e0\u8868\u8fbe\u66f4\u9ad8\uff0c\u8d1f\u503c\u8868\u793a\u7b2c\u4e8c\u7ec4\u6837\u672c\u4e2d\u57fa\u56e0\u8868\u8fbe\u66f4\u9ad8\u3002\u5e73\u5747\u5bf9\u6570\u6298\u53e0\u53d8\u5316\u662f\u5bf9\u6bcf\u4e2a\u57fa\u56e0\u5728\u4e0d\u540c\u6837\u672c\u4e2d\u7684\u8868\u8fbe\u91cf\u53d6\u5e73\u5747\u540e\u518d\u8ba1\u7b97\u7684\u5bf9\u6570\u6298\u53e0\u53d8\u5316\uff0c\u5e38\u7528\u4e8e\u8f6c\u5f55\u7ec4\u5206\u6790\u6216\u5355\u7ec6\u80de\u5206\u6790\u4e2d\uff0c\u4f5c\u4e3a\u7b5b\u9009\u5dee\u5f02\u8868\u8fbe\u57fa\u56e0\u7684\u4e00\u4e2a\u6807\u51c6\u3002<\/p>\n<p>\u5728\u4e86\u89e3\u5982\u4f55\u5206\u79bb\u5dee\u5f02\u8868\u8fbe\u57fa\u56e0\u4e4b\u540e\uff0c\u6211\u4eec\u7ec8\u4e8e\u53ef\u4ee5\u5f00\u59cb\u671f\u5f85\u5df2\u4e45\u7684\u5dee\u5f02\u5206\u6790\u4e86\uff01<\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u5206\u79bb\u80bf\u7624\u57fa\u8d28\u7c07<\/p>\n<p>\u6839\u636e\u5c0f\u679c\u4e3a\u5927\u5bb6\u63d0\u4f9b\u7684\u4ee3\u7801\uff0c\u9996\u5148\u5bfc\u5165\u6240\u9700\u7684R\u5305\uff0c\u8fd9\u4e00\u6b65\u4e2d\u4e3b\u8981\u7528\u5230\u7684\u662fSeurat\u548c scales\uff0c\u8fd9\u4e24\u4e2a\u5305\u5728\u5f80\u671f\u7684\u63a8\u9001\u4e2d\u6709\u8be6\u7ec6\u7684\u4ecb\u7ecd\uff0c\u5c0f\u4f19\u4f34\u4eec\u53ef\u4ee5\u5173\u6ce8\u5c0f\u679c\u5e76\u641c\u7d22\u54e6\u3002<\/p>\n<p>\u672c\u671f\u6240\u7528\u7684\u6570\u636e\u5c0f\u679c\u5df2\u7ecf\u51c6\u5907\u597d\u653e\u5728\u4e0b\u9762\u7684\u94fe\u63a5\u4e2d\u4e86\u54df~<\/p>\n<p>\u94fe\u63a5\uff1ahttps:\/\/pan.baidu.com\/s\/12y5rnPGjJT-oVYyCQzzELw<\/p>\n<p>\u63d0\u53d6\u7801\uff1agbpc<\/p>\n<p>\u8f93\u5165\u6570\u636e\u5982\u56fe\u6240\u793a\uff0c\u5c0f\u679c\u5df2\u7ecf\u5c06\u6240\u9700\u7684\u529f\u80fd\u51fd\u6570\u4ee5\u53ca\u53d8\u91cf\uff0c\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u6570\u636e\u6574\u7406\u4e3aR\u6570\u636e\uff0c\u5927\u5bb6\u76f4\u63a5\u5bfc\u5165\u5373\u53ef\u4f7f\u7528 <img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"372\" class=\"wp-image-27788\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-1.png?resize=640%2C372\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-1.png?w=1169 1169w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-1.png?resize=300%2C175 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-1.png?resize=1024%2C596 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-1.png?resize=768%2C447 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-1.png?resize=600%2C349 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/> ~<\/p>\n<p># \u5bfc\u5165\u5305<\/p>\n<p>library(Seurat)<\/p>\n<p>library(scales)<\/p>\n<p>save_dir = &#8216;\/results&#8217;<\/p>\n<p>fnm = paste0(save_dir,&#8217;\/seurat_object.RData&#8217;)<\/p>\n<p>load(fnm)<\/p>\n<p>## \u5b9a\u4e49\u80bf\u7624\u533a\u57df<\/p>\n<p>tumor_stroma_clu &lt;- function(SID){<\/p>\n<p>fnm = paste0(save_dir,&#8217;\/MIA\/A&#8217;,SID,&#8217;.xls&#8217;)<\/p>\n<p>tmp1 = read.table(fnm,header = TRUE, stringsAsFactors = F, check.names=F)<\/p>\n<p>tms = c(&#8216;Ep_1&#8242;,&#8217;Ep_2&#8242;,&#8217;Ep_3&#8242;,&#8217;Ep_4&#8217;)<\/p>\n<p>N_clu = dim(tmp1)[2]<\/p>\n<p>TM_clu = c(&#8216;100&#8217;) # tumor clusters<\/p>\n<p>SM_clu = c(&#8216;100&#8217;) # stroma clusters<\/p>\n<p>for (i in seq(1,length(tms))){<\/p>\n<p>for (j in seq(1,N_clu)){<\/p>\n<p>if (tmp1[tms[i],j]&gt;10){<\/p>\n<p>TM_clu = c(TM_clu,colnames(tmp1)[j])<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>TM_clu = TM_clu[2:length(TM_clu)]<\/p>\n<p>TM_clu = unique(TM_clu)<\/p>\n<p>SM_clu = setdiff(colnames(tmp1),TM_clu)<\/p>\n<p>return(list(TM_clu,SM_clu))<\/p>\n<p>}<\/p>\n<p>## \u5c06\u6240\u6709\u80bf\u7624\u533a\u57df\u4f5c\u4e3a\u5143\u6570\u636e\u6c47\u96c6<\/p>\n<p>pool_TM = function(SOE,TM_clu){<\/p>\n<p>temp = SOE@meta.data$seurat_clusters<\/p>\n<p>temp = as.character(temp)<\/p>\n<p>for(i in seq(1,length(temp))){<\/p>\n<p>if (temp[i] %in% TM_clu){<\/p>\n<p>temp[i] = &#8216;tumor&#8217;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>SOE@meta.data$pool_tumor = as.factor(temp)<\/p>\n<p>return(SOE)<\/p>\n<p>}<\/p>\n<p>## \u5c06\u6240\u6709\u57fa\u8d28\u533a\u57df\u4f5c\u4e3a\u5143\u6570\u636e\u6c47\u96c6<\/p>\n<p>pool_SM = function(SOE,SM_clu){<\/p>\n<p>temp = SOE@meta.data$seurat_clusters<\/p>\n<p>temp = as.character(temp)<\/p>\n<p>for(i in seq(1,length(temp))){<\/p>\n<p>if (temp[i] %in% SM_clu){<\/p>\n<p>temp[i] = &#8216;stroma&#8217;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>SOE@meta.data$pool_stroma = as.factor(temp)<\/p>\n<p>return(SOE)<\/p>\n<p>}<\/p>\n<p>## \u5b9a\u4e49\u53d8\u91cf<\/p>\n<p>SID = &#8216;4&#8217;<\/p>\n<p>SOE = sample4<\/p>\n<p>TS = tumor_stroma_clu(SID)<\/p>\n<p>TM_clu = unlist(TS[1])<\/p>\n<p>SM_clu = unlist(TS[2])<\/p>\n<p>SOE = pool_TM(SOE,TM_clu)<\/p>\n<p>sample4 = pool_SM(SOE,SM_clu)<\/p>\n<p>## \u50a8\u5b58Seurat \u9879\u76ee<\/p>\n<p>fnm = paste0(save_dir,&#8217;\/seurat_object_TM_SM.RData&#8217;)<\/p>\n<p>save(sample4,sample5,sample10,sample12, file = fnm) # Save the object<\/p>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u7ed8\u5236\u80bf\u7624\u8f6e\u5ed3<\/p>\n<p>\u5728\u7b2c\u4e94\u6b65\u7684\u57fa\u7840\u4e0a\uff0c\u6211\u4eec\u9700\u8981\u989d\u5916\u5bfc\u5165imager\uff0cmagick\uff0cstringr\u8fd9\u4e09\u4e2a\u5305\uff0c\u5f15\u7528\u7b2c\u4e94\u6b65\u4e2d\u8bbe\u7f6e\u7684\u80bf\u7624\u7c07\u5b9a\u4f4d\u51fd\u6570\uff0c\u8fdb\u800c\u7ed8\u5236\u80bf\u7624\u7c07\u8f6e\u5ed3\uff0c\u7ed8\u5236\u7684\u7ed3\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u5206\u522b\u662f\u56db\u4e2a\u6837\u672c\u7684\u80bf\u7624\u7c07\u8f6e\u5ed3\u3002<\/p>\n<p># \u5bfc\u5165\u5305<\/p>\n<p>library(magick)<\/p>\n<p>library(stringr)<\/p>\n<p>## \u4fdd\u5b58\u7ed3\u679c\u6587\u4ef6<\/p>\n<p>folder = paste0(save_dir,&#8217;\/map_tumor_region&#8217;)<\/p>\n<p>if (!file.exists(folder)){<\/p>\n<p>dir.create(folder)<\/p>\n<p>}<\/p>\n<p>folder1 = paste0(save_dir,&#8217;\/map_tumor_outline&#8217;)<\/p>\n<p>if (!file.exists(folder1)){<\/p>\n<p>dir.create(folder1)<\/p>\n<p>}<\/p>\n<p>## \u627e\u5230\u80bf\u7624\u7c07<\/p>\n<p>tum_clu &lt;- function(SID){<\/p>\n<p>fnm = paste0(save_dir,&#8217;\/MIA\/A&#8217;,SID,&#8217;.xls&#8217;)<\/p>\n<p>tmp1 = read.table(fnm,header = TRUE, stringsAsFactors = F, check.names=F)<\/p>\n<p>tms = c(&#8216;Ep_1&#8242;,&#8217;Ep_2&#8242;,&#8217;Ep_3&#8242;,&#8217;Ep_4&#8217;)<\/p>\n<p># tms = c(&#8216;T&#8217;)<\/p>\n<p># tms = c(&#8216;FB_1&#8242;,&#8217;FB_2&#8242;,&#8217;FB_3&#8217;)<\/p>\n<p>N_clu = dim(tmp1)[2]<\/p>\n<p>TM_clu = c(&#8216;100&#8217;)<\/p>\n<p>for (i in seq(1,length(tms))){<\/p>\n<p>for (j in seq(1,N_clu)){<\/p>\n<p>if (tmp1[tms[i],j]&gt;10){<\/p>\n<p>TM_clu = c(TM_clu,colnames(tmp1)[j])<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>TM_clu = TM_clu[2:length(TM_clu)]<\/p>\n<p>TM_clu = unique(TM_clu)<\/p>\n<p>return(TM_clu)<\/p>\n<p>}<\/p>\n<p>## \u7ed8\u5236\u80bf\u7624\u533a\u57df<\/p>\n<p>map_tumor &lt;- function(SID,SOE,topleft,topright,bottomleft,bottomright,im,size = 7){<\/p>\n<p>tumor_clu = tum_clu(SID)<\/p>\n<p>tmp0 = SOE@meta.data$seurat_cluster<\/p>\n<p>nspots = length(tmp0)<\/p>\n<p>mycols1 &lt;- c(rep(&#8216;NA&#8217;,length(tmp0)))<\/p>\n<p>for (i in seq(1,nspots)){<\/p>\n<p>if (tmp0[i] %in% tumor_clu){<\/p>\n<p>mycols1[i] = &#8216;black&#8217;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>delta_x = mean(abs(topright[1]-topleft[1]),abs(bottomright[1]-bottomleft[1]))\/32<\/p>\n<p>delta_y = mean(abs(topright[2]-bottomright[2]),abs(topleft[2]-bottomleft[2]))\/34<\/p>\n<p>adjust_x = function(step){return((step-1)*(bottomleft[1]-topleft[1])\/34)}<\/p>\n<p>adjust_y = function(step){return((step-1)*(topright[2]-topleft[2])\/32)}<\/p>\n<p>tmp = as.matrix(GetAssayData(object = SOE, assay = &#8220;SCT&#8221;, slot = &#8220;scale.data&#8221;))<\/p>\n<p>tmp1 = colnames(tmp)<\/p>\n<p>if (nchar(SID)==1){<\/p>\n<p>tmp1 = substr(tmp1,4,100)<\/p>\n<p>} else{<\/p>\n<p>tmp1 = substr(tmp1,5,100)<\/p>\n<p>}<\/p>\n<p>colnames(tmp) = tmp1<\/p>\n<p>x = as.numeric(unlist(lapply(tmp1, function(x){strsplit(x,&#8221;x&#8221;)[[1]][1]})))<\/p>\n<p>y = as.numeric(unlist(lapply(tmp1, function(x){strsplit(x,&#8221;x&#8221;)[[1]][2]})))<\/p>\n<p>d = data.frame(x,y)<\/p>\n<p>filenm = paste0(folder,&#8217;\/A&#8217;,SID,&#8217;_tumor.png&#8217;)<\/p>\n<p>png(filenm, width = dim(im)[1], height = dim(im)[2])<\/p>\n<p>par(mar = c(0,0,0,0)) # set zero margins on all 4 sides<\/p>\n<p>plot(x = NULL, y = NULL, xlim = c(0,dim(im)[1]), ylim = c(0,dim(im)[2]), pch = &#8221;,<\/p>\n<p>xaxt = &#8216;n&#8217;, yaxt = &#8216;n&#8217;, xlab = &#8221;, ylab = &#8221;, xaxs = &#8216;i&#8217;, yaxs = &#8216;i&#8217;,<\/p>\n<p>bty = &#8216;n&#8217;) # plot empty figure<\/p>\n<p># rasterImage(im, xleft = 0, ybottom = 0, xright = dim(im)[1], ytop = dim(im)[2])<\/p>\n<p>points(topleft[1]+(d[,1]-1)*delta_x+apply(d,1,function(x){return(adjust_x(x[2]))}),<\/p>\n<p>topleft[2]-(d[,2]-1)*delta_y+apply(d,1,function(x){return(adjust_y(x[1]))}),<\/p>\n<p>col=mycols1,pch=15,cex=size)<\/p>\n<p>dev.off()<\/p>\n<p>}<\/p>\n<p>## \u5b9a\u4e49\u53d8\u91cf<\/p>\n<p>SID = &#8216;4&#8217;<\/p>\n<p>SOE = sample4<\/p>\n<p>fnm = paste0(image_dir,&#8217;\/Sample_&#8217;,SID,&#8217;_ds.jpg&#8217;) # downsample to 0.25x<\/p>\n<p>im = load.image(fnm)<\/p>\n<p># plot(im)<\/p>\n<p>xd = dim(im)[1]<\/p>\n<p>yd = dim(im)[2]<\/p>\n<p>topleft = c(58,yd-50)<\/p>\n<p>topright = c(1412,yd-64)<\/p>\n<p>bottomleft = c(48,yd-1512)<\/p>\n<p>bottomright = c(1400,yd-1524)<\/p>\n<p>map_tumor(SID,SOE,topleft,topright,bottomleft,bottomright,im,size=8.5)<\/p>\n<p>*\u5176\u4f59\u4e09\u4e2a\u6837\u672c\u8fdb\u884c\u76f8\u540c\u5904\u7406<\/p>\n<p>## \u7ed8\u5236\u80bf\u7624\u8f6e\u5ed3<\/p>\n<p>files1 = list.files(folder)<\/p>\n<p>for (i in seq(1,length(files1))){<\/p>\n<p>directory = paste0(folder,&#8217;\/&#8217;,files1[i])<\/p>\n<p>sample_id = str_split(files1[i],&#8217;.png&#8217;)[[1]][1]<\/p>\n<p>fig &lt;- image_read(directory)<\/p>\n<p># print(fig)<\/p>\n<p>fig = fig %&gt;% image_morphology(&#8216;EdgeOut&#8217;, &#8216;Octagon&#8217;) %&gt;% image_negate() # edge detection<\/p>\n<p>filenm = paste0(folder1,&#8217;\/&#8217;,sample_id,&#8217;_outline.png&#8217;)<\/p>\n<p>image_write(fig, filenm)<\/p>\n<p>}<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"440\" height=\"423\" class=\"wp-image-27789\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-2.png?resize=440%2C423\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-2.png?w=440 440w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-2.png?resize=300%2C288 300w\" sizes=\"(max-width: 440px) 100vw, 440px\" data-recalc-dims=\"1\" \/> <img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"672\" class=\"wp-image-27790\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-3.png?resize=640%2C672\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-3.png?w=1404 1404w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-3.png?resize=286%2C300 286w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-3.png?resize=975%2C1024 975w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-3.png?resize=768%2C806 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-3.png?resize=600%2C630 600w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-3.png?w=1280 1280w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A4<\/p>\n<p>A5<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"677\" class=\"wp-image-27791\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-4.png?resize=640%2C677\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-4.png?w=1067 1067w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-4.png?resize=284%2C300 284w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-4.png?resize=969%2C1024 969w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-4.png?resize=768%2C812 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-4.png?resize=600%2C634 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A10<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"715\" class=\"wp-image-27792\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-5.png?resize=640%2C715\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-5.png?w=1008 1008w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-5.png?resize=269%2C300 269w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-5.png?resize=917%2C1024 917w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-5.png?resize=768%2C858 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-5.png?resize=600%2C670 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A12<\/p>\n<p>\u7ed3\u679c\u5982\u56fe\uff0c\u662f\u6211\u4eec\u4f9d\u636e\u80bf\u7624\u7684\u8f6e\u5ed3\u8fdb\u884c\u7684\u7ed8\u56fe\uff0c\u53ef\u4ee5\u975e\u5e38\u6e05\u6670\u7684\u770b\u5230\u80bf\u7624\u7684\u754c\u9650\uff0c\u63a5\u7740\u6211\u4eec\u9700\u8981\u627e\u51fa\u4e2a\u4f53\u7684\u57fa\u56e0\uff0c\u7136\u540e\u5c06\u5176\u4e0e\u80bf\u7624\u7684\u8f6e\u5ed3\u8fdb\u884c\u6bd4\u5bf9\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65\uff1a\u4e0e\u4e2a\u4f53\u57fa\u56e0\u6bd4\u5bf9<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u5c0f\u679c\u5e26\u7740\u5927\u5bb6\u6765\u627e\u51fascRNA\u4e2d\u7684\u7279\u5f81\u57fa\u56e0\uff0c\u4f9d\u636e\u7ed9\u51fa\u7684\u4ee3\u7801\uff0c\u5c06\u80bf\u7624\u4e0e\u57fa\u56e0\u76f8\u6bd4\u5bf9\uff0c\u5c31\u53ef\u4ee5\u7ed8\u5236\u51fa\u4e0b\u65b9\u7684\u56fe\uff0c\u5f53\u7136\uff0c\u4e0b\u65b9\u7684\u56db\u5e45\u56fe\u53ea\u5c55\u793a\u4e86COL1A1\u8fd9\u4e2a\u57fa\u56e0\u4e0e\u56db\u4e2a\u6837\u672c\u7684\u4e4b\u95f4\u7684\u6620\u5c04\u5173\u7cfb\uff0c\u5269\u4f59\u7684\u57fa\u56e0\u4e0e\u80bf\u7624\u7c07\u7684\u6620\u5c04\u5173\u7cfb\u5c0f\u4f19\u4f34\u4eec\u53ef\u4ee5\u81ea\u5df1\u5728\u7ed3\u679c\u6587\u4ef6\u4e2d\u627e\u4e00\u627e\u54e6\u3002<\/p>\n<p>## \u8bbe\u5b9a\u80bf\u7624\uff0c\u57fa\u8d28\u57fa\u56e0<\/p>\n<p>geneb = c(&#8216;POSTN&#8217;,&#8217;CD36&#8242;,&#8217;ACTA2&#8242;,&#8217;VIM&#8217;,&#8217;S100A4&#8242;,&#8217;PDGFRB&#8217;,&#8217;PDGFRA&#8217;,<\/p>\n<p>&#8216;FAP&#8217;,&#8217;COL1A1&#8242;,&#8217;WFDC2&#8242;,&#8217;MUC16&#8242;,&#8217;CLDN4&#8242;)<\/p>\n<p>## \u6bd4\u5bf9\u57fa\u56e0<\/p>\n<p>map_gene &lt;- function(gene,SID,SOE,RorG,topleft,topright,bottomleft,bottomright,im){<\/p>\n<p>fnm = paste0(save_dir,&#8217;\/map_tumor_outline\/A&#8217;,SID,&#8217;_tumor_outline.png&#8217;) # downsample to 0.25x<\/p>\n<p>im1 = load.image(fnm)<\/p>\n<p>delta_x = mean(abs(topright[1]-topleft[1]),abs(bottomright[1]-bottomleft[1]))\/32<\/p>\n<p>delta_y = mean(abs(topright[2]-bottomright[2]),abs(topleft[2]-bottomleft[2]))\/34<\/p>\n<p>adjust_x = function(step){return((step-1)*(bottomleft[1]-topleft[1])\/34)}<\/p>\n<p>adjust_y = function(step){return((step-1)*(topright[2]-topleft[2])\/32)}<\/p>\n<p>tmp = as.matrix(GetAssayData(object = SOE, assay = &#8220;SCT&#8221;, slot = &#8220;scale.data&#8221;))<\/p>\n<p>tmp1 = colnames(tmp)<\/p>\n<p>if (nchar(SID)==1){<\/p>\n<p>tmp1 = substr(tmp1,4,100)<\/p>\n<p>} else{<\/p>\n<p>tmp1 = substr(tmp1,5,100)<\/p>\n<p>}<\/p>\n<p>colnames(tmp) = tmp1<\/p>\n<p>x = as.numeric(unlist(lapply(tmp1, function(x){strsplit(x,&#8221;x&#8221;)[[1]][1]})))<\/p>\n<p>y = as.numeric(unlist(lapply(tmp1, function(x){strsplit(x,&#8221;x&#8221;)[[1]][2]})))<\/p>\n<p>d = data.frame(x,y)<\/p>\n<p>all_genes = rownames(tmp)<\/p>\n<p>id = 0<\/p>\n<p>for (i in seq(1,length(all_genes),by = 1)){<\/p>\n<p>if (all_genes[i] == gene){<\/p>\n<p>id = i<\/p>\n<p>break}}<\/p>\n<p>if (id == 0){<\/p>\n<p>print(&#8216;No matched genes!&#8217;)<\/p>\n<p>}<\/p>\n<p>data_1 = tmp[id,]<\/p>\n<p>vec = (data_1-min(data_1))\/(max(data_1)-min(data_1))<\/p>\n<p>require(grDevices)<\/p>\n<p>R = &#8216;brown&#8217;<\/p>\n<p>G = &#8216;darkgreen&#8217;<\/p>\n<p>B = &#8216;darkblue&#8217;<\/p>\n<p>if (RorG==1){<\/p>\n<p>mycols &lt;- colorRamp(c(&#8216;darkgray&#8217;,&#8217;white&#8217;,&#8217;lightcoral&#8217;,&#8217;red&#8217;), space = &#8220;Lab&#8221;)(vec)<\/p>\n<p>} else if (RorG==2){<\/p>\n<p>mycols &lt;- colorRamp(c(&#8220;white&#8221;,G), space = &#8220;Lab&#8221;)(vec)<\/p>\n<p>} else {<\/p>\n<p>mycols &lt;- colorRamp(c(&#8220;white&#8221;,B), space = &#8220;Lab&#8221;)(vec)<\/p>\n<p>}<\/p>\n<p>mycols &lt;- rgb(mycols[,1], mycols[,2], mycols[,3], maxColorValue = 255) # Transform the rgb colors in hexadecimal format<\/p>\n<p>filenm = paste0(folder,&#8217;\/A&#8217;,SID,&#8217;_&#8217;,gene,&#8217;_with_tumor_gray.png&#8217;)<\/p>\n<p>png(filenm, width = 512, height = 512)<\/p>\n<p>par(mar = c(0,0,0,0)) # set zero margins on all 4 sides<\/p>\n<p>plot(x = NULL, y = NULL, xlim = c(0,dim(im)[1]), ylim = c(0,dim(im)[2]), pch = &#8221;,<\/p>\n<p>xaxt = &#8216;n&#8217;, yaxt = &#8216;n&#8217;, xlab = &#8221;, ylab = &#8221;, xaxs = &#8216;i&#8217;, yaxs = &#8216;i&#8217;,<\/p>\n<p>bty = &#8216;n&#8217;) # plot empty figure<\/p>\n<p>rasterImage(im1, xleft = 0, ybottom = 0, xright = dim(im1)[1], ytop = dim(im1)[2])<\/p>\n<p>points(topleft[1]+(d[,1]-1)*delta_x+apply(d,1,function(x){return(adjust_x(x[2]))}),<\/p>\n<p>topleft[2]-(d[,2]-1)*delta_y+apply(d,1,function(x){return(adjust_y(x[1]))}),<\/p>\n<p>col=mycols,pch=20,cex=3)<\/p>\n<p>title(gene, line = -1)<\/p>\n<p>dev.off()<\/p>\n<p># print(gene)<\/p>\n<p>}<\/p>\n<p>##<\/p>\n<p>SID = &#8216;4&#8217;<\/p>\n<p>SOE = sample4<\/p>\n<p>fnm = paste0(image_dir,&#8217;\/Sample_&#8217;,SID,&#8217;_ds.jpg&#8217;) # downsample to 0.25x<\/p>\n<p>im = load.image(fnm)<\/p>\n<p># plot(im)<\/p>\n<p>xd = dim(im)[1]<\/p>\n<p>yd = dim(im)[2]<\/p>\n<p>topleft = c(58,yd-50)<\/p>\n<p>topright = c(1412,yd-64)<\/p>\n<p>bottomleft = c(48,yd-1512)<\/p>\n<p>bottomright = c(1400,yd-1524)<\/p>\n<p>isRorG = 1<\/p>\n<p>gene = geneb<\/p>\n<p>genes = rownames(SOE@assays$SCT)<\/p>\n<p>gene = intersect(gene,genes)<\/p>\n<p>for (i in seq(1,length(gene))){<\/p>\n<p>map_gene(gene[i],SID,SOE,isRorG,topleft,topright,bottomleft,bottomright,im)<\/p>\n<p>}<\/p>\n<p>## \u7ed8\u5236\u989c\u8272\u6761\u5e26<\/p>\n<p>color.bar &lt;- function(lut, min=0, max=1, nticks=11, ticks=seq(min, max, len=nticks), title=&#8221;) {<\/p>\n<p>scale = (length(lut)-1)\/(max-min)<\/p>\n<p>filenm = paste0(folder,&#8217;\/color_bar.png&#8217;)<\/p>\n<p>png(filenm, width = 170, height = 500)<\/p>\n<p>plot(c(0,10), c(min,max), type=&#8217;n&#8217;, bty=&#8217;n&#8217;, xaxt=&#8217;n&#8217;, xlab=&#8221;, yaxt=&#8217;n&#8217;, ylab=&#8221;, main=title)<\/p>\n<p>axis(2, ticks, las=1)<\/p>\n<p>for (i in 1:(length(lut)-1)) {<\/p>\n<p>y = (i-1)\/scale + min<\/p>\n<p>rect(0,y,10,y+1\/scale, col=lut[i], border=NA)<\/p>\n<p>}<\/p>\n<p>dev.off()<\/p>\n<p>}<\/p>\n<p>color.bar(colorRampPalette(c(&#8216;darkgray&#8217;,&#8217;white&#8217;,&#8217;lightcoral&#8217;,&#8217;red&#8217;))(100))<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"407\" height=\"398\" class=\"wp-image-27793\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-6.png?resize=407%2C398\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-6.png?w=407 407w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-6.png?resize=300%2C293 300w\" sizes=\"(max-width: 407px) 100vw, 407px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A4+COL1A1<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"512\" height=\"512\" class=\"wp-image-27794\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-7.png?resize=512%2C512\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-7.png?w=512 512w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-7.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-7.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-7.png?resize=100%2C100 100w\" sizes=\"(max-width: 512px) 100vw, 512px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A10+COL1A1<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"512\" height=\"512\" class=\"wp-image-27795\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-8.png?resize=512%2C512\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-8.png?w=512 512w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-8.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-8.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-8.png?resize=100%2C100 100w\" sizes=\"(max-width: 512px) 100vw, 512px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A12+COL1A1<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"512\" height=\"512\" class=\"wp-image-27796\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-9.png?resize=512%2C512\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-9.png?w=512 512w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-9.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-9.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-9.png?resize=100%2C100 100w\" sizes=\"(max-width: 512px) 100vw, 512px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A5+COL1A1<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"170\" height=\"500\" class=\"wp-image-27797\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-10.png?resize=170%2C500\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-10.png?w=170 170w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-10.png?resize=102%2C300 102w\" sizes=\"(max-width: 170px) 100vw, 170px\" data-recalc-dims=\"1\" \/><\/p>\n<p>\u7ed3\u679c\u5982\u56fe\uff0c\u662f\u6211\u4eec\u5c06\u4e2a\u4f53\u57fa\u56e0\u4e0e\u80bf\u7624\u7684\u8f6e\u5ed3\u8fdb\u884c\u6bd4\u5bf9\u4e4b\u540e\u7684\u7ed3\u679c\uff0c\u6709\u5f88\u591a\u7684\u7ed3\u679c\u56fe\uff0c\u5c0f\u679c\u5728\u8fd9\u91cc\u53ea\u5217\u51fa\u4e86\u4e00\u4e2a\u57fa\u56e0\u7684\u6bd4\u5bf9\u56fe\uff0c\u53ef\u4ee5\u770b\u51fa\u5728\u56db\u4e2a\u6837\u672c\u4e2d\uff0cCOL1A1\u57fa\u56e0\u7684\u8868\u8fbe\u662f\u975e\u5e38\u4e30\u5bcc\u7684\uff0c\u56fe\u4e2d\u7684\u7ea2\u8272\u533a\u57df\u4ee3\u8868\u9ad8\u8868\u8fbe\u7684\u533a\u57df\uff0c\u7070\u8272\u7684\u5219\u4ee3\u8868\u4f4e\u8868\u8fbe\u7684\u533a\u57df\u3002<\/p>\n<p>\u7b2c\u56db\u6b65\uff1a\u5c06\u9009\u5b9a\u7684\u7c07\uff08\u4f8b\u5982CAF-\u764c\u75c7\u76f8\u5173\u6210\u7ea4\u7ef4\u7ec6\u80de\uff09\u6620\u5c04\u5230\u5177\u6709\u80bf\u7624\u8f6e\u5ed3\u7684\u56fe\u50cf\u4e0a<\/p>\n<p>\u53ea\u6709\u80bf\u7624\u7684\u8f6e\u5ed3\u662f\u65e0\u6cd5\u8fdb\u884c\u5206\u6790\u7684\uff0c\u56e0\u6b64\uff0c\u5fc5\u987b\u8981\u5c06\u7279\u5b9a\u7684\u80bf\u7624\u7c07\u7ed8\u5236\u5230\u80bf\u7624\u7684\u8f6e\u5ed3\u4e0a\uff0c\u6211\u4eec\u9700\u8981\u5bfc\u5165\u989d\u5916\u7684\u5305\uff1adplyr\u3002\u7136\u540e\u6309\u7167\u4ee3\u7801\u5c06\u4e0e\u764c\u75c7\u76f8\u5173\u7684\u6210\u7ea4\u7ef4\u7ec6\u80de\uff08CAF\uff09\u6bd4\u5bf9\u81f3\u80bf\u7624\u8f6e\u5ed3\u4e0a\uff0c\u5728\u8bbe\u7f6e\u597d\u56db\u4e2a\u6837\u672c\u7684\u53c2\u6570\u540e\uff0c\u5373\u53ef\u5f97\u5230\u7ed3\u679c\u56fe\u3002<\/p>\n<p>## \u5c06\u80bf\u7624\u7684\u8f6e\u5ed3\u6bd4\u5bf9\u81f3\u764c\u75c7\u76f8\u5173\u7684\u6210\u7ea4\u7ef4\u7ec6\u80de<\/p>\n<p>map_clusters &lt;- function(clusters,fib_clu,tum_clu,SID,SOE,topleft,topright,bottomleft,bottomright,im){<\/p>\n<p>fnm = paste0(save_dir,&#8217;\/map_tumor_outline\/A&#8217;,SID,&#8217;_tumor_outline.png&#8217;)<\/p>\n<p>im = load.image(fnm)<\/p>\n<p>delta_x = mean(abs(topright[1]-topleft[1]),abs(bottomright[1]-bottomleft[1]))\/32<\/p>\n<p>delta_y = mean(abs(topright[2]-bottomright[2]),abs(topleft[2]-bottomleft[2]))\/34<\/p>\n<p>adjust_x = function(step){return((step-1)*(bottomleft[1]-topleft[1])\/34)}<\/p>\n<p>adjust_y = function(step){return((step-1)*(topright[2]-topleft[2])\/32)}<\/p>\n<p>tmp = SOE@meta.data$seurat_cluster<\/p>\n<p>Nclu = length(levels(tmp))<\/p>\n<p>nspots = length(tmp)<\/p>\n<p>mycolpalette1 = c(&#8216;orange&#8217;,&#8217;paleturquoise4&#8242;,&#8217;orchid&#8217;,&#8217;seagreen2&#8242;,&#8217;slateblue1&#8242;,&#8217;yellow&#8217;)<\/p>\n<p>mycolpalette = c(&#8216;red&#8217;,&#8217;darkgreen&#8217;,&#8217;blue&#8217;,&#8217;cyan&#8217;,&#8217;black&#8217;,&#8217;yellow&#8217;)<\/p>\n<p>mycols &lt;- c(rep(NA,length(tmp)))<\/p>\n<p>for (i in seq(1,nspots)){<\/p>\n<p>for (j in seq(1,length(fib_clu))){<\/p>\n<p>if ((as.character(tmp[i]) == fib_clu[j]) &amp;&amp; (as.character(tmp[i]) %in% clusters)){<\/p>\n<p>mycols[i] = mycolpalette1[j]<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>filenm = paste0(save_dir,&#8217;\/map_CAF_clusters&#8217;,&#8217;\/A&#8217;,SID,&#8217;_CAF.png&#8217;)<\/p>\n<p>png(filenm, width = 512, height = 512)<\/p>\n<p>par(mar = c(0,0,0,0),&#8217;bg&#8217;=&#8217;lightgray&#8217;) # set zero margins on all 4 sides<\/p>\n<p>plot(x = NULL, y = NULL, xlim = c(0,dim(im)[1]), ylim = c(0,dim(im)[2]), pch = &#8221;,<\/p>\n<p>xaxt = &#8216;n&#8217;, yaxt = &#8216;n&#8217;, xlab = &#8221;, ylab = &#8221;, xaxs = &#8216;i&#8217;, yaxs = &#8216;i&#8217;,<\/p>\n<p>bty = &#8216;n&#8217;) # plot empty figure<\/p>\n<p>rasterImage(im, xleft = 0, ybottom = 0, xright = dim(im)[1], ytop = dim(im)[2])<\/p>\n<p>points(topleft[1]+(d[,1]-1)*delta_x+apply(d,1,function(x){return(adjust_x(x[2]))}),<\/p>\n<p>topleft[2]-(d[,2]-1)*delta_y+apply(d,1,function(x){return(adjust_y(x[1]))}),<\/p>\n<p>col=mycols,pch=15,cex=2)<\/p>\n<p>dev.off()<\/p>\n<p>}<\/p>\n<p>##A4<\/p>\n<p>SID = &#8216;4&#8217;<\/p>\n<p>SOE = sample4<\/p>\n<p>fnm = paste0(image_dir,&#8217;\/Sample_&#8217;,SID,&#8217;_ds.jpg&#8217;)<\/p>\n<p>im = load.image(fnm)<\/p>\n<p>plot(im)<\/p>\n<p>xd = dim(im)[1]<\/p>\n<p>yd = dim(im)[2]<\/p>\n<p>topleft = c(58,yd-50)<\/p>\n<p>topright = c(1412,yd-64)<\/p>\n<p>bottomleft = c(48,yd-1512)<\/p>\n<p>bottomright = c(1400,yd-1524)<\/p>\n<p>delta_x = mean(abs(topright[1]-topleft[1]),abs(bottomright[1]-bottomleft[1]))\/32<\/p>\n<p>delta_y = mean(abs(topright[2]-bottomright[2]),abs(topleft[2]-bottomleft[2]))\/34<\/p>\n<p>adjust_x = function(step){return((step-1)*(bottomleft[1]-topleft[1])\/34)}<\/p>\n<p>adjust_y = function(step){return((step-1)*(topright[2]-topleft[2])\/32)}<\/p>\n<p>tmp = as.matrix(GetAssayData(object = SOE, assay = &#8220;SCT&#8221;, slot = &#8220;data&#8221;))<\/p>\n<p>tmp1 = colnames(tmp)<\/p>\n<p>tmp1 = substr(tmp1,4,100)<\/p>\n<p>colnames(tmp) = tmp1<\/p>\n<p>x = as.numeric(unlist(lapply(tmp1, function(x){strsplit(x,&#8221;x&#8221;)[[1]][1]})))<\/p>\n<p>y = as.numeric(unlist(lapply(tmp1, function(x){strsplit(x,&#8221;x&#8221;)[[1]][2]})))<\/p>\n<p>d = data.frame(x,y)<\/p>\n<p>fib_clu = c(&#8220;0&#8243;,&#8221;1&#8243;,&#8221;3&#8243;,&#8221;4&#8243;,&#8221;6&#8243;,&#8221;7&#8221;)<\/p>\n<p>tum_clu = c(&#8220;2&#8243;,&#8221;5&#8221;)<\/p>\n<p>clusters = c(&#8216;0&#8242;,&#8217;7&#8217;)<\/p>\n<p>map_clusters(clusters,fib_clu,tum_clu,SID,SOE,topleft,topright,bottomleft,bottomright,im)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"512\" height=\"512\" class=\"wp-image-27798\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-11.png?resize=512%2C512\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-11.png?w=512 512w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-11.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-11.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-11.png?resize=100%2C100 100w\" sizes=\"(max-width: 512px) 100vw, 512px\" data-recalc-dims=\"1\" \/> <img decoding=\"async\" loading=\"lazy\" width=\"512\" height=\"512\" class=\"wp-image-27799\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-12.png?resize=512%2C512\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-12.png?w=512 512w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-12.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-12.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-12.png?resize=100%2C100 100w\" sizes=\"(max-width: 512px) 100vw, 512px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A4-CAF<\/p>\n<p>A10-CAF<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"512\" height=\"512\" class=\"wp-image-27800\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-13.png?resize=512%2C512\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-13.png?w=512 512w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-13.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-13.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-13.png?resize=100%2C100 100w\" sizes=\"(max-width: 512px) 100vw, 512px\" data-recalc-dims=\"1\" \/> <img decoding=\"async\" loading=\"lazy\" width=\"512\" height=\"512\" class=\"wp-image-27801\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-14.png?resize=512%2C512\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-14.png?w=512 512w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-14.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-14.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-14.png?resize=100%2C100 100w\" sizes=\"(max-width: 512px) 100vw, 512px\" data-recalc-dims=\"1\" \/><\/p>\n<p>A5-CAF<\/p>\n<p>A12-CAF<\/p>\n<p>\u6211\u4eec\u5c06\u81ea\u5df1\u9009\u5b9a\u7684\u80bf\u7624\u7c07\uff08CAF\uff09\u6295\u5c04\u5230\u4e4b\u524d\u7ed8\u51fa\u7684\u8f6e\u5ed3\u56fe\u4e0a\uff0c\u5373\u53ef\u770b\u5230\u7279\u5b9a\u7684\u7c07\u5728\u6574\u4e2a\u80bf\u7624\u8f6e\u5ed3\u4e2d\u7684\u5206\u5e03\uff0c\u6700\u540e\u6211\u4eec\u8fd8\u9700\u8981\u5bf9\u6240\u7814\u7a76\u7684\u7c07\u548c\u6574\u4e2a\u80cc\u666f\u7c07\u8fdb\u884c\u57fa\u56e0\u7684\u5dee\u5f02\u8868\u8fbe\u5206\u6790\uff0c\u770b\u770b\u7a76\u7adf\u5728\u7279\u5b9a\u7684\u80bf\u7624\u7c07\u4e2d\u4ec0\u4e48\u6837\u7684\u57fa\u56e0\u662f\u8868\u8fbe\u6700\u4e30\u5bcc\u7684\u3002<\/p>\n<p>\u7b2c\u4e94\u6b65\uff1a\u53ef\u89c6\u5316\u7c07logFC<\/p>\n<p>\u5728\u8fd9\u4e00\u6b65\uff0c\u6211\u4eec\u5c31\u8981\u7528\u5230\u5728\u6587\u7ae0\u4e00\u5f00\u59cb\u63d0\u5230\u7684avg_logFC\u4e86\uff0c\u4e0d\u77e5\u9053\u5c0f\u4f19\u4f34\u4eec\u662f\u5426\u8fd8\u8bb0\u5f97\u5462\uff1f\u5982\u679c\u5fd8\u8bb0\u7684\u8bdd\u8d76\u5feb\u8fd4\u56de\u53bb\u770b\u4e00\u4e0b~<\/p>\n<p>\u4e3a\u4e86\u8ba9\u6211\u4eec\u7684\u56fe\u7247\u66f4\u52a0\u591a\u5f69\uff0c\u6211\u4eec\u9700\u8981\u65b0\u5bfc\u5165\u4e24\u4e2aR\u5305\uff1agplots\uff0cRcolorBrewer\u3002\u7136\u540e\u63d0\u53d6\u4e0d\u540c\u7c07\u4e2d\u7684\u6700\u9ad8\u548c\u6700\u4f4e\u7684\u5dee\u5f02\u5316\u8868\u8fbe\u7684\u57fa\u56e0\uff0c\u5e76\u8bb0\u5f55\u4ed6\u4eec\u7684\u6570\u91cf\u3002\u63a5\u7740\u63d0\u53d6\u51fa\u4e0d\u540c\u57fa\u56e0\u5728\u4e0d\u540c\u6837\u672c\u4e2d\u7684\u5dee\u5f02\u8868\u8fbe\u7a0b\u5ea6\uff0c\u4e5f\u5c31\u662f\u5e73\u5747\u5bf9\u6570\u6298\u53e0\u53d8\u5316-avg_logFC\uff0c\u5728\u8fd9\u4e2a\u57fa\u7840\u4e0a\uff0c\u6839\u636e\u5e73\u5747\u5bf9\u6570\u6298\u53e0\u53d8\u5316\u7684\u76f8\u5173\u6027\uff0c\u5bf9\u57fa\u56e0\u548c\u6837\u672c\u8fdb\u884c\u805a\u7c7b\u3002\u6700\u540e\uff0c\u9009\u62e9\u5177\u6709\u5dee\u5f02\u6027\u7684\u57fa\u56e0\uff0c\u8fdb\u884c\u53ef\u89c6\u5316\uff0c\u5c31\u53ef\u4ee5\u5f97\u5230\u4e0b\u9762\u7684\u4e24\u5e45\u56fe\u3002<\/p>\n<p># \u63d0\u53d6\u51fa\u57fa\u56e0\u7684\u5dee\u5f02\u8868\u8fbe\u4fe1\u606f<\/p>\n<p>genes = c()<\/p>\n<p>clusters = c()<\/p>\n<p>for (i in seq(1,length(files))){<\/p>\n<p>fnm = files[i]<\/p>\n<p>clu = unlist(strsplit(fnm,&#8217;.x&#8217;))[1]<\/p>\n<p>tmp1 = read.table(paste0(dir1,&#8217;\/&#8217;,fnm),header = TRUE, stringsAsFactors = F, check.names=F)<\/p>\n<p>tmp1 = tmp1[abs(tmp1$avg_logFC)&gt;0.15,]<\/p>\n<p>tmp1 = tmp1[tmp1$p_val&lt;0.01,]<\/p>\n<p>genes = c(genes,tmp1$gene[1:20])<\/p>\n<p>temp = tmp1[order(tmp1$avg_logFC,decreasing = FALSE),]<\/p>\n<p>genes = c(genes,temp$gene[1:20])<\/p>\n<p>clusters= c(clusters,clu)<\/p>\n<p>}<\/p>\n<p>genes = unique(genes)<\/p>\n<p>df = data.frame(matrix(0, ncol = length(clusters), nrow = length(genes)))<\/p>\n<p>row.names(df) = genes<\/p>\n<p>colnames(df) = clusters<\/p>\n<p>for (i in seq(1,length(files))){<\/p>\n<p>fnm = files[i]<\/p>\n<p>tmp1 = read.table(paste0(dir1,&#8217;\/&#8217;,fnm),header = TRUE, stringsAsFactors = F, check.names=F)<\/p>\n<p>for (j in seq(1,length(genes))){<\/p>\n<p>if (genes[j] %in% tmp1$gene){<\/p>\n<p>df[genes[j],i] = tmp1$avg_logFC[tmp1$gene==genes[j]]<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>my_palette &lt;- colorRampPalette(brewer.pal(10, &#8220;RdBu&#8221;))(256)<\/p>\n<p>data = data.matrix(df)<\/p>\n<p>## \u6839\u636e\u6700\u8fdc\u7684\u4e24\u4e2a\u5143\u7d20\u4e4b\u95f4\u7684\u8ddd\u79bb\u6765\u5408\u5e76\u4e0d\u540c\u7684\u7c07<\/p>\n<p>hr &lt;- hclust(as.dist(1-cor(t(data), method=&#8221;spearman&#8221;)), method=&#8221;complete&#8221;)<\/p>\n<p>hc &lt;- hclust(as.dist(1-cor(data, method=&#8221;spearman&#8221;)), method=&#8221;complete&#8221;)<\/p>\n<p>data[data&lt;(-1)] = -1<\/p>\n<p>data[data&gt;1] = 1<\/p>\n<p>filename = paste0(folder,&#8217;\/avg_logFC_heatmap_spearman.pdf&#8217;)<\/p>\n<p>pdf(filename,12,12)<\/p>\n<p>heatmap.2(data,<\/p>\n<p>col = rev(my_palette),<\/p>\n<p>Rowv=as.dendrogram(hr), Colv=as.dendrogram(hc),<\/p>\n<p>trace=&#8221;none&#8221;,<\/p>\n<p>scale = &#8220;none&#8221;,<\/p>\n<p>density.info=&#8221;none&#8221;,<\/p>\n<p>margins=c(5,6),<\/p>\n<p>lhei=c(1,8), lwid=c(1,4),<\/p>\n<p>keysize=0.2, key.par = list(cex=0.5),<\/p>\n<p>cexRow=0.9,cexCol=1.2,srtCol=90, # rotate column label<\/p>\n<p>key.title = &#8216;avg_logFC&#8217;,<\/p>\n<p>key.xlab = &#8216;avg_logFC&#8217;<\/p>\n<p>)<\/p>\n<p>dev.off()<\/p>\n<p>## \u4e3aCAF\u7ed8\u5236\u53ef\u89c6\u5316\u7684\u9009\u62e9\u7684\u57fa\u56e0<\/p>\n<p>genes = c(&#8216;ACTA2&#8242;,&#8217;S100A4&#8242;,&#8217;FAP&#8217;,&#8217;VIM&#8217;,&#8217;PDGFRB&#8217;,&#8217;PDGFRA&#8217;,&#8217;CD36&#8242;,&#8217;POSTN&#8217;,&#8217;COL1A1&#8242;)<\/p>\n<p>CAF_clusters = c(&#8220;A4_c0&#8221;, &#8220;A4_c1&#8221;, &#8220;A4_c3&#8221;, &#8220;A4_c4&#8221;, &#8220;A4_c6&#8221;, &#8220;A4_c7&#8221;,<\/p>\n<p>&#8220;A5_c0&#8221;, &#8220;A5_c1&#8221;, &#8220;A5_c2&#8221;, &#8220;A5_c3&#8221;, &#8220;A5_c4&#8221;, &#8220;A5_c6&#8221;,<\/p>\n<p>&#8220;A10_c0&#8221;, &#8220;A10_c1&#8221;, &#8220;A10_c4&#8221;,<\/p>\n<p>&#8220;A12_c2&#8221;, &#8220;A12_c3&#8221;, &#8220;A12_c4&#8221;)<\/p>\n<p>df = data.frame(matrix(0, ncol = length(CAF_clusters), nrow = length(genes)))<\/p>\n<p>row.names(df) = genes<\/p>\n<p>colnames(df) = CAF_clusters<\/p>\n<p>for (i in seq(1,length(CAF_clusters))){<\/p>\n<p>fnm = paste0(dir1,&#8217;\/&#8217;,CAF_clusters[i],&#8217;.xls&#8217;)<\/p>\n<p>tmp1 = read.table(fnm, header = TRUE, stringsAsFactors = F, check.names=F)<\/p>\n<p>for (j in seq(1,length(genes))){<\/p>\n<p>if (genes[j] %in% tmp1$gene){<\/p>\n<p>if (tmp1$p_val[tmp1$gene==genes[j]]&lt;0.01){<\/p>\n<p>df[genes[j],i] = tmp1$avg_logFC[tmp1$gene==genes[j]]<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>my_palette &lt;- colorRampPalette(brewer.pal(10, &#8220;RdBu&#8221;))(256)<\/p>\n<p>data = data.matrix(df)<\/p>\n<p>data[data&lt;(-1)] = -1<\/p>\n<p>data[data&gt;1] = 1<\/p>\n<p>filename = paste0(folder,&#8217;\/avg_logFC_CAF_genes.pdf&#8217;)<\/p>\n<p>pdf(filename,11,11)<\/p>\n<p>heatmap.2(data,<\/p>\n<p>col = rev(my_palette),<\/p>\n<p>dendrogram = &#8216;row&#8217;,<\/p>\n<p>Colv= FALSE,<\/p>\n<p>Rowv= TRUE,<\/p>\n<p>distfun = dist,<\/p>\n<p>hclustfun = hclust,<\/p>\n<p>trace=&#8221;none&#8221;,<\/p>\n<p>scale = &#8220;none&#8221;,<\/p>\n<p>density.info=&#8221;none&#8221;,<\/p>\n<p>margins=c(5,7),<\/p>\n<p>lhei=c(1,6), lwid=c(1,4),<\/p>\n<p>keysize=0.4, key.par = list(cex=0.5),<\/p>\n<p>cexRow=1.1,cexCol=1,srtCol=90, # rotate column label<\/p>\n<p>key.title = &#8216;avg_logFC&#8217;,<\/p>\n<p>key.xlab = &#8216;avg_logFC&#8217;<\/p>\n<p>)<\/p>\n<p>dev.off()<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"523\" class=\"wp-image-27802\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-15.png?resize=640%2C523\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-15.png?w=968 968w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-15.png?resize=300%2C245 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-15.png?resize=768%2C628 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-15.png?resize=600%2C490 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>avg-logFC-CAF<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"466\" class=\"wp-image-27803\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-16.png?resize=640%2C466\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-16.png?w=1075 1075w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-16.png?resize=300%2C218 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-16.png?resize=1024%2C745 1024w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-16.png?resize=768%2C559 768w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/02\/word-image-27787-16.png?resize=600%2C436 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/p>\n<p>avg-logFC-heatmap<\/p>\n<p>\u8fd9\u4e24\u5e45\u56fe\u4e2d\u7684\u7b2c\u4e00\u5e45\u56fe\u8868\u793a\u4e86\u4f17\u591a\u7684\u57fa\u56e0\u4e0e\u56db\u4e2a\u6837\u672c\u4e2d\u7684\u4e0d\u540c\u533a\u57df\u7684\u5dee\u5f02\u6027\uff0c\u53ef\u4ee5\u53d1\u73b0\u6709\u5f88\u591a\u8868\u8fbe\u5e76\u4e0d\u5177\u6709\u660e\u663e\u7684\u5dee\u5f02\u6027\u7684\u57fa\u56e0\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u5728\u6b64\u57fa\u7840\u4e4b\u4e0a\u8fdb\u884c\u9009\u62e9\uff0c\u5c06\u6700\u5177\u6709\u8868\u8fbe\u5dee\u5f02\u6027\u7684\u57fa\u56e0\u6311\u9009\u51fa\u6765\uff0c\u4e8e\u662f\u5c31\u6709\u4e86\u7b2c\u4e8c\u5e45\u56fe\uff0c\u4ece\u56fe\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0cCOL1A1\u5728\u56db\u4e2a\u6837\u672c\u4e4b\u95f4\u7684\u5dee\u5f02\u6027\u6700\u5927\uff0c\u56fe\u4e2d\u5de6\u4e0a\u89d2\u7684\u5443\u989c\u8272\u6761\u5e26\u8868\u660e\uff0c\u989c\u8272\u8d8a\u7ea2\uff0c\u6b63\u503c\u8d8a\u5927\uff0c\u5728\u524d\u4e00\u7ec4\u7684\u8868\u8fbe\u8d8a\u660e\u663e\uff0c\u989c\u8272\u8d8a\u84dd\uff0c\u8d1f\u503c\u8d8a\u5927\uff0c\u5728\u540e\u4e00\u7ec4\u7684\u8868\u8fbe\u8d8a\u660e\u663e\uff0c\u53ef\u4ee5\u770b\u5230COL1A1\u8fd9\u4e2a\u57fa\u56e0\u7684\u5dee\u5f02\u6027\u8fd8\u662f\u975e\u5e38\u7684\u5927\u7684\u3002<\/p>\n<p>\u5c0f\u679c\u7684\u5206\u4eab\u5c31\u5230\u8fd9\u91cc\u5566\uff0c\u4eca\u5929\u6211\u4eec\u5229\u7528Seurat\u5305\u4ee5\u53ca\u4e00\u4e9b\u76f8\u5173\u7684\u62d3\u5c55\u5305\u5b8c\u6210\u4e86\u521d\u6b65\u7684\u80bf\u7624\u5dee\u5f02\u5316\u5206\u6790\uff0c\u4e3b\u8981\u662f\u5bf9\u7279\u5b9a\u80bf\u7624\u7684\u57fa\u56e0\u5dee\u5f02\u8fdb\u884c\u4e86\u5206\u6790\uff0c\u4ece\u800c\u627e\u5230\u4e86\u5728\u80bf\u7624\u7c07\u4e2d\u5177\u6709\u8f83\u9ad8\u8868\u7684\u7684\u57fa\u56e0\uff0c\u8fd9\u5bf9\u4e8e\u540e\u7eed\u7684\u9776\u5411\u5206\u6790\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<p>\u5982\u679c\u5c0f\u4f19\u4f34\u4eec\u5728\u7ed8\u56fe\u7684\u8fc7\u7a0b\u4e2d\u6709\u4efb\u4f55\u7591\u95ee\uff0c\u53ef\u4ee5\u8bd5\u4e00\u8bd5\u6211\u4eec\u7684\u4e91\u751f\u4fe1\u5c0f\u5de5\u5177\u54e6\uff0c\u53ea\u8981\u8f93\u5165\u5408\u9002\u7684\u6570\u636e\u4ee5\u53ca\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\u751f\u4fe1\u5206\u6790\u7684\u8fc7\u7a0b\u4e2d\uff0cSeurat\u4e00\u76f4\u662f\u6211\u4eec\u7684\u201c\u4f20\u5bb6\u5b9d\u201d\uff0c\u662f\u4e00\u4e2a\u7528\u4e8e\u5355\u7ec6\u80de\u8f6c\u5f55\u7ec4\u6570\u636e\u5206\u6790\u7684R\u8bed\u8a00\u5305\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec [&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\/27787"}],"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=27787"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/27787\/revisions"}],"predecessor-version":[{"id":27804,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/27787\/revisions\/27804"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27787"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}