{"id":116,"date":"2023-04-28T10:02:35","date_gmt":"2023-04-28T02:02:35","guid":{"rendered":"https:\/\/www.kz-hub.tech\/?p=116"},"modified":"2023-07-05T16:10:38","modified_gmt":"2023-07-05T08:10:38","slug":"manta-%e9%89%b4%e5%ae%9a%e5%87%ba%e7%9a%84%e7%bb%93%e6%9e%84%e5%8f%98%e5%bc%82%ef%bc%88sv%ef%bc%89%e7%9a%84vcf%e6%b3%a8%e9%87%8a","status":"publish","type":"post","link":"https:\/\/www.kz-hub.tech\/index.php\/2023\/04\/28\/manta-%e9%89%b4%e5%ae%9a%e5%87%ba%e7%9a%84%e7%bb%93%e6%9e%84%e5%8f%98%e5%bc%82%ef%bc%88sv%ef%bc%89%e7%9a%84vcf%e6%b3%a8%e9%87%8a\/","title":{"rendered":"Manta \u9274\u5b9a\u51fa\u7684\u7ed3\u6784\u53d8\u5f02\uff08SV\uff09\u7684vcf\u6ce8\u91ca"},"content":{"rendered":"<h1>manta\u751f\u6210\u7684\u5305\u542bstructural variants\uff08SV\uff09\u7ed3\u6784\u53d8\u5f02\u7684\u6ce8\u91cavcf\u6587\u4ef6\uff0c\u901a\u8fc7\u67d3\u8272\u4f53\u4f4d\u7f6e\u83b7\u5f97\u57fa\u56e0symbol\u540d\u79f0<\/h1>\n<h2>\u9996\u5148\u786e\u5b9a\u6d41\u7a0b\uff1a<\/h2>\n<p><em>.vcf(\u5305\u542b\u8d77\u59cb\u4f4d\u70b9\uff0c\u67d3\u8272\u4f53)----&gt; <\/em>.annotated.vcf(\u5305\u542b\u57fa\u56e0\u540d\u79f0)<\/p>\n<p>\u901a\u8fc7\u6d41\u7a0b\u53ef\u77e5\uff1a<br \/>\n\u6211\u4eec\u9700\u8981bed\u6587\u4ef6\u3002\u56e0\u4e3abed\u6587\u4ef6\u5305\u542b\uff1a<br \/>\n\u67d3\u8272\u4f53\u5e8f\u53f7\uff0c\u8d77\uff0c\u6b62\u4f4d\u70b9\uff0c\u57fa\u56e0\u7684symbol<\/p>\n<h2>\u521b\u5efa\u865a\u62df\u73af\u5883<\/h2>\n<pre><code>conda create -n bcftools\nconda activate bcftools<\/code><\/pre>\n<h2>\u5b89\u88c5\u8f6f\u4ef6tabix\u548cbcftools\uff1a<\/h2>\n<pre><code>conda install -c bioconda bcftools\nconda install -c bioconda tabix<\/code><\/pre>\n<h2>\u8fd9\u65f6\u5019\u76f4\u63a5\u6572bcftools\uff0c\u5982\u51fa\u73b0\u62a5\u9519\uff0c\u8bf4\u660e\u8fd8\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528bcftools\uff1a<\/h2>\n<pre><code>error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory<\/code><\/pre>\n<p>.so\u6587\u4ef6\u662f\u52a8\u6001\u5e93\u6587\u4ef6\uff0c\u5e93\u5305\u542b\u7684\u662f\u7a0b\u5e8f\u8fd0\u884c\u9700\u8981\u7684\u51fd\u6570\u5e93\uff0clibbz2.so\u662fbzip2\u7684\u5e93\u6587\u4ef6\uff0c\u90a3\u4e48\u4e0b\u8f7d\u4e00\u4e2abzip\u4e0d\u5c31\u6709\u4e86\u561b<\/p>\n<pre><code>conda install -c conda-forge bzip2<\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\u518d\u6572bcftools\uff0c\u51fa\u73b0\u4e86\u8be5\u8f6f\u4ef6\u7684\u8bf4\u660e\u6587\u6863<\/p>\n<h2>\u6570\u636e\u51c6\u5907\uff1a<\/h2>\n<pre><code># \u7528GFFutils\u91cc\u7684gtf2bed\u5c06gtf\u6587\u4ef6\u8f6c\u6362\u4e3abed\u6587\u4ef6\ngtf2bed gencode.v39lift37.annotation.gtf -o gencode.v39lift37.annotation.bed\n\n# \u7528R\u5c06bed\u6587\u4ef6\u4fee\u6539\u4e3a\u4ee5\u4e0b\u987a\u5e8f```\n# CHROM  FROM    TO      GENE    STRAND  INFO\n> df &lt;- read.table(&quot;gencode.v39lift37.annotation.bed&quot;,sep=&#039;\\t&#039;,header=T)\n> head(df)\n         GENE CHROM  FROM    TO STRAND INFO\n1     DDX11L1  chr1 11869 14409      + gene\n2      WASH7P  chr1 14404 29570      - gene\n3 MIR1302-2HG  chr1 29554 31109      + gene\n4     FAM138A  chr1 34554 36081      - gene\n5      OR4G4P  chr1 52473 53312      + gene\n6     OR4G11P  chr1 57598 64116      + gene\n> df &lt;- df[,c(2,3,4,1,5,6)]\n> head(df)\n  CHROM  FROM    TO        GENE STRAND INFO\n1  chr1 11869 14409     DDX11L1      + gene\n2  chr1 14404 29570      WASH7P      - gene\n3  chr1 29554 31109 MIR1302-2HG      + gene\n4  chr1 34554 36081     FAM138A      - gene\n5  chr1 52473 53312      OR4G4P      + gene\n6  chr1 57598 64116     OR4G11P      + gene\n\n> write.table(df,&quot;gencode.v39lift37.annotation2.bed&quot;,row.names=F,col.names=T,sep=&#039;\\t&#039;,quote=F<\/code><\/pre>\n<p>\u538b\u7f29\u6587\u4ef6<\/p>\n<pre><code>bgzip \/home\/zhoukaiwen\/database\/GRCh37_hg19\/gencode.v39lift37.annotation2.bed<\/code><\/pre>\n<h1>tabix\u524d\u7684\u5fc5\u987b\u6b65\u9aa4<\/h1>\n<pre><code># tabix\u4e3abed\u6587\u4ef6\u5efa\u7acb\u7d22\u5f15\uff0c\u641c\u5bfb\u66f4\u5feb\ntabix -pbed \/home\/zhoukaiwen\/database\/GRCh37_hg19\/gencode.v39lift37.annotation2.bed.gz\n# bcftools\u8981\u6c42\u662f.vcf.gz\u6587\u4ef6\nbgzip somaticSV.vcf<\/code><\/pre>\n<h2>\u6ce8\u91ca\uff1a<\/h2>\n<pre><code class=\"language-bash\">bcftools annotate -a \/home\/zhoukaiwen\/database\/GRCh37_hg19\/gencode.v39lift37.annotation2.bed.gz -c CHROM,FROM,TO,GENE -h &lt;(echo &#039;##INFO=&lt;ID=GENE,Number=1,Type=String,Description=&quot;Gene name&quot;&gt;&#039;) somaticSV.vcf.gz -o somaticSV.annotated.vcf\n# \u6b64\u65f6vcf\u6587\u4ef6info\u90a3\u4e00\u5217\u5373\u4e3a\u57fa\u56e0\u7684symbol<\/code><\/pre>\n<p>\u521b\u5efaperl\u811a\u672c\u6279\u91cf\u8fd0\u884c<\/p>\n<pre><code class=\"language-bash\">cd WES\nfor n in `ls manta|grep &quot;IBC&quot;`;do echo bcftools annotate -a \/home\/zhoukaiwen\/database\/GRCh37_hg19\/gencode.v39lift37.annotation2.bed.gz -c CHROM,FROM,TO,GENE -h &quot;&lt;(echo &#039;##INFO=&lt;ID=GENE,Number=1,Type=String,Description=&quot;Gene name&quot;&gt;&#039;)&quot; $n\/results\/variants\/somaticSV.vcf.gz -o $n\/results\/variants\/somaticSV.annotated.vcf&gt;&gt;manta\/manta_annotate.sh;done\n\ncd somaticSV\nfor n in `ls *.vcf.gz|sed &#039;s\/_somatic_SV_convertedInversion.vcf.gz\/\/&#039;`;do echo bcftools annotate -a \/home\/zhoukaiwen\/database\/GRCh37_hg19\/gencode.v39lift37.annotation2.bed.gz -c CHROM,FROM,TO,GENE -h &quot;&lt;(echo &#039;##INFO=&lt;ID=GENE,Number=1,Type=String,Description=&quot;Gene name&quot;&gt;&#039;)&quot; $n\\_somatic\\_SV\\_convertedInversion.vcf.gz -o $n.annotated.vcf&gt;&gt;manta_annotate.sh;done\n\ncat IBC??.annotated.vcf|grep -v &quot;#&quot;|grep &quot;PASS&quot;&gt;IBC_SomaticSV.annotated.vcf\ncat nonIBC??.annotated.vcf|grep -v &quot;#&quot;|grep &quot;PASS&quot;&gt;nonIBC_SomaticSV.annotated.vcf\n\nfor n in `ls *.annotated.vcf|sed &#039;s\/\\.annotated\\.vcf\/\/&#039;`;do cat $n.annotated.vcf|grep &quot;PASS&quot;&gt;$n.annotated.filtered.vcf;done\n\n# \u6709\u65f6\u5019vcf\u6587\u4ef6\u4e0d\u662fchr\u5f00\u5934\u800c\u76f4\u63a5\u662f\u6570\u5b57\uff0c\u8981\u5148\u8fdb\u884c\u4fee\u6539\n vi addchr2vcf.sh\n zcat example.vcf.gz | awk -F&quot;\\t&quot; &#039;{if ($0 !~ \/^#\/) {print &quot;chr&quot;$0} else{print $0}}&#039; &gt; example.chr.vcf\n\n #\u518d\u8fdb\u884c\u66ff\u6362\n for n in `ls *_filtered.vcf.gz|sed &#039;s\/.vcf.gz\/\/&#039;`;do cat addchr2vcf.sh|sed -e &quot;s\/example\/$n\/g&quot; &gt;&gt; renameChr.sh;done<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>manta\u751f\u6210\u7684\u5305\u542bstructural variants\uff08SV\uff09\u7ed3\u6784\u53d8\u5f02\u7684\u6ce8\u91cavcf\u6587\u4ef6\uff0c\u901a\u8fc7\u67d3\u8272\u4f53\u4f4d\u7f6e\u83b7\u5f97&#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-116","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\/116","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=116"}],"version-history":[{"count":10,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":140,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/116\/revisions\/140"}],"wp:attachment":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}