本地Blast_批量查找家族的同源基因

一、Mac上的Blast+安装

下载地址 https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/

二、格式化数据库

BLAST数据库分为两类,核酸数据库和氨基酸数据库,可以用makeblastbd创建。

makeblastdb -in db.fasta -dbtype prot -out dbname

参数说明:
-in:待格式化的序列文件, 其后的db.fasta为序列文件名
-dbtype:数据库类型,包括prot和nucl,分别对应blastp和blastn
-out:数据库名,其后的dbname为序列文件名

查看更多参数:

makeblastdb -help

三、比对

  1. 蛋白序列比对蛋白数据库(blastp)
  2. 核酸序列比对核酸数据库(blastn)
  3. 核酸序列比对蛋白数据库(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

参数说明:
-query: 输入文件路径及文件名 seq.fasta
-db:格式化了的数据库路径及数据库名 dbname
-out:输出文件路径及文件名 seq.blast
-outfmt:输出文件格式,6是tabular格式,对应BLAST的m8格式
-evalue:设置输出结果的期望值,1e-5
-num_threads:线程数,4

BLAST的 -outfmt选项提供个性化的选择。一共有18个选择,默认是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结果中从左到右每一列的意义分别是:
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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容