41、OrthoMCL和mcl软件进行基因家族分析

转载:http://www.realbio.cn/news/124.html

https://blog.csdn.net/seallama/article/details/43820763

http://www.cnblogs.com/huangying78/p/8638506.html

1. 数据库的配置

OrthoMCL的分析需要先行建立mysql账户并建立相应的数据库。关于mysql用户的创建我们不在此进行介绍,我们以已经建立好的账户(账户名user,密码123456)为例进行操作。
A. 在linux环境下输入mysql -uuser -p123456进入mysql界面;
B. 输入create database orthomcl;建立一个名为orthomcl的空数据库用以存放分析时的中间文档;
C. 输入\q退出mysql界面。

2  软件下载
OrthoMCL的分析需要OrthoMCL软件本体和mcl软件。
OrthoMCL软件下载地址为:http://orthomcl.org/common/downloads/software/,解压缩后,其中包含文件夹:bin、config、doc、lib四个文件夹,添加bin路径为环境变量

mcl软件下载地址为:http://www.micans.org/mcl/src/mcl-latest.tar.gz;下载后使用:’./configure && make && make install’安装即可。包含发的文件是bin 、share。

3 配置OrthoMCL软件
进入安装路径下,输入:cp~/orthomclSoftwarev2.0.9/doc/OrthoMCLEngine/Main/orthomcl.config.template ~/example,将~/orthomcl.config.template拷贝到工作目录(以~/example为例)中,该文件为OrthoMCL的配置文件,以使用mysql数据库为例,其中的内容如下:cat orthomcl.config.template

dbVendor=mysql   #使用的数据库为mysql
dbConnectString=dbi:mysql:orthomcl   #使用之前建立的名为orthomcl的数据库
dbLogin=user    #创建的用户名
dbPassword=123  #密码
similarSequencesTable=SimilarSequences #
orthologTable=Ortholog
inParalogTable=InParalog
coOrthologTable=CoOrtholog
interTaxonMatchView=InterTaxonMatch
percentMatchCutoff=50
evalueExponentCutoff=-5
oracleIndexTblSpc=NONE

4 分析过程

4.1 输入文件格式转化

orthomcl的输入文件为fasta格式的基因或蛋白序列,fasta文件的序列名称要求以样品名开头之后接’|’分隔,之后接每个样品的序列名(如例1),而且样品名和序列名不能有重复。

命令:orthomclAdjustFasta程序,将fasta文件转换出兼容orthomcl的fasta文件使用命令:(1)orthomclAdjustFasta    A(B,ref)   X1(X2,X3).fa   1,结果输出为A(B,ref).fasta。(单个跑完再合并)。本文生成样品A,B和参考序列ref为例,在compliantFasta文件夹中的序列文件名分别为:A.fa,b.fa,ref.fa。

例1:

>A|gene1

ASSRKSKWQFMGARDAGAKDELRQVYGVSERTESDGAANLIHKLRAINYTLAELGQWCAYKVGQSFLSAL

 >B|contig1

KDELRQVYGVSERTESD

4.2 输入文件合并过滤

使用命令:orthomclFilterFasta  compliantFasta/  10  20。允许的最短的protein长度是10,stop codons最大比例为20%;生成了两个文件(2)goodProteins.fastapoorProteins.fasta两个文

4.3 全序列比对

将上一步的goodProteins.fasta序列进行自身的多序列比对,比对使用软件为blast+,输出结果为all.m8.anno。文件太大可以拆分比对,最后合并
/share/nas2/genome/bin//blastall -b 1000 -v 1000  -a 2  -p  blastp  -e 1e-5 -F F -d goodProteins.fasta  -i goodProteins.fasta.div1/goodProteins.fasta.f2.106.seq   -o /goodProteins.fasta.div1/goodProteins.fasta.f2.106.seq.blast   -m 8

cat goodProteins.fasta.f2.*.seq.blast  >(3)all_VS_all.out.tab  还可以去除重复(一列,二列)最后获得 (4)all_VS_all.result

4.4  导入比对结果
将比对结果导入mysql数据库,包含以下几个步骤:
A. 将比对结果转化为规定格式,命名为similarSequences.txt,命令为:(5)orthomclBlastParser all_VS_all.result seq > similarSequences.txt
B. 将similarSequences.txt导入到数据库中,命令为:orthomclLoadBlast orthomcl.config.template similarSequences.txt

4.5 寻找paired蛋白
输入为数据库中的表SimilarSequences,和数据库的空表InParalog, Ortholog, CoOrtholog tables;输出为对这些空表的操作,命令为:orthomclPairs orthomcl.config.template orthomcl_pairs.log cleanup=no。

4.6 将数据从mysql导出

生成(6)mcllnput文件和pairs目录。这个目录包含三个文件:
ortholog.txt, coortholog.txt, inparalog.txt。
每一个文件有三列: proteinA, protein B, their normalized score (See the Orthomcl Algorithm Document)。

命令为:orthomclDumpPairsFiles orthomcl.config.template。

4.7 使用mcl对paired蛋白聚类
命令为:mcl mclInput --abc -I 1.5 -o (7) mclOutput。

4.8 对结果编号
命令为:orthomclMclToGroups gf 1 < mclOutput > (8)groups.txt。家族名为gf_1,gf_2,gf_3...,格式如图2 。

 

posted @ 2018-12-16 12:51  风中之铃  阅读(4566)  评论(0编辑  收藏  举报