前言
近兩天在做基因家族的分析,這是第一次接觸這塊,很多不是很了解。在篩選同源蛋白序列的時候,以前都是使用BLAST進行比對,這次看到很多教程都是使用HMMER進行尋找,那么也就順便來學習一下吧。HMMER使用并不是很難,其實對于初學來說,難的主要是建立
.hmm這一步。

Hmmer的安裝
安裝,主要是使用源碼安裝或是是使用conda進行安裝即可。
conda安裝
conda install -y hmmer
源碼安裝:
官網(wǎng):http://www.hmmer.org/


任意下載一個版本即可,安裝步驟不再做說明。
使用hmmbuild構(gòu)建.hmm文件
在有些數(shù)據(jù)庫中是有.hmm文件,只需要下載即可。但是,這僅僅只限于有些大數(shù)據(jù)庫。對于我們自己使用,不可能全部都有,這就需要我們自己構(gòu)建,很多教程到這步就是讓你收費了.......。
在本教程,講述其中一種方法吧,希望對大家有所幫助。
hmmbuild構(gòu)建時,需要使用
.sto文件進行構(gòu)建。因此,我們必須獲得.sto文件。
1. 使用mafft對蛋白基因進行比對
- 安裝(自己解決,類似的方法即可)
- 比對
mafft --auto --clustalout ../Pfam.fasta > Pfam.clustal
- 轉(zhuǎn)換
我們需要將.clustal轉(zhuǎn)換成.sto格式。我們推薦使用Fasta to Phylip Sequence Converter網(wǎng)站進行轉(zhuǎn)換(http://sequenceconversion.bugaco.com/converter/biology/sequences/fasta_to_phylip.php)。
可以有這么多的格式進行相互轉(zhuǎn)換。我們選擇以下的格式進行轉(zhuǎn)換即可。
-
clustat格式
-
** sto格式**
以上轉(zhuǎn)換后就可以直接進構(gòu)建.hmm文件
2. hmmbuild構(gòu)建.hmm文件
hmmbuild Pfam.hmm Pfam.sto
構(gòu)建運行還是很快的,主要還是取決于你的基因數(shù)量。

3. hmmersarch進行同源搜索
直接搜索即可,序列格式fa.....等其他格式。我個人感覺其他格式,我們的用的還是很少吧,主要還是fa格式。
$ hmmsearch -h
# hmmsearch :: search profile(s) against a sequence database
# HMMER 3.3.2 (Nov 2020); http://hmmer.org/
# Copyright (C) 2020 Howard Hughes Medical Institute.
# Freely distributed under the BSD open source license.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usage: hmmsearch [options] <hmmfile> <seqdb>
Basic options:
-h : show brief help on version and usage
Options directing output:
-o <f> : direct output to file <f>, not stdout
-A <f> : save multiple alignment of all hits to file <f>
--tblout <f> : save parseable table of per-sequence hits to file <f>
--domtblout <f> : save parseable table of per-domain hits to file <f>
--pfamtblout <f> : save table of hits and domains to file, in Pfam format <f>
--acc : prefer accessions over names in output
--noali : don't output alignments, so output is smaller
--notextw : unlimit ASCII text output line width
--textw <n> : set max width of ASCII text output lines [120] (n>=120)
使用:
hmmsearch Pfam.hmm your.fa > restult.out.txt
結(jié)果文件直接輸出系統(tǒng)默認的結(jié)果,主要是E-value值小于0.05,系統(tǒng)就默認保留。這部分可以根據(jù)自己的要求,進一步的過濾即可。

這基因就是我們Pfam數(shù)據(jù)庫能同源搜索的基因。到這里你就是你需要的結(jié)果。
教程簡潔,希望對你有所幫助。
往期文章推薦:
- 轉(zhuǎn)錄組分析教程
小白學生信 | 轉(zhuǎn)錄組上游分析教程
- 轉(zhuǎn)錄組分析教程
- 1. 最全WGCNA教程(替換數(shù)據(jù)即可出全部結(jié)果與圖形)
- 2. 精美圖形繪制教程
小杜的生信筆記,主要發(fā)表或收錄生物信息學的教程,以及基于R的分析和可視化(包括數(shù)據(jù)分析,圖形繪制等);分享感興趣的文獻和學習資料!!





