Linux安裝blast+及使用

下載解壓

網(wǎng)址:

https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/

選擇預(yù)編譯的linux版本

ncbi-blast-2.10.1+-x64-linux.tar.gz 

可以用wget ;或者下載后上傳服務(wù)器

解壓

tar -zxvf ncbi-blast-2.10.1+-x64-linux.tar.gz

解壓后的文件名是ncbi-blast-2.10.1+ blast+

我把它修改成了 blast+

絕對(duì)路徑

/home/user024/blast+

添加環(huán)境變量

將BLAST+可執(zhí)行程序所在目錄(bin)的絕對(duì)路徑加入到環(huán)境變量$PATH中,方便通過(guò)程序名直接調(diào)用。

可以用 vim 編輯器,在 ~/.bashrc文件 最后輸入如上一行

i 進(jìn)入輸入模式,在最后加入以下行:

export PATH=/home/user024/blast+/bin:$PATH

esc 退出輸入模式,進(jìn)入命令模式。輸入 :wq 保存并退出

使之生效

source ~/.bashrc

驗(yàn)證

blastn -version

出現(xiàn)版本信息和建立的日期,就證明成功啦

本地化庫(kù)

參見(jiàn)

ref1:

http://blog.shenwei.me/local-blast-installation/#

比對(duì)程序

建庫(kù)

makeblastdb -in input_file -dbtype molecule_type -parse_seqids -out database_name -logfile File_Name

-dbtype 后接序列類(lèi)型,nucl為核酸,prot為蛋白
-parse_seqids 推薦加上
-out 后接數(shù)據(jù)庫(kù)名
-logfile 日志文件,如果沒(méi)有默認(rèn)輸出到屏幕

比對(duì)

blastp -query seq.fasta -out seq.blast -db dbname -outfmt 6 -evalue 1e-5 

-query: 輸入文件路徑及文件名
-out:輸出文件路徑及文件名
-db:格式化了的數(shù)據(jù)庫(kù)路徑及數(shù)據(jù)庫(kù)名
-outfmt:輸出文件格式,總共有12種格式,6是tabular格式對(duì)應(yīng)之前BLAST的m8格式
-evalue:設(shè)置輸出結(jié)果的e-value值
-num_alignments 顯示比對(duì)數(shù)Default = 250
-num_descriptions:?jiǎn)涡忻枋龅淖畲髷?shù)目 default=50
-num_threads:線程

格式6輸出結(jié)果——

Query id

Subject id

% identity

alignment length

mismatches

gap openings

q. start

q. end

s. start

s. end

e-value

bit score

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容