blast+本地化的构建对于流程化处理大量数据序列很方便,blast+是将blast模块化,分为了蛋白质序列比对蛋白数据库(blastp)、核酸序列比对核酸数据库(blastn)、核酸序列比对蛋白质数据库(blastx)、蛋白质比对翻译后的核酸数据库(tblastn)、

翻译后的核酸序列比对翻译后的核酸数据库(tblastx)

BLAST+ 链接地址:   ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST

得到最新版本的blast+压缩包:ncbi-blast-2.9.0+-x64-win64.tar.gz

对安装包进行解压:

[wangh@master Softbacks]$ tar -zxvf ncbi-blast-2.9.0+-x64-linux.tar.gz
[wangh@master Softbacks]$ cd ncbi-blast-2.9.0+
[wangh@master ncbi-blast-2.9.0+]$ vim ~/.bashrc # 对blast+进行环境配置,进入变量配置环境中后,按i或者o切换到插入(编辑模式下)输入下列路径
# ncbi-blast
export PATH=/path/ncbi-blast-2.9.0+/bin/:$PATH
#######按Esc键退出编辑环境,再输入 :wq  命令进行写入保存(w)退出(q) 按回车键(Enter)退出
[wangh@master ncbi-blast-2.9.0+]$ source ~/.bashrc #刷新你的环境配置文件,使得系统识别你刚加入的环境变量(也可以关闭当前终端再次打开,系统自动刷新环境配置文件)

 blastp 的用法:

数据库从PDB中下载: ftp://ftp.wwpdb.org/pub/pdb/derived_data/pdb_seqres.txt

用cd-hit处理去冗余(解压后加变量后就能用)

$: cd-hit -i /path/pdb_seqres_simp.fasta -o PDB_simp.fasta -c 0.9

格式化数据库:

$: makeblastdb –in PDB_simp.fasta –dbtype prot –out PDB

-in:待格式化处理的fasta文件(一般是从PDB/NCBI里下载所有的相关或者整个库中的序列);

-dbtype: 数据库类型,prot或者nucl;

-out: 输出的数据库名;
蛋白质比对蛋白数据库(blastp):
blastp –query name.fasta –out name.blast –db PDB –outfmt 6 –evalue 1e-5 –num_threads 11 –max_target_seqs 6
参数说明:
-query: 输入文件路径及文件名(.fasta格式);
-out: 输出文件路径及文件名(.blast);
-db: 格式化了的数据库路径及数据库名(数据库可以从PDB/NCBI里下载所有的相关/整个库中的序列);
-outfmt:输出的文件格式,6是tabular格式对应BLAST的m8格式;
-evalue: 设置输出结果的e-value值;
-max_target_seqs:找到最大的目标的数目,也可以用-num_descriptions,tabular格式输出结果的条数;
-num_threads :线程数,并行运行时,缩短计算时间。