Linux版blast配置自己的数据库

环境

  1. 阿里云ECS服务器
  2. 系统:Ubuntu 20.04
  3. 已经搭建好blast服务(如果还没搭建,可以参考我的博客:https://www.cnblogs.com/Coder-Photographer/p/13602442.html)

很多人都是选择NCBI等网站的数据搭建,但是我需要用自己的FASTA文件搭建数据库

搭建数据库

创建数据库文件

mkdir bio-db

移动要构建数据库的FASTA文件到文件

cp xxxxx.fasta  bio-db
# 切换到bio-db 文件夹
cd bio-db

输入命令来构建

# 更多makeblastdb命令,请用 makeblastdb -h 查询,这里只是举例
makeblastdb -in  你的fasta文件 -dbtype 数据库类型   
例如
makeblastdb -in ./fasta_files/EPI_ISL_468719.fasta  -dbtype nucl
结果如下图所示

测试

选取一个新的fasta文件测试

blastn -query 新的fasta文件 -db 数据库存放的位置 -out 输出的结果文件名 -outfmt 输出格式
例如
blastn -query XXXX.fasta -db /root/bio-db/id_no_short_seqs.fas -out firstExample.txt -outfmt 6

如果 outfmt的参数是6

从左到右各列参数为
Query_id    Subject_id   %_identity alignment_length   mismatches   gap_openings  q. start  q. end   s. start   s. end   e-value  bit_score

输出结果

注:本博客基于官网文档和B站UP主的视频完成 XiongdyMishika

在此也对UP主:XiongdyMishika 感谢!

posted @ 2020-09-02 16:32  Adam_lxd  阅读(1283)  评论(0编辑  收藏  举报