Linux下BLAST+的本地化(NCBI-BLAST 2.2.29+):linux
1. 下载软件BLAST:数据库
在如下网址 ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ vim
下载: ncbi-blast-2.2.29+-x64-linux.tar.gz (根据本身的操做系统选择)。编辑器
2. 解压:ui
解压后放在任意目录下均可以,把相应路径加入PATH变量就是。spa
好比解压到用户的主目录(/home/yonpen)下,把解压后的文件夹从新命名为blast,则BLAST+的全部程序在目录/home/yonpen/blast/bin下。操作系统
3. 添加环境变量:blog
打开终端(Terminal),切换为root用户,执行vim /etc/profile (须要了解Vim编辑器的基本命令)。ci
在最末尾添加:
export PATH=/home/yonpen/blast/bin:$PATH
保存退出。(环境变量的值由Blast所在路径决定。)
此处若成功,注销之后执行blastn -version会出现版本信息(必定要先注销或重启电脑)。
4. 新建:
在目录/home/yonpen/blast下新建一个文件夹,命名为db 。
在/home/yonpen下新建一个文件,命名为.ncbirc 。(文件名是以点号开头的)
在文件中添加内容:
[BLAST]
BLASTDB=/home/yonpen/blast/db
5. 下载FASTA格式的数据库:
ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/
以下载nr.gz。
6. 创建BLAST+可用的数据库:
打开终端(Terminal),切换到/home/yonpen/blast/db目录下,执行(以蛋白质库nr为例):
makeblastdb –in nr -parse_seqids -hash_index -dbtype prot
(须要本身输入,复制这行命令可能不行,不知道为何)
7. 使用程序:
如使用psiblast
在目录/home/yonpen/blast下新建3个文件夹,分别命名为pssm,input,output
设待查询序列所在文件的名字为a.fasta(一个文件放一条序列,且必须为fasta格式)
执行命令:
psiblast -comp_based_stats 1 -evalue 0.001 -num_iterations 3 -db nr -query input/a.fasta -out output/a.txt -out_ascii_pssm pssm/a.pssm