BLAST searches - rrwick/Bandage GitHub Wiki
Bandage uses BLAST to search for sequences in the assembly graph, and it can then display the hits on the graph visualisation. It can use both blastn (for nucleotide queries) and tblastn (for protein queries).
BLAST installation
Before you can use BLAST in Bandage, it must be installed on the same computer. NCBI has BLAST installation instructions in the BLAST Command Line Applications User Manual. Alternatively, BLAST can be installed using a package manager, e.g.:
brew install blast
(using Homebrew on Mac)sudo apt-get install ncbi-blast+
(using APT on Ubuntu)
BLAST search in Bandage
After a graph is loaded, you may click the 'Create/view BLAST search' button to open the BLAST search window.
Building a BLAST database
The first step to conducting a BLAST search is building a BLAST database using all of the graph nodes. Do this by clicking the 'Build BLAST database' button.
Loading queries
BLAST queries can be loaded from a FASTA file (which may contain multiple sequences) or typed/pasted in manually. Both nucleotide and protein queries can be used. Each query is given a colour which can be changed by clicking the colour's button. A query's name can be changed by editing the 'Query name' cell in the table.
Running a BLAST search
Before a BLAST search is run, you may type in additional command line parameters to be used by blastn and/or tblastn. Refer to the BLAST documentation for a full list of available options. Bandage can also filter the BLAST hits by a number of values. Click the 'Set BLAST hit filters' button to configure these filters.
Viewing and interpreting BLAST results
Raw output
After the BLAST search completes, the results will appear in the table at the bottom of the BLAST search window. These are the results as outputted by the BLAST command line tools, and they can be sorted by clicking in the column headers.
On graph
In the main Bandage window, there is a drop-down menu where you can select which query (or all queries) to display on the graph. These can be highlighted in colour using two of Bandage's colour schemes:
- BLAST hits (solid): displays each BLAST hit using the colour of the corresponding query. This mode is useful when displaying multiple queries on the graph at once.
- BLAST hits (rainbow): displays each BLAST hit coloured by its position in its query. This mode is useful when looking at a single query at a time.
In the main Bandage window, you can tick the 'BLAST hits' box in the 'Node labels' section to label each BLAST hit with the name of its query.
Query paths
Bandage attempts to find possible paths through the graph which represent a query (see graph paths). This is particularly useful when a single query (such as a gene) is split over multiple nodes.
Web BLAST node sequences
It is also possible to use the NCBI BLAST web page to identify node sequences. With one or more nodes selected, choose the 'Web BLAST selected nodes' item in the 'Output' menu.
If the selected nodes have a total length of about 8 kilobases or less, Bandage will load the NCBI BLAST webpage with your sequences already present in the query section. You can then adjust the search options and click 'BLAST' to perform the search.