本地blast试运行

Linux

由于服务器上已经安装有Blast+,所以就没有安装的步骤啦!
目的:将候选基因的ID转换成另一参考基因组的ID
准备文件:候选基因氨基酸序列--target.fasta;参考基因组氨基酸序列--reference.fa

cd /home02/qzy/zm/blast
#建数据库
makeblastdb -in reference.fa -dbtype prot -parse_seqids -hash_index -out reference-prot-database
#将序列比对上数据库
blastp -query target.fasta -db reference-prot-database -evalue 1e-3 -out blast.txt -outfmt 6 -num_alignments 10 -num_threads 4
blastp -query target.fasta -out blast.txt -db reference-prot-database  -num_threads 4  -evalue 1e-10 -best_hit_score_edge 0.05 -best_hit_overhang 0.25 -outfmt 7 -max_target_seqs 1

做比对的时候,两种blastp都可以,第二种是输出的最佳比对,只有一条。区别在于outfmt参数的设置

Windows

Windows环境中使用的是Cygwin,所以在windows下应用本地blast也比较简单,基本和linux一样

# 切换到相应目录,这里我切换到D盘
cd D:
# 只需要修改最开始的命令makeblastdb为makeblastdb.exe
makeblastdb.exe -in target-database.fasta -dbtype prot -out target-database.db
blastp.exe -query my.fasta -out blast.out.xls -db target-database.db -evalue 1e-5 -outfmt 6

参考文章:
生信笔记的简单易懂版
Blast输出结果及解析
NCBI-本地Blast,这个现在还用不到,留着看
Warning: [blastp] Examining 5 or more matches is recommended 报错解决

你可能感兴趣的:(本地blast试运行)