How to Use NCBI BLAST and Read the Results (Video)
Written guide: How to BLAST a Genome on NCBI
This video shows how to run an NCBI BLAST search, read the Descriptions table and E-values, and check a species identification against the 16S database.
Chapters
- 0:00 What BLAST does
- 1:16 Choosing a BLAST program
- 2:14 Setting up a Nucleotide BLAST search
- 5:19 Reading the Descriptions table
- 8:40 Graphic Summary, Alignments and Taxonomy tabs
- 10:26 Checking the identification with the 16S database
- 13:17 Review and question
Video transcript
0:00 What BLAST does
First, we will look at what BLAST does and why a search through millions of sequences finishes in seconds. BLAST stands for Basic Local Alignment Search Tool. Stephen Altschul, David Lipman and three colleagues published the method in 1990, while working at the National Center for Biotechnology Information, or NCBI, in the United States. A BLAST search starts from a query, the sequence we want to identify, and looks through a database for records whose sequences align well with the query. An alignment places two sequences side by side so that matching bases line up. A local alignment covers only the region where the two sequences are similar, so a short query can match a small stretch of a long chromosome. Comparing the query base by base with millions of records would take far too long. So BLAST first looks for short exact matches, called words, between the query and each record, and it extends an alignment only around the places where such words occur. Each alignment that survives this extension receives a score, and the results page lists the records in order of that score. Now that we know how BLAST finds and scores a local alignment, we can open the BLAST home page and choose a program.
1:16 Choosing a BLAST program
Second, with the search method in place, we will choose the right BLAST program for our query. The BLAST home page at NCBI offers four main programs, and the choice depends on whether the query and the database hold DNA or protein. Nucleotide BLAST compares a DNA query with DNA databases, and Protein BLAST compares a protein query with protein databases. The other two programs translate DNA into protein before they compare anything. The program blastx translates a DNA query in all six reading frames, three on each strand, and searches protein databases with the translations. The program tblastn works in the opposite direction. It searches DNA databases with a protein query after translating the database sequences. Our example query is DNA, and we want to find similar DNA sequences, so the search in this lesson uses Nucleotide BLAST.
2:14 Setting up a Nucleotide BLAST search
Third, with Nucleotide BLAST chosen, we will fill in the search form, from the query box down to the search button. The query in this example is 800 bases of the 16S ribosomal RNA gene of Escherichia coli. In bacteria, this gene encodes the RNA of the small ribosomal subunit. The 800 bases come from a known GenBank record, so we already know the correct answer and can check how well BLAST finds the source. Laboratories often identify a bacterial isolate in exactly this way. They sequence its 16S gene with the Sanger method and search the read with BLAST. The Enter Query Sequence box accepts a bare sequence, an accession number, or text in FASTA format. A FASTA entry starts with a header line that begins with a greater-than sign, and the sequence follows on the next lines. Beside the box, the Query subrange fields limit the search to part of the query. For a Sanger read, these fields can leave out the low-quality bases at the start and end of the read. The Job Title field names the search. BLAST fills the title from the FASTA header, and the title appears on the results page, which makes a saved search easy to find later. Under Choose Search Set, the form opens on the standard databases with the core nucleotide database selected. NCBI made core nt the default database in 2024. Core nt holds the same gene and transcript sequences as the older nt database but leaves out most eukaryotic chromosome sequences. As a result, core nt is much smaller than nt, and searches against core nt finish sooner. The Organism box restricts the search to one species or group of organisms. The Exclude boxes remove predicted model sequences and sequences from uncultured or environmental samples. For this first search, these boxes stay empty. Under Program Selection, the default is megablast, listed as Highly similar sequences. Megablast is the fastest option and works best when the database holds sequences at least 95 percent identical to the query. Discontiguous megablast suits comparisons between more distant species. The program blastn runs more slowly, but it starts from shorter words and so finds weaker similarities. A 16S read from a bacterial isolate usually has a close relative in the database, so megablast is the right choice here. At the bottom of the page, the Algorithm parameters section holds further settings. Max target sequences is set to 100, so the results list at most the 100 best-matching records. The Expect threshold is set to 0.05. BLAST leaves out any record whose E value lies above this threshold, and we will define the E value when we read the results. Clicking the BLAST button sends the search to the NCBI servers. While the search runs, the page shows a Request ID, or RID, and the results stay available under that RID for 36 hours. When the search finishes, the page switches to the results, which we read next.
5:19 Reading the Descriptions table
Fourth, once the search has finished, we will read the results page column by column, starting with the Descriptions table. At the top of the page, a summary lists the job title, the RID, the program, the database and the query length of 800 bases. Below the summary are four tabs, named Descriptions, Graphic Summary, Alignments and Taxonomy. The Descriptions tab opens first, with one row for each database record, sorted from the best match down. The Description column gives the title of each record, and the Scientific Name column gives the organism the sequence came from. In our search, the first rows are Escherichia coli 16S ribosomal RNA genes, and the record our query came from appears tenth, because many records match all 800 bases equally well. Next come the scores. A raw alignment score depends on the scoring system, so BLAST converts the raw score to a bit score, and bit scores from different searches share one scale. Max Score is the bit score of the best single alignment between the query and a record. For a perfect match across all 800 bases, megablast gives a Max Score of 1478. Total Score adds up the scores of all alignments between the query and a record. In a 16S gene record, the query aligns only once, so Total Score equals Max Score. Further down the list, the complete Escherichia coli genomes show a Total Score of about 10,200, roughly seven times their Max Score. Pause the video here and work out why a whole genome would have a Total Score about seven times its Max Score. Escherichia coli carries seven copies of its ribosomal RNA genes. The query aligns with each copy, so a genome record holds seven separately scored alignments, and their scores add up. Query Cover is the percentage of the query that falls within the alignments. In our search, query cover is 100 percent in the top rows, so the alignments cover all 800 bases. The E value, short for expect value, is the number of matches at least this good that we would expect to find by chance alone in a database of this size. A better match has a smaller E value, and for the top rows the E value is so small that BLAST rounds it to 0.0. Shared birthdays work in a similar way. In a larger crowd, more people share a birthday by chance, just as a larger database holds more chance matches. Asking for the birth year to match as well, like asking for a longer alignment, makes chance matches much rarer. Query length matters for the same reason. A short query receives a larger E value even when all its bases match, because a short sequence is more likely to occur somewhere by chance. Percent identity is the share of aligned positions where the query and the record carry the same base. The 16S gene records at the top show 100 percent, and most genome rows show 99.88 percent, which is 800 identical positions out of 801. The accession length column gives the length of the whole database record, about 1,500 bases for a 16S gene and millions of bases for a complete genome. The Accession column links to the record itself in GenBank.
8:40 Graphic Summary, Alignments and Taxonomy tabs
Fifth, now that the table is clear, we will look at the other three tabs, which show the same matches in different forms. The Graphic Summary draws the query as a bar along the top and each record's alignment as a line below the bar, colored by score according to the key. In our search, the lines span the whole query in the color for the highest scores. In an alignment, BLAST calls the database sequence the subject. The Alignments tab prints each match base by base, with the query on the lines marked Query and the subject on the lines marked Sbjct. A vertical bar between two bases means the bases are identical. Above each alignment, a summary counts the identities and the gaps, and for the record our query came from, the count reads 800 identities out of 800 with no gaps. The Strand entry reads Plus over Plus when the query and the record run in the same direction. In the genome records, some of the seven copies read Plus over Minus, because those genes lie on the opposite strand of the chromosome. BLAST searches both strands by default. For these copies, BLAST aligned the query with the reverse complement, which is the opposite strand read in its own five prime to three prime direction, the direction in which DNA is written. A Sanger read made with a reverse primer gives the same Plus over Minus result against a 16S record, because the read runs opposite to the gene. The Taxonomy tab groups the matches by organism. In our search, nearly all the records come from Escherichia coli, with one Escherichia fergusonii record and one Shigella flexneri record among the 100 rows.
10:26 Checking the identification with the 16S database
Last, with the tabs covered, we will decide which organism the query came from and how far the results support that answer. The columns measure different things, so we read them together. For example, a very small E value with a query cover of only 20 percent means a real match that covers one fifth of the query, while the other 80 percent found no match in that record. In our search, nearly all 100 rows were Escherichia coli, with identities close to 100 percent. Because Max target sequences was 100, the list stopped before it reached most relatives outside Escherichia coli, and these results cannot show how much closer the query is to Escherichia coli than to its relatives. Errors in the records add a further problem. Some GenBank entries hold DNA from a different organism than the one named, and a 2020 survey found more than two million contaminated entries in GenBank. A curated database avoids both problems. Each named bacterial species has a type strain, the reference strain for that species, and NCBI keeps a database of checked 16S sequences taken from type strains only. With one strain for each species, related species from other genera reach the top of the list. To search this database, we select rRNA/ITS databases under Choose Search Set, keep 16S ribosomal RNA sequences from Bacteria and Archaea, and click BLAST again. Against this database, the top match is Shigella flexneri at 99.63 percent identity. Escherichia fergusonii, Shigella sonnei and Shigella dysenteriae follow at 99.50 percent, and the Escherichia coli type strain comes fifth at 99.38 percent. The first species from outside Escherichia and Shigella, Pseudescherichia vulneris, appears ninth at 98.88 percent. A widely used guideline from 2014 places the boundary between two bacterial species at about 98.65 percent identity across the 16S gene. By that guideline, all nine records at the top of the list lie above the boundary, so this 800-base fragment cannot name a single species. Pseudescherichia vulneris sits only just above the boundary and well below the Escherichia and Shigella species, so it is a much weaker candidate. Escherichia coli and the Shigella species, on the other hand, have almost identical 16S genes. A 16S result therefore supports an identification only as Escherichia or Shigella, and other tests are needed to separate the two. Both searches point to the Escherichia and Shigella group, which agrees with the Escherichia coli record the query came from.
13:17 Review and question
Here is a short review of the main points. The choice of BLAST program depends on whether the query and the database hold DNA or protein. For a close match to a DNA query, Nucleotide BLAST with megablast and core nt is the standard starting point. On the results page, Max Score and E value describe how strong a match is, and query cover and percent identity show how much of the query matched and how closely. A species name taken from the top row needs support from the rows underneath and, for bacteria, from a search of the 16S type-strain database. Here is a question to test the main ideas of this lesson. A 16S read from an unknown bacterium gives a top row with a query cover of 100 percent and an identity of 97 percent. What does this row suggest about the bacterium? Pause here and try the question before the answer appears. The whole read aligns, but 97 percent lies below the guideline of 98.65 percent. The bacterium probably belongs to a different species from the top record, possibly a species with no 16S sequence in the database yet. When a thesis or a paper reports a BLAST result, the report should state the program, the database, the date of the search and the accession of the match. The databases keep growing, and a year later the same search can return different rows.