1. 预编译安装Blast
wget https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.9.0/ncbi-blast+-2.9.0-src.tar.gz
tar zvxf /disk1/shares/ncbi-blast-2.10.1+-x64-linux.tar.gz -C ~/Biosofts/#解压包到目录
cd Biosofts/ncbi-blast-2.10.1+/bin
./blastn -h
echo 'export PATH=~/Biosofts/ncbi-blast-2.10.1+/bin:$PATH' >> ~/.bashrc
source ~/.bashrc#配置环境
blastn -h
2. 格式化本地数据库
#makeblastdb -in db.fasta -dbtype prot -parse_seqids -out dbname
核酸序列比对核酸数据库格式化(blastn)
makeblastdb -in /disk1/shares/Seqs/draft_genome/1140.51.contigs.fa -dbtype nucl -parse_seqids -hash_index -out PCC7942_nucl
blastn -query /disk1/shares/Seqs/test_query.fna -db PCC7942_nucl -evalue 1e-5 -out blast_out_dna.txt -outfmt 6 -num_alignments 10 -num_threads 1
less blast_out_dna.txt
蛋白质序列比对蛋白质数据库格式化
makeblastdb -in /disk1/shares/Seqs/draft_genome/1140.51.faa -dbtype prot -parse_seqids -hash_index -out PCC7942_prot
blastp -query /disk1/shares/Seqs/test_pro_query.faa -db PCC7942_prot -evalue 1e-3 -out blast_out_pro.txt -outfmt 6 -num_alignments 10 -num_threads 1
less blast_out_pro.txt