如何构建本地Blast?


BLAST一种是在线的(http://blast.ncbi.nlm.nih.gov/Blast.cgi),一种是本地的(Local BLAST,单机版BLAST,Standalone BLAST)。
对于少量的序列,如果要在跟整个(或者某一物种)核酸或者蛋白库比对,一般采用在线BLAST,简单易用,直观,容易被人接受其;对于大量序列,或者是目前不方便公开的数据库,或者是自定义的数据库,一般采用本地BLAST,其效率高,能满足用户更多的要求,但操作相对有点繁琐;

在线blast的说明看这里:NCBI在线Blast的图文说明

blast软件下载看这里:   最新版本地blast下载

构建本地Blast首先要准备什么:

  1. 下载blast软件
  2. 构建本地的blast数据库
  3. 学习blast的常用参数与命令

如何构建本地的blast数据库:
假设有一序列数据(sequence.fa,多序列,fasta格式),欲自己做成Blast数据库,典型的命令如下:

核酸序列:

$ ./formatdb –i sequence.fa –p F –o T/F

蛋白序列:

$ ./formatdb –i sequence.fa –p T –o T/F

执行blast:

获得了单机版的Blast程序,解压开以后,如果有了相应的数据库(db),那么就可以开始执行Blast分析了。

单机版的Blast程序包,把基本的blast分析,包括blastn,blastp,blastx等都整合到了blastall一个程序里面。

以下是一个典型的blastn分析命令:
(待分析序列seq.fa,数据库nt_db)

$./blastall –p blastn –i seq.fa  -d nt_db –w 7 –e 10 –o seq.blastn.out

(该命令的意思是,对seq.fa文件中的核酸序列对nt_db数据库执行blastn搜索,窗口大小是7,e值限制是10,输出的结果保存到文件seq.blastn.out 中)。

Blastall的常用参数:

-p 程序名应该是blastn,blastp,blastx,tblastn,tblastx中的一个
-d 数据库名称,默认nr
-i 查询序列文件,默认stdin
-e E值限制,默认10
-o 结果输出文件,默认stdout
-F 过滤选项,默认T
-a 选择进行运算的CPU个数

详细blast参数请看:本地blast的详细用法


《 “如何构建本地Blast?” 》 有 9 条评论

  1. 我是新手,想问个问题,在构建本地的blast数据库的时候,要转化格式的序列文件非常多,要怎么写命令呢?用formatdb –i sequence.fa –p F –o T/F不是很麻烦吗?
    谢谢~

  2. 那是怎么合并呢?
    比如我想比对人的序列,如果去网上下的话,每个染色体都有一个文件.加起来也有24个了..
    只是比如..

  3. What i do not understood is in truth how you are now not actually
    a lot more smartly-favored than you might be right now.

    You’re so intelligent. You recognize thus significantly relating to this subject, made me in my opinion consider it from a lot of varied angles. Its like women and men don’t seem to be fascinated except it’s one thing to do with Woman gaga! Your own stuffs excellent. All the time handle it up!

  4. Its such as you read my thoughts! You appear to know a lot about this, such as you wrote the
    book in it or something. I think that you simply can do
    with some p.c. to force the message house a bit, however other
    than that, this is excellent blog. An excellent read.
    I will definitely be back.

  5. I know this if off topic but I’m looking into starting my own blog and was curious what all is needed to get setup?
    I’m assuming having a blog like yours would cost a
    pretty penny? I’m not very internet smart so I’m not 100% sure.

    Any recommendations or advice would be greatly appreciated.
    Many thanks