BLAST+ HowTo

From TaejoonLab
Jump to: navigation, search

Download & install the program

  • If you download binary/executable files, executable files are available right after decompress the file. Hereafter, '/path/to/ncbi+/' refer the directory of those files on your computer.
  • If you need to compile the source code, read 'README' and/or 'INSTALL' document inside source directory after uncompress the file.


Make sequence database

For nucleotide sequence database,

$ /path/to/blast+/bin/makeblastdb -dbtype nucl $DB_SEQ_FASTA_FILE $DB_NAME

For protein sequence database,

$ /path/to/blast+/bin/makeblastdb -dbtype prot $DB_SEQ_FASTA_FILE $DB_NAME


Run sequence search

BLASTP (Q: protein -> T: protein)

/path/to/blast+/bin/blastp -evalue 1e-4 -num_threads 1 -seg yes -db $DB_NAME -query $QUERY_SEQ_FASTA -out $OUT_FILE -outfmt 7

You can also put the sequence length info on the result table as below.

/path/to/blast+/bin/blastp -evalue 1e-4 -num_threads 1 -seg yes -db $DB_NAME -query $QUERY_SEQ_FASTA -out $OUT_FILE -outfmt "7 qseqid sseqid pident length mismatch gapopen qlen qstart qend slen sstart send evalue bitscore"

BLASTN (Q: DNA -> T: DNA)

/path/to/blast+/bin/blastn -task megablast -evalue 1e-4 -num_threads 1 -dust yes -db $DB_NAME -query $QUERY_SEQ_FASTA -out $OUT_FILE -outfmt 7

You can also put the sequence length info on the result table as below.

/path/to/blast+/bin/blastn -task megablast -evalue 1e-4 -num_threads 1 -dust yes  -db $DB_NAME -query $QUERY_SEQ_FASTA -out $OUT_FILE -outfmt "7 qseqid sseqid pident length mismatch gapopen qlen qstart qend slen sstart send evalue bitscore"


See also