{"id":1755,"date":"2018-01-08T01:40:05","date_gmt":"2018-01-07T16:40:05","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=1755"},"modified":"2018-01-08T01:40:05","modified_gmt":"2018-01-07T16:40:05","slug":"dna-bash","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2018\/01\/08\/dna-bash\/","title":{"rendered":"DNA\u3068\u304b\u3092bash\u3067\u304f\u308b\u304f\u308b\u8868\u793a"},"content":{"rendered":"<blockquote class=\"twitter-tweet\" data-lang=\"ja\">\n<p lang=\"en\" dir=\"ltr\">Holidays are a productive time, I wrote a bash script w<br \/>\nhich converts fasta files to a scrolling DNA helix. Enjoy 8D  <a href=\"https:\/\/t.co\/BKyaHPbkRm\">https:\/\/t.co\/BKyaHPbkRm<\/a><a h\nref=\"https:\/\/twitter.com\/hashtag\/bioinformatics?src=hash&amp;ref_src=twsrc%5Etfw\">#bioinformatics<\/a> <a href=\"https:\/\/twitter.\ncom\/hashtag\/DNA?src=hash&amp;ref_src=twsrc%5Etfw\">#DNA<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/pixelart?src=hash&amp;ref_src=t\nwsrc%5Etfw\">#pixelart<\/a> <a href=\"https:\/\/t.co\/j1MXG44JPu\">pic.twitter.com\/j1MXG44JPu<\/a><\/p>\n<p>&mdash; hackseq (@hackseq) <a hre\nf=\"https:\/\/twitter.com\/hackseq\/status\/948248317682524160?ref_src=twsrc%5Etfw\">2018\u5e741\u67082\u65e5<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>\u52d5\u753b\u3092\u898b\u308b\u3068\u697d\u3057\u305d\u3046\u3060\u3057\u771f\u4f3c\u3057\u3066\u307f\u3088\u3046\u3068\uff0escript\u3092\u5165\u624b\uff0e\u4e2d\u3092\u898b\u308b\u3068 .fa \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u5fc5\u8981\u306a\u3088\u3046\uff0e<\/p>\n<table  class=\" table table-hover\" border=\"0\" bgcolor=\"#e8e8e8\" width=\"100%\" cellpadding=\"4\">\n<tr>\n<td>\n<pre><code>$ wget http:\/\/biosyntax.org\/drawHelix.sh\r\n#!\/bin\/bash\r\n#\r\n# drawHelix.sh &lt;input.fa&gt;\r\n#\r\n# Reads a fasta input file and stream a B-Form DNA\r\n# helix with the sequence to STDOUT\r\n#\r\n##    __     __   __           ___\r\n###  |__) | \/  \\ \/__` \\ \/ |\\ |  |   \/\\  \\_\/\r\n#### |__) | \\__\/ .__\/  |  | \\|  |  \/~~\\ \/ \\<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<p>*.fa \u306f FASTA \u3068\u3044\u3046\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u5f62\u5f0f\u3089\u3057\u3044\uff0eFASTA \u306f\u30b7\u30fc\u30b1\u30f3\u30b9\u30a2\u30e9\u30a4\u30e1\u30f3\u30c8\u3092\u884c\u3046\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3089\u3057\u3044\uff0e<br \/>\n\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u81ea\u4f53\u3082\u30f4\u30a1\u30fc\u30b8\u30cb\u30a2\u5927\u5b66\u306esite\u304b\u3089\u5165\u624b\u3067\u304d\u308b\u3088\u3046\u3060\u3051\u3069Wikipedia\u306b\u30da\u30fc\u30b8\u306b\u4f8b\u304c\u3042\u3063\u305f\u306e\u3067\u4eca\u56de\u306f\u305d\u308c\u3092\u4f7f\u3063\u3066\u307f\u308b\uff0e<\/p>\n<ul>\n<li>\n<p>\n<a href=\"https:\/\/fasta.bioch.virginia.edu\/fasta_www2\/fasta_down.shtml\">UVA FASTA Downloads<\/a>\n<\/p>\n<\/li>\n<li>\n<p>\n<a href=\"https:\/\/ja.wikipedia.org\/wiki\/FASTA\">FASTA &#8211; Wikipedia<\/a>\n<\/p>\n<\/li>\n<\/ul>\n<table  class=\" table table-hover\" border=\"0\" bgcolor=\"#e8e8e8\" width=\"100%\" cellpadding=\"4\">\n<tr>\n<td>\n<pre><code>$ echo '&gt;gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]\r\nLCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV\r\nEWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG\r\nLLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL\r\nGLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX\r\nIENY' &gt; test.fa\r\n$ bash drawHelix.sh test.fa<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<p>\u305d\u3057\u3066\u3053\u3093\u306a\u611f\u3058\u306b\uff0e<\/p>\n<p><a href=\"https:\/\/asciinema.org\/a\/1VXwK0As4hZok3zlTffy6vYGY\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/asciinema.org\/a\/1VXwK0As4hZok3zlT\nffy6vYGY.png\" \/><\/a><\/p>\n<p>macOS\u306e\u5834\u5408\u306f\u8981patch\u3060\u305d\u3046<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"ja\">\n<p lang=\"en\" dir=\"ltr\">sed on mac is a pain. Fix is in line 70.<br \/>On mac: Rem<br \/>\nove the trailing hyphen (STDIN is default) and replace \\n with a literal newline <a href=\"https:\/\/t.co\/fEhO2c99ou\">pic.twitter.<br \/>\ncom\/fEhO2c99ou<\/a><\/p>\n<p>&mdash; Heiko Horn (@hornheiko) <a href=\"https:\/\/twitter.com\/hornheiko\/status\/948309938211835910?ref_src=\ntwsrc%5Etfw\">2018\u5e741\u67082\u65e5<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=B077S3GVRL&#038;linkId=eeb6283499ac1adb05fe8f36d63edcb7\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=B01J2YNBNW&#038;linkId=5b31f7a19407a07028a7ac38e1a09a8c\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=B077Y2XNLZ&#038;linkId=31df22f3cb623f4fedf94eee1766cbdb\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Holidays are a productive time, I wrote a bash script w hich converts fasta files to a scrolling DNA helix. En [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[6],"tags":[272],"class_list":["post-1755","post","type-post","status-publish","format-standard","hentry","category-linux","tag-bash"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/1755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=1755"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/1755\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=1755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=1755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=1755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}