震驚??!KEGG官方工具能夠完成任何物種的KEGG注釋!?。?/h2>

寫在前面

  • 之前介紹過(guò)使用EggNOG-mapper對(duì)非模式物種快速完成KEGG注釋的推文https://mp.weixin.qq.com/s/kIf6C2u3FID3ZeLtsB4eZQ,不過(guò)畢竟EggNOG-mapper是第三方軟件,而且注釋結(jié)果仍然存在一個(gè)Gene ID對(duì)應(yīng)多個(gè)KO Number的情況,雖然對(duì)富集結(jié)果影響似乎不會(huì)太大,但是影響多少肯定是會(huì)有。

  • 這里介紹KEGG官方提供的注釋工具KofamKOALA,同樣能夠?qū)θ我馕锓N進(jìn)行KEGG注釋,注釋結(jié)果中Gene ID對(duì)應(yīng)唯一一個(gè)KO Number,避免了大多數(shù)第三方注釋工具一個(gè)ID對(duì)應(yīng)多個(gè)KO Number的情況,使富集結(jié)果更加可靠!

  • KofamKOALA官網(wǎng)https://www.genome.jp/tools/kofamkoala/


一、網(wǎng)頁(yè)版KofamKOALA


點(diǎn)擊提交任務(wù)之后需要在郵件中二次確認(rèn),提交任務(wù)





注釋完成之后,點(diǎn)擊郵件中的鏈接


  • 在結(jié)果頁(yè)面中,可以直接下載注釋結(jié)果,然后接著用TBtools進(jìn)行富集分析
  • 同時(shí)也提供了許多對(duì)注釋結(jié)果的探索功能,比如查看注釋上的KO Number詳細(xì)信息,比對(duì)情況等。


二、本地化KofamKOALA

  • 如果需要注釋的序列太多,文件太大,使用網(wǎng)頁(yè)版工具確實(shí)可能會(huì)太慢。這個(gè)時(shí)候當(dāng)然是選擇將其本地化!在本地根據(jù)服務(wù)器情況提高線程加速注釋。

下載 KOfam 和 KofamScan


下載并解壓KOfam

wget https://www.genome.jp/ftp/db/kofam/ko_list.gz
wget https://www.genome.jp/ftp/db/kofam/profiles.tar.gz
#下載完成之后解壓
gunzip ko_list.gz
tar -xzvf profiles.tar.gz

下載并解壓kofam_scan

wget https://www.genome.jp/ftp/tools/kofam_scan/kofam_scan-1.3.0.tar.gz
tar -xzvf kofam_scan-1.3.0.tar.gz

將kofam_scan加入環(huán)境變量

echo export PATH=/home/jiawei_li/tools/kofamscan/kofam_scan-1.3.0:\$PATH >> ~/.bashrc
source ~/.bashrc

安裝依賴,KofamScan需要Ruby,HMMER和GNU Parallel

#版本需求
- Ruby >= 2.4
- HMMER >= 3.1
- GNU Parallel

conda安裝Ruby,自己編譯也行 但是我比較懶折騰。。。

conda install -c conda-forge ruby
  • 如果喜歡手動(dòng)裝Ruby,也可以試試,但也許會(huì)報(bào)錯(cuò),需要進(jìn)行一系列操作去安裝
wget https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0.tar.gz
tar -xzvf ruby-3.1.0.tar.gz
cd cd ruby-3.1.0
./configure
make
make install
  • 安裝hmmer
conda install -c bioconda hmmer
  • 安裝GNU Parallel
conda install -c conda-forge parallel

修改配置文件,指定依賴軟件以及KOfam的路徑

首先獲取相關(guān)軟件的路徑(注意:配置文件中不需要指定Ruby的路徑,但是需要確保Ruby加入了環(huán)境變量,能夠直接調(diào)用)

which parallel  hmmscan
#/tools/parallel
#~/miniconda3/bin/hmmscan

使用官方模板,修改配置文件

cd kofam_scan-1.3.0
cp config-template.yml config.yml
  • 注意,由于hmmscan和parallel都已經(jīng)加入環(huán)境變量,可以直接調(diào)用,因此在配置文件中無(wú)需配置這兩個(gè)軟件的路徑
# Path to your KO-HMM database
# A database can be a .hmm file, a .hal file or a directory in which
# .hmm files are. Omit the extension if it is .hal or .hmm file
profile: /home/jiawei_li/tools/kofamscan/profiles

# Path to the KO list file
ko_list: /home/jiawei_li/tools/kofamscan/ko_list

# Path to an executable file of hmmsearch
# You do not have to set this if it is in your $PATH
#hmmsearch: /home/jiawei_li/miniconda3/bin/hmmscan

# Path to an executable file of GNU parallel
# You do not have to set this if it is in your $PATH
#parallel: /tools/parallel

# Number of hmmsearch processes to be run parallelly
cpu: 8

對(duì)蛋白序列進(jìn)行注釋(注意:注釋序列必須為蛋白序列)

exec_annotation -o test.querry2KO --cpu 8 --format mapper -E 1e-5 test.pep.fa
  • 注意: --format參數(shù)在help中給出了四種,但主要有兩種格式。
#help文檔中的解釋
  -f, --format <format>      Format of the output [detail]
      detail:          Detail for each hits (including hits below threshold)
      detail-tsv:      Tab separeted values for detail format
      mapper:          KEGG Mapper compatible format
      mapper-one-line: Similar to mapper, but all hit KOs are listed in one line
  1. --format mapper對(duì)每一個(gè)Gene ID只保留最佳的KO Number,結(jié)果文件只含有Gene ID和KO Number的映射信息。
  2. --format detail保留所有信息,包括Gene ID對(duì)應(yīng)上的每一個(gè)KO Number,比對(duì)分?jǐn)?shù),E-value以及KO Number的詳細(xì)信息等。

    最后,拿到query2KO文件之后,就可以用其當(dāng)背景文件,使用TBtools對(duì)基因集做富集分析啦

寫在后面

學(xué)期末了,祝各位老鐵這學(xué)期的奮斗都有所收獲!
大家都能回家安心過(guò)個(gè)好年,見(jiàn)見(jiàn)許久未見(jiàn)的老友哈哈

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容