環境
- 阿里雲ECS服務器
- 系統:Ubuntu 20.04
- 已經搭建好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 感謝!