### 1. uniref 数据库下载
# https://www.uniprot.org/help/downloads
# 下载 uniref50,uniref90 等数据
wget https://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref90/uniref90.fasta.gz
## 下载中断后,可以通过-c (--continue)参数,从断点处接着下载
# wget -c https://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref90/uniref90.fasta.gz
## 准备序列文件,单一序列,fasta格式
wget https://rest.uniprot.org/uniprotkb/Q94K49.fasta
### 2. 安装序列比对软件
## 2.1 安装hmmer,
conda install hmmer
## 2.2 安装hh-suite
# conda安装报错
#conda install hhsuite
#conda install -c conda-forge -c bioconda hhsuite
## 编译安装,make 有时会出错
#git clone https://github.com/soedinglab/hh-suite
#mkdir build
#cd build
#cmake ..
#make
#make install
## 下载Linux bin文件,直接运行
wget https://github.com/soedinglab/hh-suite/releases/download/v3.3.0/hhsuite-3.3.0-SSE2-Linux.tar.gz; mkdir hhsuite-3.3.0-SSE2-Linux; cd hhsuite-3.3.0-SSE2-Linux tar xvfz ../hhsuite-3.3.0-SSE2-Linux.tar.gz; export PATH="$(pwd)/bin:$(pwd)/scripts:$PATH"
### 3. 在序列数据库中迭代搜索
jackhmmer Q94K49.fasta path/to/uniref90.fasta
hhblits -i test.fasta -o test_query.hhr -oa3m test_query.a3m -n 1 -d path/to/uniclust30
# -i:指定输入蛋白质序列文件。
# -d:指定构建的HHblits数据库。
# -oa3m:指定输出比对结果的A3M格式文件。
参考:
https://pubmed.ncbi.nlm.nih.gov/29905871/
https://pubmed.ncbi.nlm.nih.gov/25937944/
https://github.com/soedinglab/hh-suite
https://pubmed.ncbi.nlm.nih.gov/22198341/