0

我实际上是在 python3 中构建一个脚本来计算几个配对序列之间的差异。所以,我需要首先在 2 个蛋白质序列之间进行比对,然后与 2 个 dna 序列进行密码子比对。为了进行我的第一次比对(在 2 个蛋白质序列之间),我实际上正在使用

alns = pairwise2.align.globalds(prot1 ,prot2, matrix, gap_open, gap_extend)

但我需要一些更复杂的东西,比如 ClustalW 或 MUSCLE 算法。问题是我的脚本是按照我询问 4 个序列的方式构建的:2 个 dna 和 2 个氨基酸。

然后我将我的序列转换为字符串。但是 ClustalW 和 MUSCLE 要求提供包含这些序列的文件。有没有办法给出这样的序列:

muscle_cline = MuscleCommandline(muscle_exe, prot1 , prot2, out=out_file)
instead of the input file (unaligned sequences file):
muscle_cline = MuscleCommandline(muscle_exe, input=in_file, out=out_file)

或者像这样:

clustalw_cline = ClustalwCommandline("clustalw2", prot1, prot2)
instead of that:
clustalw_cline = ClustalwCommandline("clustalw2", infile=in_file)

因为我不想为我的每个序列(大约 450 个)创建一个序列未对齐的文件......

非常感谢你。

4

0 回答 0