? ? ? ? 直系同源基因是伴隨物種分化事件而產(chǎn)生,而旁系同源基因是由復(fù)制事件所產(chǎn)生。目前,隨著基因組測序的快速發(fā)展,直系同源基因的檢測變得越來越重要,尤其是在進化生物學(xué)及比較基因組學(xué)方面。當前,查找直系同源基因主流的軟件主要有兩個:OrthoFinder和OrthoMCL。前者近些年發(fā)展較快,軟件版本經(jīng)常更新,功能強大,運算速度快,操作簡便,安裝比較友好,通過conda可直接安裝使用,這兩年引用也較高;而后者是用的最多的一款查找同源基因的軟件,引用超高,最新版本為2013年7月公布的v2.0版本,目前為止,已經(jīng)很久沒更新了,官方給出的使用手冊,需要13步才能完成整個運行流程,包括Mysql數(shù)據(jù)庫安裝及配置、OrthoMCL配置文件準備、格式轉(zhuǎn)換、聚類等一系列步驟,非常繁瑣,軟件安裝非常不友好,需要root權(quán)限。github上有人開發(fā)了OrthoMCL Pipeline,可自動化運行OrthoMCL,雖然安裝超級復(fù)雜,但使用超級便利。鏈接如下:https://github.com/apetkau/orthomcl-pipeline/blob/master/INSTALL.md
? ? ? ? 本文主要講一下,OrthoMCL原始的安裝方法及使用,OrthoMCL是一種用于對同源蛋白序列進行分組的基因組級別的算法。它不僅提供了由兩個或多個物種/基因組共享的群體,而且還提供了代表物種特有的基因擴展家族的群體。因此,它是真核生物基因組自動注釋的重要工具?;谛蛄械南嗨菩裕琌rthoMCL可以將一組蛋白序列(比如全基因組的proteins)歸類到ortholog groups、in-paralogs groups和co-orthologs。下面進入正題:
一、Mysql數(shù)據(jù)庫安裝及配置
1、 檢測系統(tǒng)是否自帶安裝MySQL
$ rpm -qa | grep mysql
卸載自帶mysql
$ rpm -e mysql? ? #普通模式刪除
$ rpm -e --nodeps mysql? #強力刪除
2、 Mysql的安裝
下載MySQL5.7:wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar
$ tar -xf mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar? ?#解壓文件
$ rpm -ivh common, libs, devel, client, server? ?#rpm安裝
$ service mysqld start? ?#啟動mysql
$ vim /etc/my.cnf? ?#修改?/etc/my.cnf?在文檔尾 加入?skip-grant-tables?root用戶免密登入
$ service mysqld restart? #重啟 mysql
$ mysql -u root -p? #使用指令 mysql -u root -p 登陸 密碼輸入直接回車
修改root 用戶信息 ,完成后刪除 my.cnf 文檔尾 skip-grant-tables
>use mysql;
>update user set password_expired='N' where user='root';
>update user set authentication_string=password('123456') where user='root';
>flush privileges;
3、 mysql-server的安裝
下載Yum資源包
https://dev.mysql.com/downloads/repo/yum/
$ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm? $ rpm -ivh mysql-community-release-el7-5.noarch.rpm
$ yum update
$ yum install mysql-server
4、報錯解決:
(1)libs包沖突
$ rpm -e mariadb-libs-1:5.5.64-1.el7.x86_64? --nodeps #強力刪除安裝包
(2)

(3)mysql報錯ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

6、Mysql數(shù)據(jù)庫配置
(1)利用OrthoMCL提供的config文件進行編譯
$ mysql -u root -p #登錄root;密碼:Waitingforyou602
$ create user 'orthomcl' identified by 'orthomcl'; #創(chuàng)建orthomcl用戶及密碼
$ GRANT ALL PRIVILEGES on *.* to 'orthomcl' WITH GRANT OPTION;
$ FLUSH PRIVILEGES;quit

(2)安裝perl依賴模塊

# mysql路徑為/usr/bin
###配置orthomcl.config.template文件
$ cp /home/Tools/orthomclSoftware-v2.0.9/doc/OrthoMCLEngline/Main/orthomcl.config.template orthomcl.config
$ vim orthomcl.config
$ show global variables like 'port'; #查看mysql端口

$ orthomclInstallSchema orthomcl.config install_tables.log
### done
二、OrthoMCL的使用
1、 創(chuàng)建orthomcl輸入文件
$ redun_remove protein.fasta > non_dun_protein.fasta
$ mkdir compliantFasta; cd compliantFasta
$ orthomclAdjustFasta Ath ../data/AraThaliana.fa 1
#去除可變剪切序列

2、過濾序列
$ orthomclFilterFasta pre-data/ 10 20
# 過濾序列,允許最短的protein長度為10,stop codons最大比例為20%,生成兩個文件goodProteins.fasta和poolProteins.fasta
3、對goodProteins.fasta中的序列進行BLAST比對
# blastp比對
$ makeblastdb -in goodProteins.fasta -dbtype prot -out orthomcl
$ nohup blastp -db orthomcl -query goodProteins.fasta -seg yes -out orthomcl.blastout -evalue 1e-5 -outfmt 7 -num_threads 24 2> blastp.log &
4、處理blast結(jié)果
$ grep -P "^[^#]" orthomcl.blastout > blastresult
$ orthomclBlastParser blastresult compliantFasta > similarSequences.txt
$ perl -p -i -e 's/\t(\w+)(\|.*)orthomcl/\t$1$2$1/' similarSequences.txt
$ perl -p -i -e 's/0\t0/1\t-181/' similarSequences.txt
5、將similarSequences.txt載入到數(shù)據(jù)庫中
$ orthomclLoadBlast ../orthomcl-install-file/orthomcl.config similarSequences.txt
6、尋找成對蛋白質(zhì)
$ orthomclPairs ../orthomcl-install-file/orthomcl.config orthomcl_pairs.log cleanup=no
7、從數(shù)據(jù)庫中導(dǎo)出數(shù)據(jù)
$ orthomclDumpPairsFiles orthomcl.config.template
此步生成mclInput文件和pairs文件夾;文件夾中包含3個文件coorthologs.txt,inparalogs.txt,orthologs.txt。



8、 mcl進行聚類
mcl mclInput --abc -I 1.5 -o mclOutput

9、整理mcl聚類結(jié)果
orthomclMclToGroups Ath 1 < mclOutput > groups.txt
? ? ? ? 后續(xù)分析需依賴腳本,github上有針對后續(xù)結(jié)果分析的腳本,根據(jù)需求不同可自行搜索。
參考:
Li, L., Stoeckert, C.J., Jr., and Roos, D.S. (2003). OrthoMCL: identification of ortholog groups for eukaryotic genomes. Genome Res. 13:2178–2189.
Van Dongen S. Graph clustering by flow simulation (2000). PhD Thesis, University of Utrecht, The Netherlands.
https://github.com/apetkau/orthomcl-pipeline/blob/master/INSTALL.md
http://www.chenlianfu.com/?tag=orthomcl
https://orthomcl.org/orthomcl/