BLAST+
at the terminal¶BLAST+
at the terminalBLAST+
databasesBLAST+
command-lineBLAST+
outputThe BLAST/BLAST+
package can be installed on your own machine (desktop or laptop) or on a shared server. This gives you full control over how to use the program, and allows you to build custom databases (useful for proprietary information). However, you are limited to the computing power you have available. Happily, BLAST
doesn't require excessive amounts of computing resources and for many tasks a desktop or laptop machine is sufficient.
BLAST+
in the terminal¶~/Teaching-IBioIC-Intro-to-Bioinformatics/02-sequence_databases
lesson directory:cd ~/Teaching-IBioIC-Intro-to-Bioinformatics/02-sequence-databases
ls
BLASTN
works by issuing a command to get the short help message:blastn -h
BLAST+
database¶The program that builds BLAST+
sequence databases is makeblastdb
. You can get basic help on the command by issuing:
makeblastdb -h
BLAST
database with the following command:makeblastdb -in data/kitasatospora/GCA_001905465.1_ASM190546v1_cds_from_genomic.fna \
-dbtype nucl \
-title kitasatospora_cds \
-out data/kitasatospora/kitasatospora_cds
This will return some information to the terminal, and create the database.
This creates three files, which together comprise a new BLAST
nucleotide database against which you can make queries.
BLAST
help at the Terminal¶Use the following commands to get the long-format help messages for BLASTN
and BLASTX
:
BLASTN
query¶After looking at the help information in the exercise above, you will have seen that there are several relevant input options:
-query
: path to the query sequence(s)-db
: path to the BLAST
database-outfmt
: the output format you want BLAST
to produce-out
: path to the output file you want BLAST
to writeIn this case:
data/kitasatospora/lantibiotic.fasta
data/kitasatospora/kitasatospora_cds
and you'll generate output in two formats (the same ones that were produced from the NCBI website search). You will need to construct two commands, each with the same query and database, but different output format values, and output filenames:
output/kitasatospora/terminal_blastn_query_01.txt
6
(tabular), filename: output/kitasatospora/terminal_blastn_query_01.tab
blastn -query data/kitasatospora/lantibiotic.fasta \
-db data/kitasatospora/kitasatospora_cds \
-out output/kitasatospora/terminal_blastn_query_01.txt
head -n 40 output/kitasatospora/terminal_blastn_query_01.txt
blastn -query data/kitasatospora/lantibiotic.fasta \
-db data/kitasatospora/kitasatospora_cds \
-outfmt 6 \
-out output/kitasatospora/terminal_blastn_query_01.tab
You can inspect the contents of this file by issuing the command:
less output/kitasatospora/terminal_blastn_query_01.tab
BLAST
at the Terminal¶Using BLAST
in the terminal: