一显熏、Mac上的Blast+安裝
下載地址 https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/
二喘蟆、格式化數(shù)據(jù)庫(kù)
BLAST數(shù)據(jù)庫(kù)分為兩類,核酸數(shù)據(jù)庫(kù)和氨基酸數(shù)據(jù)庫(kù)蕴轨,可以用makeblastbd創(chuàng)建橙弱。
makeblastdb -in db.fasta -dbtype prot -out dbname
參數(shù)說(shuō)明:
-in:待格式化的序列文件, 其后的db.fasta為序列文件名
-dbtype:數(shù)據(jù)庫(kù)類型棘脐,包括prot和nucl,分別對(duì)應(yīng)blastp和blastn
-out:數(shù)據(jù)庫(kù)名顷链,其后的dbname為序列文件名
查看更多參數(shù):
makeblastdb -help
三屈梁、比對(duì)
- 蛋白序列比對(duì)蛋白數(shù)據(jù)庫(kù)(blastp)
- 核酸序列比對(duì)核酸數(shù)據(jù)庫(kù)(blastn)
- 核酸序列比對(duì)蛋白數(shù)據(jù)庫(kù)(blastx)
blastp -query seq.fasta -db dbname -out seq.blast -outfmt 6 -evalue 1e-5 -num_alignments 10 -num_descriptions 10 -num_threads 4
blastn -query seq.fasta -db dbname -out seq.blast -outfmt 6 -evalue 1e-5 -num_threads 4
blastx -query seq.fasta -db dbname -out seq.blast -outfmt 6 -evalue 1e-5 -num_descriptions 10 -num_threads 4
參數(shù)說(shuō)明:
-query: 輸入文件路徑及文件名 seq.fasta
-db:格式化了的數(shù)據(jù)庫(kù)路徑及數(shù)據(jù)庫(kù)名 dbname
-out:輸出文件路徑及文件名 seq.blast
-outfmt:輸出文件格式煞抬,6是tabular格式,對(duì)應(yīng)BLAST的m8格式
-evalue:設(shè)置輸出結(jié)果的期望值革答,1e-5
-num_threads:線程數(shù)蝗碎,4
BLAST的 -outfmt選項(xiàng)提供個(gè)性化的選擇。一共有18個(gè)選擇慈省,默認(rèn)是0。
0 = Pairwise, 1 = Query-anchored showing identities,
2 = Query-anchored no identities, 3 = Flat query-anchored showing identities,
4 = Flat query-anchored no identities, 5 = BLAST XML,
6 = Tabular, 7 = Tabular with comment lines,
8 = Seqalign (Text ASN.1), 9 = Seqalign (Binary ASN.1),
10 = Comma-separated values, 11 = BLAST archive (ASN.1),
12 = Seqalign (JSON), 13 = Multiple-file BLAST JSON,
14 = Multiple-file BLAST XML2, 15 = Single-file BLAST JSON,
16 = Single-file BLAST XML2, 17 = Sequence Alignment/Map (SAM),
18 = Organism Report
其中outfmt5(blast2go工具中用到)和outfmt6最為常用,outfmt6結(jié)果中從左到右每一列的意義分別是:
Query_id Subject_id %_identity alignment_length mismatches gap_openings q.start q.end s.start s.end e-value bit_score
AKS24976.1 ABU86350.1 25.446 224 149 9 713 931 2 212 3.23e-05 38.1
AKS24976.1 ABU86150.1 38.596 57 34 1 599 655 16 71 8.09e-05 36.6
AKS24976.1 ABU86161.1 38.667 75 42 2 578 652 14 84 9.06e-05 37.0
AKS24976.1 ABU86160.1 38.667 75 42 2 578 652 14 84 9.06e-05 37.0
AKS24976.1 ABU86162.1 38.667 75 42 2 578 652 14 84 9.31e-05 37.0
AKS24976.1 ABU86154.1 38.596 57 34 1 599 655 16 71 9.70e-05 36.6
AKS24976.1 ABU86152.1 38.596 57 34 1 599 655 16 71 9.70e-05 36.6
AKS24976.1 ABU86329.1 39.130 69 38 2 599 664 83 150 2.51e-04 34.7