{"id":61040,"date":"2024-10-11T14:40:50","date_gmt":"2024-10-11T06:40:50","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=61040"},"modified":"2024-10-11T14:40:50","modified_gmt":"2024-10-11T06:40:50","slug":"%e7%a9%ba%e9%97%b4%e8%bd%ac%e5%bd%95%e7%bb%84%e4%b8%ad%e7%9a%84%e7%bb%86%e8%83%9e%e9%80%9a%e8%ae%af%e5%88%86%e6%9e%90%e4%bd%a0get%e5%88%b0%e4%ba%86%e5%90%97%ef%bc%9f%e5%a4%a7%e6%b5%b7%e5%93%a5","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=61040","title":{"rendered":"\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u4e2d\u7684\u7ec6\u80de\u901a\u8baf\u5206\u6790\u4f60get\u5230\u4e86\u5417\uff1f\u5927\u6d77\u54e5\u5e2e\u4f60\u8f7b\u677e\u641e\u5b9a\uff01"},"content":{"rendered":"\n<p><strong>\u524d\u8a00<\/strong><strong><\/strong><\/p>\n\n\n\n<p>\u6c89\u6d78\u5728\u6691\u671f\u5feb\u4e50\u65f6\u5149\u91cc\u7684\u5c0f\u4f19\u4f34\u4eec\u5feb\u6536\u6536\u5fc3\u5427\uff01\u5343\u4e07\u522b\u5fd8\u8bb0\u5927\u6d77\u54e5\u7684\u6bcf\u65e5\u5c0f\u8bfe\u5802\u554a\uff01\u538c\u5026\u4e86\u6e38\u620f\u3001\u77ed\u89c6\u9891\u7684\u5c0f\u4f19\u4f34\u6293\u7d27\u65f6\u95f4\u6765\u770b\u770b\u5927\u6d77\u54e5\u53c8\u7ed9\u5927\u5bb6\u5e26\u6765\u54ea\u4e9b\u65b0\u7684\u6280\u80fd\u4e86\uff01\u5355\u7ec6\u80de\u4e2d\u7684\u7ec6\u80de\u901a\u8baf\u90fd\u542c\u8bf4\u8fc7\u5427\uff0c\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u4e2d\u7684\u7ec6\u80de\u901a\u8baf\u5206\u6790\u4f60get\u5230\u4e86\u5417\uff1f\u4eca\u5929\u8ddf\u7740\u5927\u6d77\u54e5\u7684\u6b65\u4f10\u6765\u770b\u770b\u662f\u600e\u4e48\u4e2a\u662f\uff01\u5c0f\u4f19\u4f34\u4eec\u90fd\u77e5\u9053\u89e3\u7801\u7ec6\u80de\u95f4\u901a\u8baf\u5bf9\u4e8e\u7406\u89e3\u8bb8\u591a\u751f\u7269\u8fc7\u7a0b\u7684\u673a\u5236\u5f88\u91cd\u8981\uff0c\u4f46\u7531\u4e8e\u591a\u79cd\u56e0\u7d20\u7684\u6df7\u5408\u548c\u7f3a\u4e4f\u76f4\u63a5\u89c2\u5bdf\uff0c\u6240\u4e00\u6e05\u534e\u5927\u5b66\u751f\u7269\u4fe1\u606f\u5b66\u6559\u80b2\u90e8\u91cd\u70b9\u5b9e\u9a8c\u5ba4\u96f7\u4f1f\u56e2\u961f\u5f00\u53d1\u4e86\u4e00\u79cd\u4f7f\u7528\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u6570\u636e\u89e3\u7801\u7ec6\u80de\u95f4\u901a\u8baf\u7684\u65b9\u6cd5HoloNet\u3002\u5b83\u901a\u8fc7\u5c06\u914d\u4f53-\u53d7\u4f53\u5bf9\u3001\u7ec6\u80de\u7c7b\u578b\u7a7a\u95f4\u5206\u5e03\u548c\u4e0b\u6e38\u57fa\u56e0\u8868\u8fbe\u96c6\u6210\u5230\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u4e2d\u6765\u89e3\u7801\u7ec6\u80de\u95f4\u901a\u8baf\u3002\u5c0f\u4f19\u4f34\u4eec\u5feb\u6765\u5b66\u4e60\u5427\uff01\u751f\u4fe1\u5206\u6790\u4e0d\u719f\u6089\u7684\u5c0f\u4f19\u4f34\u4eec\u6b22\u8fce\u6765\u6ef4\u6ef4\u5927\u6d77\u54e5\uff0c\u5927\u6d77\u54e5\u5c31\u662f\u8fd9\u4e48\u7684\u5ba0\u7c89\uff0c\u6709\u4ec0\u4e48\u751f\u4fe1\u5206\u6790\u4e0a\u7684\u95ee\u9898\u5927\u5bb6\u5c3d\u7ba1\u54a8\u8be2\u5927\u6d77\u54e5\uff01\u6ca1\u6709\u65f6\u95f4\u5b66\u4e60\u7684\u5c0f\u4f19\u4f34\u4eec\u4e5f\u4e0d\u8981\u7740\u6025\u54e6\uff01\u6709\u9700\u8981\u751f\u4fe1\u5206\u6790\u7684\u5c0f\u4f19\u4f34\u4eec\u4e5f\u53ef\u4ee5\u627e\u5927\u6d77\u54e5\u54e6\uff01\u7ec3\u4e86\u5341\u5e74\u751f\u4fe1\u5206\u6790\u7684\u5927\u6d77\u54e5\u5bf9\u4e8e\u751f\u4fe1\u5206\u6790\u77e5\u8bc6\u5df2\u7ecf\u5982\u9c7c\u5f97\u6c34\u4ece\u5206\u6790\u5230\u53ef\u89c6\u5316\u76f4\u5230\u4f60\u6ee1\u610f\u4e3a\u6b62\uff01<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"576\" height=\"181\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628370812_EBD87C3F-4262-467d-B709-6370A5E5FEC7.png?resize=576%2C181\" alt=\"\" class=\"wp-image-61041\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628370812_EBD87C3F-4262-467d-B709-6370A5E5FEC7.png?w=576 576w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628370812_EBD87C3F-4262-467d-B709-6370A5E5FEC7.png?resize=300%2C94 300w\" sizes=\"(max-width: 576px) 100vw, 576px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>\u751f\u4fe1\u6570\u636e\u5904\u7406\u8d77\u6765\u5360\u7528\u5185\u5b58\u5b9e\u5728\u592a\u5927\u4e86\uff0c\u653e\u8fc7\u81ea\u5df1\u7684\u7535\u8111\u5427\uff01\u5927\u6d77\u54e5\u5728\u8fd9\u91cc\u7ed9\u5927\u5bb6\u9001\u4e0a\u798f\u5229\u4e86\uff0c\u6709\u9700\u8981\u670d\u52a1\u5668\u7684\u5c0f\u4f19\u4f34\u4eec\uff0c\u6b22\u8fce\u5927\u5bb6\u8054\u7cfb\u5927\u6d77\u54e5\uff0c\u4fdd\u8bc1\u670d\u52a1\u5668\u7684\u6027\u4ef7\u6bd4\u6700\u9ad8\u54e6\uff01<\/p>\n\n\n\n<p><strong>\u4ee3\u7801\u6559\u7a0b<\/strong><strong><\/strong><\/p>\n\n\n\n<p>\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u6f14\u793a\u5982\u4f55\u4f7f\u7528 HoloNet \u6765\u5206\u6790\u548c\u53ef\u89c6\u5316\u7ec6\u80de\u95f4\u901a\u4fe1\u5728\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u5b66\u6570\u636e\u4e2d\u7684\u5e94\u7528\u3002<\/p>\n\n\n\n<p>\u672c\u6559\u7a0b\u4e3b\u8981\u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<ul>\n<li>\u52a0\u8f7d\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u6570\u636e\u3002<\/li>\n\n\n\n<li>\u5728\u5355\u7ec6\u80de\u4e4b\u95f4\u6784\u5efa\u591a\u89c6\u56fe\u901a\u4fe1\u4e8b\u4ef6\uff08CE\uff09\u7f51\u7edc\uff08\u6bcf\u4e2aLR\u5bf9\u5e94\u4e00\u4e2a\u89c6\u56fe\uff09\u3002<\/li>\n\n\n\n<li>\u57fa\u4e8e\u591a\u89c6\u56fe\u7f51\u7edc\u7684\u901a\u4fe1\u53ef\u89c6\u5316\u3002<\/li>\n\n\n\n<li>\u5176\u4ed6\u5206\u6790\u65b9\u6cd5\uff08\u4f8b\u5982\u805a\u7c7b LR \u5bf9\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<p>#\u5b89\u88c5<\/p>\n\n\n\n<p>pip install HoloNet<\/p>\n\n\n\n<p>HoloNet \u9700\u8981\u4e09\u4e2a\u8f93\u5165\uff1a<\/p>\n\n\n\n<ol type=\"1\">\n<li>\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u6570\u636e\uff08\u5305\u62ec\u57fa\u56e0\u8868\u8fbe\u77e9\u9635\u548c\u7a7a\u95f4\u4fe1\u606f\uff09\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u5728\u6b64\u7248\u672c\u7684 HoloNet \u4e2d\uff0c\u6211\u4eec\u652f\u6301\u57fa\u4e8e Scanpy \u52a0\u8f7d\u7684\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u6570\u636e\u3002<\/p>\n\n\n\n<ul>\n<li>\u7ec6\u80de\u7c7b\u578b\u4fe1\u606f\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u6765\u81ea\u53cd\u5377\u79ef\u65b9\u6cd5\u7684\u7ec6\u80de\u7c7b\u578b\u767e\u5206\u6bd4\u66f4\u503e\u5411\u4e8e\u4fdd\u5b58\u5728adata.obsm[&#8216;predicted_cell_type&#8217;]\u4e2d\u3002<\/p>\n\n\n\n<p>\u5206\u7c7b\u7ec6\u80de\u7c7b\u578b\u6807\u7b7e\u66f4\u613f\u610f\u4fdd\u5b58\u5728adata.obs[&#8216;cell_type&#8217;]\u4e2d\u3002<\/p>\n\n\n\n<ul>\n<li>\u5177\u6709\u6210\u5bf9\u914d\u4f53\u548c\u53d7\u4f53\u57fa\u56e0\u7684\u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n\n\n\n<p>pandas \u6570\u636e\u5fc5\u987b\u5305\u542b\u4e24\u5217\uff1a\u201cLigand_gene_symbol\u201d\u548c\u201cReceptor_gene_symbol\u201d\u3002<\/p>\n\n\n\n<p>#\u52a0\u8f7d\u6240\u6709python\u5e93<\/p>\n\n\n\n<p>import HoloNet as hn<\/p>\n\n\n\n<p>import os<\/p>\n\n\n\n<p>import pandas as pd<\/p>\n\n\n\n<p>import numpy as np<\/p>\n\n\n\n<p>import scanpy as sc<\/p>\n\n\n\n<p>import matplotlib.pyplot as plt<\/p>\n\n\n\n<p>import torch<\/p>\n\n\n\n<p>import warnings<\/p>\n\n\n\n<p>warnings.filterwarnings(&#8216;ignore&#8217;)<\/p>\n\n\n\n<p>hn.set_figure_params(tex_fonts=False)<\/p>\n\n\n\n<p>sc.settings.figdir = &#8216;.\/figures\/&#8217;<\/p>\n\n\n\n<p>\u52a0\u8f7d\u793a\u4f8b\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u6570\u636e<\/p>\n\n\n\n<p>\u6211\u4eec\u4e3a 10x Genomics \u7f51\u7ad9\u7684\u7528\u6237\u51c6\u5907\u4e86\u4e00\u4e2a\u4e73\u817a\u764c\u6570\u636e\u96c6\u793a\u4f8b\u3002 \u6211\u4eec\u5bf9\u6570\u636e\u96c6\u8fdb\u884c\u4e86\u9884\u5904\u7406\uff0c\u5305\u62ec\u8fc7\u6ee4\u3001\u5f52\u4e00\u5316\u548c\u7ec6\u80de\u7c7b\u578b\u6807\u6ce8\u3002 \u7528\u6237\u53ef\u4ee5\u901a\u8fc7hn.pp.load_brca_visium_10x()\u52a0\u8f7d\u793a\u4f8b\u6570\u636e\u96c6\u3002<\/p>\n\n\n\n<p>adata = hn.pp.load_brca_visium_10x()<\/p>\n\n\n\n<p>\u672c\u6559\u7a0b\u4e2d\u7ed8\u56fe\u51fd\u6570\u7684\u53c2\u6570\u4e3b\u8981\u7ee7\u627f\u81ea\u4e24\u4e2a\u57fa\u7840\u7ed8\u56fe\u51fd\u6570\uff1a<\/p>\n\n\n\n<ul>\n<li>HoloNet.plotting.feature_plot\uff08\uff09<\/li>\n\n\n\n<li>HoloNet.plotting.cell_type_level_network\uff08\uff09<\/li>\n<\/ul>\n\n\n\n<p>\u53ef\u89c6\u5316\u6bcf\u4e2a\u70b9\u7684\u7ec6\u80de\u7c7b\u578b\u767e\u5206\u6bd4<\/p>\n\n\n\n<p>hn.pl.plot_cell_type_proportion(adata, plot_cell_type=&#8217;stroma&#8217;)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"368\" height=\"375\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628439996_32A6E823-D269-4058-B68B-2827BFB904D8.png?resize=368%2C375\" alt=\"\" class=\"wp-image-61042\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628439996_32A6E823-D269-4058-B68B-2827BFB904D8.png?w=368 368w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628439996_32A6E823-D269-4058-B68B-2827BFB904D8.png?resize=294%2C300 294w\" sizes=\"(max-width: 368px) 100vw, 368px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>##\u7ec6\u80de\u7c7b\u578b\u6ce8\u91ca<\/p>\n\n\n\n<p>sc.pl.spatial(adata, color=[&#8216;cell_type&#8217;], size=1.4, alpha=0.7,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;palette=hn.brca_default_color_celltype)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"435\" height=\"341\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628472759_284F286E-06AA-48a0-8527-6644AB89AB56.png?resize=435%2C341\" alt=\"\" class=\"wp-image-61043\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628472759_284F286E-06AA-48a0-8527-6644AB89AB56.png?w=435 435w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628472759_284F286E-06AA-48a0-8527-6644AB89AB56.png?resize=300%2C235 300w\" sizes=\"(max-width: 435px) 100vw, 435px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>\u52a0\u8f7d\u914d\u4f53\u53d7\u4f53\u6570\u636e\u5e93<\/p>\n\n\n\n<p>\u6211\u4eec\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5305\u542b\u6210\u5bf9\u914d\u4f53\u548c\u53d7\u4f53\u57fa\u56e0\u7684\u6570\u636e\u5e93\u3002 \u52a0\u8f7d\u6570\u636e\u5e93\u5e76\u8fc7\u6ee4 LR \u5bf9\uff0c\u9700\u8981\u8868\u8fbe\u914d\u4f53\u548c\u53d7\u4f53\u57fa\u56e0\u5728\u4e00\u5b9a\u6bd4\u4f8b\u7684\u7ec6\u80de\u4e2d\u3002<\/p>\n\n\n\n<p>interaction_db, cofactor_db, complex_db = hn.pp.load_lr_df(human_or_mouse=&#8217;human&#8217;)<\/p>\n\n\n\n<p>expressed_lr_df = hn.pp.get_expressed_lr_df(interaction_db, complex_db, adata)<\/p>\n\n\n\n<p>expressed_lr_df.shape<\/p>\n\n\n\n<p>\u6211\u4eec\u8fd8\u5141\u8bb8\u8bbf\u95ee\u57fa\u4e8e MITAB \u89c4\u8303\u5316\u547d\u540d\u6cd5\u7684\u914d\u4f53-\u53d7\u4f53\u5bf9\u6570\u636e\u5e93\u3002 \u6211\u4eec\u5728\u8fd9\u91cc\u63d0\u4f9b\u6837\u672c\uff0c\u4ee5\u4fbf\u7528\u6237\u53ef\u4ee5\u5bfc\u5165\u7b26\u5408MITAB\u7684\u914d\u4f53\u53d7\u4f53\u6570\u636e\u5e93\u5e76\u66ff\u6362\u3002<\/p>\n\n\n\n<p>pd.set_option(&#8216;display.max_columns&#8217;, None)<\/p>\n\n\n\n<p>interaction_db_MITAB = pd.read_csv(&#8216;cellchatdb_human_interaction_example_with_MITAB.csv&#8217;, index_col=0)<\/p>\n\n\n\n<p>interaction_db_MITAB.head()<\/p>\n\n\n\n<p>expressed_lr_df = hn.pp.get_expressed_lr_df(interaction_db_MITAB, complex_db, adata)<\/p>\n\n\n\n<p>\u6784\u5efa\u591a\u89c6\u56feCE\u7f51\u7edc<\/p>\n\n\n\n<p>w_best = hn.tl.default_w_visium(adata)<\/p>\n\n\n\n<p>hn.pl.select_w(adata, w_best=w_best)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"446\" height=\"434\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628500215_DD61EA8E-F22D-400f-8FB1-FEBD1DB160A4.png?resize=446%2C434\" alt=\"\" class=\"wp-image-61044\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628500215_DD61EA8E-F22D-400f-8FB1-FEBD1DB160A4.png?w=446 446w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628500215_DD61EA8E-F22D-400f-8FB1-FEBD1DB160A4.png?resize=300%2C292 300w\" sizes=\"(max-width: 446px) 100vw, 446px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>\u5728\u6b64\u57fa\u7840\u4e0a\uff0c\u6211\u4eec\u53ef\u4ee5\u6784\u5efa\u591a\u89c6\u89d2\u901a\u4fe1\u7f51\u7edc\u3002\u6211\u4eec\u8ba1\u7b97\u4e86\u591a\u89c6\u56fe\u901a\u4fe1\u7f51\u7edc\u7684\u8fb9\u7f18\u6743\u91cd\u3002 \u968f\u7740\u914d\u4f53\u7684\u5f52\u5c5e\u589e\u52a0\uff0c\u53ef\u4ee5\u4e3a\u5206\u6ccc\u7684\u914d\u4f53\u548c\u8d28\u819c\u7ed3\u5408\u914d\u4f53\u8bbe\u7f6e\u4e0d\u540c\u7684\u914d\u4f53\u3002\u7136\u540e\uff0c\u6211\u4eec\u8fc7\u6ee4\u5177\u6709\u4f4e\u7279\u5f02\u6027\u7684\u901a\u4fe1\u7f51\u7edc\u7684\u8fb9\u7f18\u6743\u91cd\u3002<\/p>\n\n\n\n<p>elements_expr_df_dict = hn.tl.elements_expr_df_calculate(expressed_lr_df, complex_db, cofactor_db, adata)<\/p>\n\n\n\n<p>ce_tensor = hn.tl.compute_ce_tensor(expressed_lr_df, w_best, elements_expr_df_dict, adata)<\/p>\n\n\n\n<p>filtered_ce_tensor = hn.tl.filter_ce_tensor(ce_tensor, adata, expressed_lr_df, elements_expr_df_dict, w_best)<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u4ee5\u4e0b\u9aa4\u5c06\u6d88\u8017\u5927\u91cf\u5185\u5b58\u3002 \u5982\u679c\u5185\u5b58\u4e0d\u8db3\uff0c\u53ef\u4ee5\u9009\u62e9\u4ec5\u8ba1\u7b97\u914d\u4f53-\u53d7\u4f53\u5bf9\u8f83\u5c11\u7684\u901a\u4fe1\u7f51\u7edc\uff0c\u5e76\u8c03\u4f4e\u53c2\u6570\u7684\u503c\uff0c\u6b64\u5916\uff0c\u60a8\u53ef\u4ee5\u8bbe\u7f6e\u6216\u4e0b\u91c7\u6837\u6570\u636e\u96c6\u4ee5\u51cf\u5c11\u5185\u5b58\u6d88\u8017\u3002<\/p>\n\n\n\n<p>import random<\/p>\n\n\n\n<p>cut_porp = 2<\/p>\n\n\n\n<p>adata_subset = adata[random.sample(list(adata.obs_names), round(adata.shape[0] \/ cut_porp))]<\/p>\n\n\n\n<p>elements_expr_df_dict = hn.tl.elements_expr_df_calculate(expressed_lr_df, complex_db, cofactor_db, adata_subset)<\/p>\n\n\n\n<p>ce_tensor = hn.tl.compute_ce_tensor(expressed_lr_df, w_best, elements_expr_df_dict, adata_subset)<\/p>\n\n\n\n<p>filtered_ce_tensor = hn.tl.filter_ce_tensor(ce_tensor, adata_subset, expressed_lr_df,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elements_expr_df_dict, w_best, copy=False)<\/p>\n\n\n\n<p>\u53ef\u89c6\u5316 CE<\/p>\n\n\n\n<p>\u57fa\u4e8e\u591a\u89c6\u56feCE\u7f51\u7edc\uff0c\u6211\u4eec\u63d0\u4f9b\u4e24\u79cd\u53ef\u89c6\u5316\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<ul>\n<li>\u7528\u4e8e\u53ef\u89c6\u5316\u7ec6\u80de\u4e2d\u5fc3\u7684CE\u70ed\u70b9\u56fe\u3002\u63d0\u4f9b\u4e24\u79cd\u8ba1\u7b97\u65b9\u6cd5\uff1a<\/li>\n\n\n\n<li>Degree centrality: out-degree + in-degree\uff0c\u5fe0\u5b9e\u5730\u53cd\u6620\u4e86\u4e0e\u6bcf\u4e2a\u70b9\u76f8\u5173\u7684CE\u5f3a\u5ea6\u3002<\/li>\n\n\n\n<li>\u7279\u5f81\u5411\u91cf\u4e2d\u5fc3\u6027:\u53cd\u6620\u901a\u4fe1\u6d3b\u8dc3\u7684\u6838\u5fc3\u533a\u57df\u3002<\/li>\n\n\n\n<li>\u7ec6\u80de\u7c7b\u578b\u7ea7\u522b\u7684CE\u7f51\u7edc:<\/li>\n<\/ul>\n\n\n\n<p>\u7ec6\u80de\u7c7b\u578b\u95f4\u7684CE\u5f3a\u5ea6<\/p>\n\n\n\n<p>CE \u70ed\u70b9\u56fe<\/p>\n\n\n\n<p>TGFB1\uff1a\uff08TGFBR1+TGFBR2\uff09 CE\u7f51\u7edc\u4e2d\u5404\u70b9\u7684\u5ea6\u4e2d\u5fc3\u6027\u3002TGFB1\uff1a\uff08TGFBR1+TGFBR2\uff09\u901a\u4fe1\u6d3b\u8dc3\u7684\u53cd\u5c04\u533a\u57df\u3002<\/p>\n\n\n\n<p>hn.pl.ce_hotspot_plot(filtered_ce_tensor, adata,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lr_df=expressed_lr_df, plot_lr=&#8217;TGFB1:(TGFBR1+TGFBR2)&#8217;)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"399\" height=\"398\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628626819_40DF09A5-3978-4e87-AF17-E9D9062EFDD9.png?resize=399%2C398\" alt=\"\" class=\"wp-image-61045\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628626819_40DF09A5-3978-4e87-AF17-E9D9062EFDD9.png?w=399 399w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628626819_40DF09A5-3978-4e87-AF17-E9D9062EFDD9.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628626819_40DF09A5-3978-4e87-AF17-E9D9062EFDD9.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628626819_40DF09A5-3978-4e87-AF17-E9D9062EFDD9.png?resize=100%2C100 100w\" sizes=\"(max-width: 399px) 100vw, 399px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>\u57fa\u4e8e\u7279\u5f81\u5411\u91cf\u4e2d\u5fc3\u5ea6\u7684\u70ed\u70b9\u56fe\u3002\u8be5\u56fe\u6bd4\u57fa\u4e8e\u5ea6\u4e2d\u5fc3\u6027\u7684\u56fe\u66f4\u597d\u5730\u68c0\u6d4b\u51fa\u4e86\u4e00\u4e2a\u6e05\u6670\u7684\u4e2d\u5fc3\u3002<\/p>\n\n\n\n<p>hn.pl.ce_hotspot_plot(filtered_ce_tensor, adata,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lr_df=expressed_lr_df, plot_lr=&#8217;TGFB1:(TGFBR1+TGFBR2)&#8217;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;centrality_measure=&#8217;eigenvector&#8217;)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"358\" height=\"365\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628659269_764F7519-C68A-4d38-84BD-C9B6A176EE27.png?resize=358%2C365\" alt=\"\" class=\"wp-image-61046\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628659269_764F7519-C68A-4d38-84BD-C9B6A176EE27.png?w=358 358w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628659269_764F7519-C68A-4d38-84BD-C9B6A176EE27.png?resize=294%2C300 294w\" sizes=\"(max-width: 358px) 100vw, 358px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>\u7ec6\u80de\u7c7b\u578b\u95f4\u7684CE\u5f3a\u5ea6<\/p>\n\n\n\n<p>##\u52a0\u8f7d\u6bcf\u4e2a\u70b9\u7684\u7ec6\u80de\u7c7b\u578b\u767e\u5206\u6bd4<\/p>\n\n\n\n<p>cell_type_mat, \\<\/p>\n\n\n\n<p>cell_type_names = hn.pr.get_continuous_cell_type_tensor(adata, continuous_cell_type_slot = &#8216;predicted_cell_type&#8217;,)<\/p>\n\n\n\n<p>\u7ed8\u5236\u7ec6\u80de\u7c7b\u578b\u95f4\u7684CE \u7f51\u7edc\u3002 \u8fb9\u7f18\u7684\u539a\u5ea6\u4ee3\u8868\u4e86\u4e24\u79cd\u7ec6\u80de\u7c7b\u578b\u4e4b\u95f4\u901a\u8baf\u7684\u5f3a\u5ea6\uff1aTGFB1\uff1a\uff08TGFBR1+TGFBR2\uff09\u3002<\/p>\n\n\n\n<p>_ = hn.pl.ce_cell_type_network_plot(filtered_ce_tensor, cell_type_mat, cell_type_names,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lr_df=expressed_lr_df, plot_lr=&#8217;TGFB1:(TGFBR1+TGFBR2)&#8217;, edge_thres=0.2,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;palette=hn.brca_default_color_celltype)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"390\" height=\"390\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628688215_EA2AC577-F543-41ac-AF84-183A07A913AB.png?resize=390%2C390\" alt=\"\" class=\"wp-image-61047\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628688215_EA2AC577-F543-41ac-AF84-183A07A913AB.png?w=390 390w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628688215_EA2AC577-F543-41ac-AF84-183A07A913AB.png?resize=300%2C300 300w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628688215_EA2AC577-F543-41ac-AF84-183A07A913AB.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628688215_EA2AC577-F543-41ac-AF84-183A07A913AB.png?resize=100%2C100 100w\" sizes=\"(max-width: 390px) 100vw, 390px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>LR \u5bf9\u805a\u7c7b:&nbsp;\u6839\u636e\u6bcf\u4e2a\u70b9\u7684\u4e2d\u5fc3\u6027\u5bf9\u914d\u4f53-\u53d7\u4f53\u5bf9\u8fdb\u884c\u805a\u7c7b\u3002<\/p>\n\n\n\n<p>cell_cci_centrality = hn.tl.compute_ce_network_eigenvector_centrality(filtered_ce_tensor)<\/p>\n\n\n\n<p>clustered_expressed_LR_df,_ = hn.tl.cluster_lr_based_on_ce(filtered_ce_tensor, adata, expressed_lr_df,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;w_best=w_best, cell_cci_centrality=cell_cci_centrality)<\/p>\n\n\n\n<p>\u7528\u4e8e\u5206\u5c42\u805a\u7c7b\u6240\u6709\u914d\u4f53-\u53d7\u4f53\u5bf9\u7684\u6811\u72b6\u56fe\u3002<\/p>\n\n\n\n<p>hn.pl.lr_clustering_dendrogram(_, expressed_lr_df, [&#8216;TGFB1:(TGFBR1+TGFBR2)&#8217;],<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dflt_col = &#8216;#333333&#8217;,)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"533\" height=\"435\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628765002_79C0C3F1-6814-4745-BA47-63AFE33CEE86.png?resize=533%2C435\" alt=\"\" class=\"wp-image-61048\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628765002_79C0C3F1-6814-4745-BA47-63AFE33CEE86.png?w=533 533w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628765002_79C0C3F1-6814-4745-BA47-63AFE33CEE86.png?resize=300%2C245 300w\" sizes=\"(max-width: 533px) 100vw, 533px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>\u6bcf\u4e2a\u914d\u4f53-\u53d7\u4f53\u7c07\u7684CE\u70ed\u56fe\uff08\u5c06\u6240\u6709\u7ec6\u80de\u7684CE\u70ed\u70b9\u53e0\u52a0\u5728\u4e00\u4e2a\u7c07\u4e2d\uff09\u3002<\/p>\n\n\n\n<p>hn.pl.lr_cluster_ce_hotspot_plot(lr_df=clustered_expressed_LR_df,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cell_cci_centrality=cell_cci_centrality,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adata=adata)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"554\" height=\"515\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628797090_642AADBE-C4B6-4775-9882-CE8C483FD4F1.png?resize=554%2C515\" alt=\"\" class=\"wp-image-61049\" srcset=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628797090_642AADBE-C4B6-4775-9882-CE8C483FD4F1.png?w=554 554w, https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/10\/1728628797090_642AADBE-C4B6-4775-9882-CE8C483FD4F1.png?resize=300%2C279 300w\" sizes=\"(max-width: 554px) 100vw, 554px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p><strong>\u5c0f\u7ed3<\/strong><strong><\/strong><\/p>\n\n\n\n<p>HoloNet\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u89e3\u51b3\u8bb8\u591a\u751f\u7269\u5b66\u95ee\u9898\u3002\u4f8b\u5982\uff0c\u4e0e\u672c\u6587\u4e2d\u4ecb\u7ecd\u7684\u5206\u6790\u7c7b\u4f3c\uff0c\u7528\u6237\u53ef\u4ee5\u4f7f\u7528 HoloNet \u6765\u5206\u6790\u5fae\u73af\u5883\u4e2d\u5176\u4ed6\u7ec6\u80de\u7c7b\u578b\u7684\u7ec6\u80de\u8868\u8fbe\u8c31\u5982\u4f55\u5f71\u54cd\u3002\u901a\u8fc7\u63d0\u4f9b\u6cbb\u7597\u524d\u548c\u6cbb\u7597\u540e\u7684\u7a7a\u95f4\u6570\u636e\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u5206\u6790\u6cbb\u7597\u5982\u4f55\u5f71\u54cd\u7ec4\u7ec7\u5185\u7684\u5b8c\u6574\u901a\u4fe1\u666f\u89c2\uff0c\u4e86\u89e3\u610f\u60f3\u4e0d\u5230\u7684\u6cbb\u7597\u7ed3\u679c\uff0c\u5e76\u5f00\u53d1\u65b0\u7684\u75be\u75c5\u5e72\u9884\u63aa\u65bd\u3002HoloNet\u53ef\u4ee5\u5e94\u7528\u4e8e\u5404\u79cd\u7a7a\u95f4\u8f6c\u5f55\u7ec4\u6570\u636e\u3002\u57fa\u4e8e\u5355\u7ec6\u80de\u7684\u7a7a\u95f4\u6280\u672f\uff0c\u5982SeqFISH\u548cMERFISH\uff0c\u4e5f\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u88ab\u7528\u4f5c\u8f93\u5165\u3002\u6700\u540e\u5927\u6d77\u54e5\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e00\u4e2a\u4e91\u5de5\u5177\uff01\u540c\u5b66\u4eec\u5982\u679c\u89c9\u5f97\u81ea\u5df1\u7684\u4ee3\u7801\u6c34\u5e73\u4e00\u822c\uff0c\u5bf9\u4e8e\u5f88\u591a\u7684\u53c2\u6570\u4e0d\u77e5\u9053\u600e\u4e48\u6539\uff0c\u53ef\u4ee5\u4f53\u9a8c\u4e00\u4e0b\u6211\u4eec\u7684\u4e91\u751f\u4fe1\u5c0f\u5de5\u5177\uff0c\u53ea\u9700\u8f93\u5165\u6570\u636e\uff0c\u5373\u53ef\u8f7b\u677e\u751f\u6210\u6240\u9700\u56fe\u8868\uff0c\u5b57\u4f53\u5927\u5c0f\u3001\u6807\u9898\u7b49\u4e5f\u53ef\u4e00\u952e\u66f4\u6539\u3002\u611f\u5174\u8da3\u7684\u5c0f\u4f19\u4f34\u53bb\u4e91\u751f\u4fe1\uff08http:\/\/www.biocloudservice.com\/home.html\uff09\u4f53\u9a8c\u4e00\u4e0b\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u6c89\u6d78\u5728\u6691\u671f\u5feb\u4e50\u65f6\u5149\u91cc\u7684\u5c0f\u4f19\u4f34\u4eec\u5feb\u6536\u6536\u5fc3\u5427\uff01\u5343\u4e07\u522b\u5fd8\u8bb0\u5927\u6d77\u54e5\u7684\u6bcf\u65e5\u5c0f\u8bfe\u5802\u554a\uff01\u538c\u5026\u4e86\u6e38\u620f\u3001\u77ed\u89c6\u9891\u7684\u5c0f\u4f19\u4f34\u6293\u7d27 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61040"}],"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=61040"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61040\/revisions"}],"predecessor-version":[{"id":61050,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61040\/revisions\/61050"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61040"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}