{"id":623,"date":"2025-09-10T16:43:50","date_gmt":"2025-09-10T08:43:50","guid":{"rendered":"https:\/\/www.kz-hub.tech\/?p=623"},"modified":"2025-09-10T16:43:50","modified_gmt":"2025-09-10T08:43:50","slug":"hotspot-%e5%8d%95%e7%bb%86%e8%83%9e%e8%81%9a%e7%b1%bb%e7%ae%97%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.kz-hub.tech\/index.php\/2025\/09\/10\/hotspot-%e5%8d%95%e7%bb%86%e8%83%9e%e8%81%9a%e7%b1%bb%e7%ae%97%e6%b3%95\/","title":{"rendered":"Hotspot-\u5355\u7ec6\u80de\u805a\u7c7b\u7b97\u6cd5"},"content":{"rendered":"<p>\u5b98\u7f51\u94fe\u63a5\uff1a<a href=\"https:\/\/github.com\/YosefLab\/Hotspot\">https:\/\/github.com\/YosefLab\/Hotspot<\/a><\/p>\n<pre><code class=\"language-python\"># \u53ef\u672c\u5730\u8fd0\u884c\u7684Hotspot\u4e0a\u6e38\n\n# \u670d\u52a1\u5668\u8fd0\u884cHotspot\u8ba1\u7b97\u5206\u6790\nimport pickle\nimport scanpy as sc\nimport hotspot\nimport pandas as pd\nimport numpy as np\nimport diopy\nimport pickle\nimport matplotlib.pyplot as plt\n\n# Load the saved results\nwith open(&quot;hotspot_results.pkl&quot;, &quot;rb&quot;) as f:\n    results = pickle.load(f)\n\n# Access the objects\nhs = results[&quot;hs&quot;]\n\nmodules = hs.create_modules(\n    min_gene_threshold=900, core_only=True, fdr_threshold=0.05)\n\nhs.plot_local_correlations()\nplt.gcf().savefig(&quot;min_gene900_local_correlations.pdf&quot;, bbox_inches=&quot;tight&quot;, dpi=300)\n\nmodule_scores = hs.calculate_module_scores()\n\n# Save results\nmodules.to_csv(&quot;modules.csv&quot;)\nmodule_scores.to_csv(&quot;module_scores.csv&quot;)\n\nresults = {\n    &quot;hs&quot;: hs,\n    &quot;modules&quot;: modules,\n    &quot;module_scores&quot;: module_scores,\n}\n\n# Save all results\nwith open(&quot;hotspot_results.pkl&quot;, &quot;wb&quot;) as f:\n    pickle.dump(results, f)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b98\u7f51\u94fe\u63a5\uff1ahttps:\/\/github.com\/YosefLab\/Hotspot # \u53ef\u672c\u5730\u8fd0\u884c\u7684Hotspo&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-623","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/comments?post=623"}],"version-history":[{"count":1,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/623\/revisions"}],"predecessor-version":[{"id":624,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/623\/revisions\/624"}],"wp:attachment":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/media?parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/categories?post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/tags?post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}