一、建立索引
formatdb -i ref.fna -p F -n ref.fna
-p: T=protein
F=nucleotide
default = T
-n:重命名数据库文件的名称
二、比对
blastn
blastall -p blastn -i query.fa -d ref.fna -e 1e-06 -m 8 -o output.fmt8.txt
-m:输出格式
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 = query-anchored no identities and blunt ends,
6 = flat query-anchored, no identities and blunt ends,
7 = XML Blast output,
8 = tabular,
9 tabular with comment lines
10 ASN, text
11 ASN, binary [Integer]
fmt=8:
0
1
2
3
4
5
6
7
8
9
10
11
qseqid
sseqid
pident
length
mismatch
gapopen
qstart
qend
sstart
send
evalue
bitscore
自定义格式:
-outfmt "8 qseqid sseqid evalue"
column 1
column 2
qseqid
Query Seq-id
qgi
Query GI
qacc
Query accesion
qaccver
Query accesion.version
qlen
Query sequence length
sseqid
Subject Seq-id
sallseqid
All subject Seq-id(s), separated by a ';'
sgi
Subject GI
sallgi
All subject GIs
sacc
Subject accession
saccver
Subject accession.version
sallacc
All subject accessions
slen
Subject sequence length
qstart
Start of alignment in query
qend
End of alignment in query
sstart
Start of alignment in subject
send
End of alignment in subject
qseq
Aligned part of query sequence
sseq
Aligned part of subject sequence
evalue
Expect value
bitscore
Bit score
score
Raw score
length
Alignment length
pident
Percentage of identical matches
nident
Number of identical matches
mismatch
Number of mismatches
positive
Number of positive-scoring matches
gapopen
Number of gap openings
gaps
Total number of gaps
ppos
Percentage of positive-scoring matches
frames
Query and subject frames separated by a '/'
qframe
Query frame
sframe
Subject frame
btop
Blast traceback operations (BTOP)
staxids
Subject Taxonomy ID(s), separated by a ';'
sscinames
Subject Scientific Name(s), separated by a ';'
scomnames
Subject Common Name(s), separated by a ';'
sblastnames
Subject Blast Name(s), separated by a ';' (in alphabetical order)
sskingdoms
Subject Super Kingdom(s), separated by a ';' (in alphabetical order)
stitle
Subject Title
salltitles
All Subject Title(s), separated by a '<>'
sstrand
Subject Strand
qcovs
Query Coverage Per Subject
qcovhsp
Query Coverage Per HSP