首页 > 代码库 > clustal

clustal

Clustal, Multiple alignment of nucleic acid and protein sequences. official website: http://www.clustal.org/

使用biopython, 有相应的接口可以直接调用clustalw.

from Bio.Align.Applications import ClustalwCommandline# the path of clustalwclustalw_exe = rclustalw2.exe# the command of clustalwclustalw_cline = ClustalwCommandline(clustalw_exe, infile=pairFile)# run the commandstdout, stderr = clustalw_cline()

结果会直接生成aln文件,名字和infile名字一样,后缀为aln。

也可以直接使用biopython中的接口解析结果文件。

from Bio import AlignIOalign = AlignIO.read("opuntia.aln", "clustal")print align

 

clustal