Blast

NCBI 教程:https://www.ncbi.nlm.nih.gov/books/NBK279681/

本地使用 blast 的步骤

1. 构建本地数据库索引

$makeblastdb -in hs_chr.fasta -dbtype nucl  -out hs_chr

也在构建index时可以添加 taxid 信息

makeblastdb -in input.fasta -dbtype nucl -parse_seqids -taxid_map seqid2taxid.txt -title out_db  -out out_db

2. 进行比对

$blastn –db nt –query nt.fsa –out results.out  

blastn 用于比对短序列

对于短序列比对,需要添加-task blastn-short参数,否则比对结果很不准确,绝大多数序列会出现比对不上的情况

用blastdbcmd从blast的数据库中抽提指定序列

blastdbcmd -db /home/database/nt -dbtype nucl -entry BX322613.6

# Example:
# blastdbcmd -db <db label> -entry all -outfmt "%g %T" -out <outfile>
blastdbcmd -db 16SMicrobial -entry all -outfmt "%g %T" -out 16SMicrobial.gi_taxid.tsv

参考:https://riptutorial.com/bioinformatics/example/29678/extract-gi-and-taxid-from-blastdb

 

posted on 2018-12-05 11:16  0820LL  阅读(321)  评论(0编辑  收藏  举报

导航