由于基因重组与基因突变的存在,利用16S rRNA构建的系统发育树通常不够可靠,而使用基于全基因组的单拷贝同源蛋白系统发育树则不会存在这方面的困扰,16S rRNA序列也就1500个碱基左右,而全基因组单拷贝同源蛋白可达十几二十万个氨基酸长度,建树用它,绝对准!一条命令出序列,建树再也不难~
- 前期准备
首先需要从NCBI下载fasta格式的基因组序列,之后到rast
服务器完成注释,然后下载fasta格式的蛋白序列作为准备,需要注意的是,各基因组蛋白序列的文件名不可以有空格,推荐使用_
代替空格。RAST服务器
- 调用软件
计算单拷贝同源蛋白需要调用proteinortho6
,因此要确保服务器已安装proteinortho6
并可正常调用。proteinortho6下载
序列比对使用muscle
,因此muscle
也是必须的。MUSCLE下载
- 一条命令出序列
将蛋白序列文件夹上传到服务器,同目录下运行脚本即可。
python3 protein_ortho.py <file_name> <bacteria_num>
<file_name>
是蛋白序列文件夹的名称
<bacteria_num>
是文件夹内序列来自多少个细菌
例如:
python3 protein_ortho.py Nature 30
proteinortho6使用了diamond比对,比proteinortho6速度快了很多,实测使用30个细菌的基因组,脚本执行完成共用时10分钟左右,具具体运行时间与服务器配置有关。
##构建单拷贝同源蛋白
##在linux下运行,需要安装proteinortho与muscle,proteinortho安装地址:http://www.bioinf.uni-leipzig.de/Software/proteinortho/,muscle地址:http://www.drive5.com/muscle/。
##作者:刘宁华 山东大学青岛校区 1039438318@qq.com
#1. 处理序列文本
def chuli_seq(in_file_0):
import os
path = os.getcwd()
path = path + "/" + in_file_0 + "/"
files = os.listdir(path)
file_path = []
for file in files:
file_path_1 = path + file
file_path.append(file_path_1)
for file in file_path:
cmd = "sed -i 's/ /_/g' " + file
os.system(cmd)
return print("1. 序列预处理")
#2. 运行同源比对命令
def protein_ortho(file):
import os
cmd = "proteinortho6.pl -project=" + file + "_work -e=1e-5 -cov=50 -identity=50 -clean " + file + "/*.faa"
os.system(cmd)
return print("