{"id":737,"date":"2021-04-08T19:24:02","date_gmt":"2021-04-08T11:24:02","guid":{"rendered":"http:\/\/www.wuchangsong.com\/?p=737"},"modified":"2022-02-16T04:41:50","modified_gmt":"2022-02-15T20:41:50","slug":"bs-seq%e5%88%86%e6%9e%90%e6%b5%81%e7%a8%8b%ef%bc%88%e4%ba%8c%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.wuchangsong.com\/?p=737","title":{"rendered":"BS-seq\u5206\u6790\u6d41\u7a0b\uff08\u4e8c\uff09"},"content":{"rendered":"<p>DNA\u7532\u57fa\u5316\uff1aDNA\u7532\u57fa\u5316\u4e3aDNA\u5316\u5b66\u4fee\u9970\u7684\u4e00\u79cd\u5f62\u5f0f\uff0c\u80fd\u5728\u4e0d\u6539\u53d8DNA\u5e8f\u5217\u7684\u524d\u63d0\u4e0b\uff0c\u6539\u53d8\u9057\u4f20\u8868\u73b0\u3002\u4e3a\u8868\u89c2\u9057\u4f20\u7f16\u7801\u7684\u4e00\u90e8\u5206\uff0c\u662f\u4e00\u79cd\u5916\u9057\u4f20\u673a\u5236\u3002DNA\u7532\u57fa\u5316\u8fc7\u7a0b\u4f1a\u4f7f\u7532\u57fa\u6dfb\u52a0\u5230DNA\u5206\u5b50\u4e0a\uff0c\u4f8b\u5982\u5728\u80de\u5627\u5576\u73af\u76845&#8217;\u78b3\u4e0a\uff1a\u8fd9\u79cd5&#8217;\u65b9\u5411\u7684DNA\u7532\u57fa\u5316\u65b9\u5f0f\u53ef\u89c1\u4e8e\u6240\u6709\u810a\u690e\u52a8\u7269\u3002 \u5728\u4eba\u7c7b\u7ec6\u80de\u5185\uff0c\u5927\u7ea6\u67091%\u7684DNA\u78b1\u57fa\u53d7\u5230\u4e86\u7532\u57fa\u5316\u3002<\/p>\n<pre>gzip -dc A.1_bismark_bt2_pe.deduplicated.CX_report.txt.gz &gt; A.1_bismark_bt2_pe.deduplicated.CX_report.txt\nperl BismarkCX2methykit.pl A.1_bismark_bt2_pe.deduplicated.CX_report.txt\n#\u51c6\u5907\u6ce8\u91ca\u9700\u8981\u7684bed\u6587\u4ef6\uff08\u683c\u5f0f12\uff09\nconvert2bed -i gtf &lt; out.gtf &gt; out6.bed\ngrep 'exon' out6.bed &gt; aa &amp;&amp; mv aa out6.bed\npython3 bed6Tobed12.py out6.bed  &gt; out12.bed#<a href=\"https:\/\/github.com\/ustbcaoqi\/biotools\">bed6Tobed12.py<\/a>\n#methylKit\u5b89\u88c5\u53ca\u4f7f\u7528\nif (!requireNamespace(\"BiocManager\", quietly = TRUE))\n    install.packages(\"BiocManager\")\nBiocManager::install(\"methylKit\")\nlibrary(methylKit)\nfile.list = list(\"A.CG_methykit.txt\",\"B.CG_methykit.txt\",\"C.CG_methykit.txt\",\"D.CG_methykit.txt\",\"E.CG_methykit.txt\",\"F.CG_methykit.txt\",\"G.CG_methykit.txt\",\"H.CG_methykit.txt\",\"I.CG_methykit.txt\")\nmyobjDB=methRead(file.list,\nsample.id=list(\"Control_1\",\"Control_2\",\"Control_3\",\"Single_1\",\"Single_2\",\"Single_3\",\"Multiple_1\",\"Multiple_2\",\"Multiple_3\"),\nassembly=\"HZGC\",\ntreatment=c(0,0,0,1,1,1,2,2,2),\ncontext=\"CpG\",\nmincov = 10,\ndbtype = \"tabix\",\ndbdir = \"methylDB\",\n)\nfiltered.myobj=filterByCoverage(myobjDB,lo.count=10,lo.perc=NULL, hi.count=NULL,hi.perc=99.9)\nmeth=unite(filtered.myobj, destrand=FALSE)\n\npdf(\"Correlation.pdf\")\ngetCorrelation(meth,plot=TRUE)\ndev.off()\npdf(\"clusterSamples.pdf\")\nclusterSamples(meth, dist=\"correlation\", method=\"ward\", plot=TRUE)\ndev.off()\npdf(\"PCAscreeplot.pdf\")\nPCASamples(meth, screeplot=TRUE)\ndev.off()\npdf(\"PCAcluster.pdf\")\nPCASamples(meth)\ndev.off()\n\ntiles=tileMethylCounts(filtered.myobj,win.size=1000,step.size=1000)\nmeth=unite(tiles, destrand=FALSE)\nmyDiff=calculateDiffMeth(meth,num.cores=10)\ndiffMethPerChr(myDiff,plot=FALSE,qvalue.cutoff=0.01, meth.cutoff=25)\nmyDiff25p.hyper=getMethylDiff(myDiff,difference=25,qvalue=0.01,type=\"hyper\")\nmyDiff25p.hypo=getMethylDiff(myDiff,difference=25,qvalue=0.01,type=\"hypo\")\nmyDiff25p=getMethylDiff(myDiff,difference=25,qvalue=0.01)\ndiffMethPerChr(myDiff,plot=FALSE,qvalue.cutoff=0.01, meth.cutoff=25)\nsave.image(\"MS_M_S.RData\")\nDiffdataframe=getData(myDiff25p)\nwrite.table(Diffdataframe, file=\"Diffdataframe.xls\", sep=\"\\t\", quote=F, row.names=T, col.names=T)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>DNA\u7532\u57fa\u5316\uff1aDNA\u7532\u57fa\u5316\u4e3aDNA\u5316\u5b66\u4fee\u9970\u7684\u4e00\u79cd\u5f62\u5f0f\uff0c\u80fd\u5728\u4e0d\u6539\u53d8DNA\u5e8f\u5217\u7684\u524d\u63d0\u4e0b\uff0c\u6539\u53d8\u9057\u4f20\u8868\u73b0\u3002\u4e3a\u8868\u89c2\u9057\u4f20\u7f16\u7801\u7684\u4e00\u90e8\u5206\uff0c\u662f\u4e00\u79cd\u5916\u9057\u4f20\u673a\u5236\u3002DNA\u7532\u57fa\u5316\u8fc7\u7a0b\u4f1a\u4f7f\u7532\u57fa\u6dfb\u52a0\u5230DNA\u5206\u5b50\u4e0a\uff0c\u4f8b\u5982\u5728\u80de\u5627\u5576\u73af\u76845&#8217;\u78b3\u4e0a\uff1a\u8fd9\u79cd5&#8217;\u65b9\u5411\u7684DNA\u7532\u57fa\u5316\u65b9\u5f0f\u53ef\u89c1\u4e8e\u6240\u6709\u810a\u690e\u52a8\u7269\u3002 \u5728\u4eba\u7c7b\u7ec6\u80de\u5185\uff0c\u5927\u7ea6\u67091%\u7684DNA\u78b1\u57fa\u53d7\u5230\u4e86\u7532\u57fa\u5316\u3002 gzip -dc A.1_bismark_bt2_pe.deduplicated.CX_report.txt.gz &gt; A.1_bismark_bt2_pe.deduplicated.CX_report.txt perl BismarkCX2methykit.pl A.1_bismark_bt2_pe.deduplicated.CX_report.txt #\u51c6\u5907\u6ce8\u91ca\u9700\u8981\u7684bed\u6587\u4ef6\uff08\u683c\u5f0f12\uff09 convert2bed -i gtf &lt; out.gtf &gt; out6.bed grep &#8216;exon&#8217; out6.bed &gt; aa &amp;&amp; mv aa out6.bed python3 bed6Tobed12.py out6.bed &gt; out12.bed#bed6Tobed12.py #methylKit\u5b89\u88c5\u53ca\u4f7f\u7528 if (!requireNamespace(&#8220;BiocManager&#8221;, quietly = TRUE)) install.packages(&#8220;BiocManager&#8221;) BiocManager::install(&#8220;methylKit&#8221;) library(methylKit) file.list = list(&#8220;A.CG_methykit.txt&#8221;,&#8221;B.CG_methykit.txt&#8221;,&#8221;C.CG_methykit.txt&#8221;,&#8221;D.CG_methykit.txt&#8221;,&#8221;E.CG_methykit.txt&#8221;,&#8221;F.CG_methykit.txt&#8221;,&#8221;G.CG_methykit.txt&#8221;,&#8221;H.CG_methykit.txt&#8221;,&#8221;I.CG_methykit.txt&#8221;) myobjDB=methRead(file.list, sample.id=list(&#8220;Control_1&#8243;,&#8221;Control_2&#8243;,&#8221;Control_3&#8243;,&#8221;Single_1&#8243;,&#8221;Single_2&#8243;,&#8221;Single_3&#8243;,&#8221;Multiple_1&#8243;,&#8221;Multiple_2&#8243;,&#8221;Multiple_3&#8243;), assembly=&#8221;HZGC&#8221;, treatment=c(0,0,0,1,1,1,2,2,2), context=&#8221;CpG&#8221;, mincov = 10, dbtype = &#8220;tabix&#8221;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10],"tags":[],"_links":{"self":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/737"}],"collection":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=737"}],"version-history":[{"count":10,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/737\/revisions"}],"predecessor-version":[{"id":832,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=\/wp\/v2\/posts\/737\/revisions\/832"}],"wp:attachment":[{"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=737"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wuchangsong.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}