構(gòu)建蛋白質(zhì)數(shù)據(jù)庫(kù):
makeblastdb -in spinach.fa -parse_seqids -hash_index -out spinach_DB -dbtype prot
構(gòu)建核酸數(shù)據(jù)庫(kù):
makeblastdb -in spinach.fa -parse_seqids -hash_index -out spinach_DB -dbtype nucl #一般帶上-parse_seqids -hash_index
blastp
-query 后接查詢序列的文件名稱;
-db 后接格式化好的數(shù)據(jù)庫(kù)名稱;
-out 后接要輸出的文件名稱及格式
blastp -query spinach_1.fa -db spinach_DB -out spinach_blast
個(gè)人在使用blastn的過(guò)程中總結(jié)了一些自認(rèn)為常用的參數(shù)潮酒,總結(jié)如下:
blastn -query input_file -db database_name -out output_file -evalue evalue -max_target_seqs num_sequences -num_threads int_value -outfmt format format_string
blastn -query input_file -db database_name -out output_file -evalue evalue -max_target_seqs num_sequences -num_threads int_value -outfmt format "7 qacc sacc evalue length pident"
blastn -task blastn-short -query input_file -out output_file -db database_name -outfmt 6(or 7) -evalue 0.01 -num_threads 15 ##序列比對(duì)
-db: 指定blast搜索用的數(shù)據(jù)庫(kù),詳見(jiàn)上篇文章
-query:用來(lái)查詢的輸入序列桥爽,fasta格式
-out:輸出結(jié)果文件
-evalue: 設(shè)置e值cutoff
-max_target_seqs:設(shè)置最多的目標(biāo)序列匹配數(shù)(以前我都用-b 5 -v 5,理解不對(duì)請(qǐng)指教)
-num_threads:指定多少個(gè)cpu運(yùn)行任務(wù)(依賴于你的系統(tǒng),同于以前的-a參數(shù))
-outfmt format "7 qacc sacc evalue length pident" :這個(gè)是新BLAST+中最拉風(fēng)的功能了,直接控制輸出格式,不用再用parser啦医咨, 7表示帶注釋行的tab格式的輸出,可以自定義要輸出哪些內(nèi)容架诞,用空格分格跟在7的后面,并把所有的輸出控制用雙引號(hào)括起來(lái)干茉,其中qacc查詢序列的acc,sacc表示目標(biāo)序列的acc谴忧,evalue即是e值,length即是匹配的長(zhǎng)度,pident即是序列相同的百分比沾谓,其他可用的特征(紅色字體)如下:
結(jié)果文件簡(jiǎn)寫(xiě) 含義
qaccver 查詢的AC版本(與此類似的還有qseqid,qgi,qacc,與序列命名有關(guān))
saccver 目標(biāo)的AC版本(于此類似的還有sseqid,sallseqid,sgi,sacc,sallacc,也是序列命名相關(guān))
pident 完全匹配百分比 (響應(yīng)的nident則是匹配數(shù))
length 聯(lián)配長(zhǎng)度(另外slen表示查詢序列總長(zhǎng)度委造,qlen表示目標(biāo)序列總長(zhǎng)度)
mismatch 錯(cuò)配數(shù)目
gapopen gap的數(shù)目
qstart 查詢序列起始
qend 查詢序列結(jié)束
sstart 目標(biāo)序列起始
send 目標(biāo)序列結(jié)束
evalue 期望值
bitscore Bit得分
score 原始得分
AC: accession
*** Formatting options
-outfmt <String>
alignment view options:
0 = pairwise,
1 = query-anchored showing identities,
2 = query-anchored no identities,
3 = flat query-anchored, show identities,
4 = flat query-anchored, no identities,
5 = XML Blast output,
6 = tabular,
7 = tabular with comment lines,
8 = Text ASN.1,
9 = Binary ASN.1
10 = Comma-separated values
Options 6, 7, and 10 can be additionally configured to produce
a custom format specified by space delimited format specifiers.
The supported format specifiers are:
qseqid means Query Seq-id
qgi means Query GI
qacc means Query accesion
sseqid means Subject Seq-id
sallseqid means All subject Seq-id(s), separated by a ';'
sgi means Subject GI
sallgi means All subject GIs
sacc means Subject accession
sallacc means All subject accessions
qstart means Start of alignment in query
qend means End of alignment in query
sstart means Start of alignment in subject
send means End of alignment in subject
qseq means Aligned part of query sequence
sseq means Aligned part of subject sequence
evalue means Expect value
bitscore means Bit score
score means Raw score
length means Alignment length
pident means Percentage of identical matches
nident means Number of identical matches
mismatch means Number of mismatches
positive means Number of positive-scoring matches
gapopen means Number of gap openings
gaps means Total number of gaps
ppos means Percentage of positive-scoring matches
frames means Query and subject frames separated by a '/'
qframe means Query frame
sframe means Subject frame
When not provided, the default value is:
'qseqid sseqid pident length mismatch gapopen qstart qend sstart send
evalue bitscore', which is equivalent to the keyword 'std'
Default = `0'