1. 程式人生 > >41、OrthoMCL和mcl軟件進行基因家族分析

41、OrthoMCL和mcl軟件進行基因家族分析

file 需要 out reat cleanup 文件夾 發的 分析 添加

轉載: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 。

41、OrthoMCL和mcl軟件進行基因家族分析