{"id":128,"date":"2023-05-19T20:00:10","date_gmt":"2023-05-19T12:00:10","guid":{"rendered":"https:\/\/www.kz-hub.tech\/?p=128"},"modified":"2023-05-19T20:00:41","modified_gmt":"2023-05-19T12:00:41","slug":"128","status":"publish","type":"post","link":"https:\/\/www.kz-hub.tech\/index.php\/2023\/05\/19\/128\/","title":{"rendered":"STAR-Fusion\u8f93\u51fa\u7ed3\u679c\u8f6c\u6362\u4e3aCircos\u8f93\u5165\u6587\u4ef6"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/STAR-Fusion\/STAR-Fusion\/blob\/devel\/util\/misc\/starF_to_circos.py\">STAR-Fusion Github<\/a><\/p>\n<pre><code class=\"language-python\">#!\/usr\/bin\/env python3\n\nimport sys, os, re\nimport pandas as pd\n\nusage = &quot;\\n\\tusage: {} fusions.tsv\\n\\n&quot;.format(sys.argv[0])\n\nif len(sys.argv) &lt; 2:\n    exit(usage)\n\nfusions_tsv = sys.argv[1]\n\ndf = pd.read_csv(fusions_tsv, sep=&quot;\\t&quot;)\n\ndef extract_brkpt_info(brkpt_info):\n\n    chrom, coord, orient = brkpt_info.split(&quot;:&quot;)\n\n    coord = int(coord)\n\n    if (orient == &#039;+&#039;):\n        coordA = coord - 1\n        coordB = coord\n    else:\n        coordA = coord\n        coordB = coord + 1\n\n    return (chrom, coordA, coordB)\n\nleft_brk_info = df[&#039;LeftBreakpoint&#039;].apply(extract_brkpt_info)\nleft_brk_pd = pd.DataFrame(left_brk_info.tolist(), columns=[&#039;chr1&#039;, &#039;start1&#039;, &#039;end1&#039;])\n\nright_brk_info = df[&#039;RightBreakpoint&#039;].apply(extract_brkpt_info)\nright_brk_pd = pd.DataFrame(right_brk_info.tolist(), columns=[&#039;chr2&#039;, &#039;start2&#039;, &#039;end2&#039;])\n\nout_df = pd.concat([left_brk_pd, right_brk_pd], axis=1)\nout_df.to_csv(f&quot;{fusions_tsv}.for_circos.tsv&quot;, sep=&quot;\\t&quot;, index=False)\n\nsys.exit(0)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>STAR-Fusion Github #!\/usr\/bin\/env python3 import sys, o&#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-128","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\/128","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=128"}],"version-history":[{"count":2,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/128\/revisions"}],"predecessor-version":[{"id":130,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/128\/revisions\/130"}],"wp:attachment":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/media?parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/categories?post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/tags?post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}