DNAとかをbashでくるくる表示

動画を見ると楽しそうだし真似してみようと.scriptを入手.中を見ると .fa というファイルが必要なよう.

$ wget http://biosyntax.org/drawHelix.sh
#!/bin/bash
#
# drawHelix.sh <input.fa>
#
# Reads a fasta input file and stream a B-Form DNA
# helix with the sequence to STDOUT
#
##    __     __   __           ___
###  |__) | /  \ /__` \ / |\ |  |   /\  \_/
#### |__) | \__/ .__/  |  | \|  |  /~~\ / \

*.fa は FASTA というソフトウェアの形式らしい.FASTA はシーケンスアライメントを行うソフトウェアらしい.
ソフトウェア自体もヴァージニア大学のsiteから入手できるようだけどWikipediaにページに例があったので今回はそれを使ってみる.

$ echo '>gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV
EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG
LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL
GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX
IENY' > test.fa
$ bash drawHelix.sh test.fa

そしてこんな感じに.

🏛️

macOSの場合は要patchだそう

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.