pythonを使った相補鎖、逆相補鎖配列の生成
解析には、biopythonというツールを使っていきます
パッケージをimportする
from Bio.Seq import Seq
相補鎖
seq="AGTAGTAGTAGT" seq=Seq(seq) #配列をseqの型にする seq=seq.complement()#相補鎖に変換 print(seq) -> TCATCATCATCA
逆鎖 (biopythonで見当たらなかったので、普通のコマンドで)
seq="AGTAGTAGTAGT" seq=seq[::-1]#逆鎖にする print(seq) -> TGATGATGATGA
逆総補鎖
seq="AGTAGTAGTAGT" seq=Seq(seq)#配列をseqの型にする seq=seq.reverse_complement()#逆相補鎖に変換 print(seq) -> ACTACTACTACT