This is an old revision of the document!
Comparing genes and genomes using bioinformatics
The BLAST general program BLAST and its specialized derivative programs (Primer-BLAST, conserved domains, vector contamination, Align two sequences, Global Sequence Alignment Tool, WGS sequences) may be the most widely used tools in bioinformatics. The BLAST algorithm 1) is optimized for speed and is used to search protein and DNA databases for sequence similarities.
Useful knowledge about BLAST
Access BLAST through the internet or standalone on your computer
The National Center for Biotechnology Information (NCBI) offers a web interface to search by BLAST within its exhaustive databases for sequences that could be similar to the user’s query sequence.
The BLAST program can also be installed on a personal computer, rather be accessed through the internet. This is necessary when one wishes to search the similarity of its query sequence to a set of sequences (the database) that are not yet included in GenBank or any other public sequence databases (DDBJ, EMBL). The BLAST programs to install on a personal computer (standalone) available at the NCBI Blast and from BlastStation. On February 2011, the current version was ncbi-blast-2.2.24. A pages from NCBI is useful to setup of Command Line BLAST.
Batch blast
Whether you access the BLAST through NCBI website or from your personal computer, you may compare multiple query sequences at a time, in a Batch blast. In that case, the resulting BLAST output file will be very long. You can save the output file in various format, .txt .xml .csv for instance.
Glossary
- Query: The sequence a user wants to get more information about
- Database: a large set of sequences the query is compared to
- e-value: Is a number to assess how a similarity is likely to arise by chance. It involves a model of random sequences. The lower the number the less likely the similarity occurred by chance. The NCBI Blast tutorial explains: “Expect value. The E-value is a parameter that describes the number of hits one can “expect” to see by chance when searching a database of a particular size. It decreases exponentially with the score (S) that is assigned to a match between two sequences. Essentially, the E-value describes the random background noise that exists for matches between sequences. For example, an E-value of 1 assigned to a hit can be interpreted as meaning that in a database of the current size, one might expect to see one match with a similar score simply by chance. This means that the lower the E-value, or the closer it is to “0”, the higher is the “significance” of the match. However, it is important to note that searches with short sequences can be virtually identical and have relatively high E-value. This is because the calculation of the E-value also takes into account the length of the query sequence. This is because shorter sequences have a high probability of occurring in the database purely by chance.“ Find more information, on the NCBI online books.
- HSP: high-scoring segment pairs; all segment pairs whose scores can not be improved by extension or trimming
- Identities = Proportion of identical residues between the query and the hit from database,
- More terms are defined in the NCBI Blast Handbook and in the general NCBI glossary
Sequence searches at the QCBS
In January 2011, Annie Archambault (research professional at the QCBS) and Christopher Cameron (professor at Université de Montréal) set up a sequence similarity between 451 spicule matrix proteins from the sea urchin (Strongylocentrotus purpuratus, an echinoderm) that are involved in biomineralization 2) and the genome of Saccoglossus kowlevskii (a hemichordate that forms biominerals) and Ciona (a hemichordate that do not form biominerals).
That the Saccoglossus genome is partially sequenced, but not available from GenBank and requires to run the BLAST algorithm locally (standalone) represents a challenge. Another challenge resides in organizing the BLAST output, and then in organizing the large number of searches results (451 similarity searches for each sea urchin protein sequences) into functional categories.
Parsing the Blast output file
The output file from the 451 sequences was too large to be easily understood. We developed a small script in R to parse the blast output file, and kept only the best match: the one hit that has the minimum e-value, for each query sequence. The Blast parser in R for tab delimited blast result files is available here, and was inspired by a forum post.
Method Here are the steps to quickly parse that large file
- Save your blast result in tab delimited format
- Install the R package on you computer from the R homepage, see our Wiki section on R for more resources.
- When installing on a Mac, you need to install beforehand a GNU Fortran compiler (that you can find on the R tools page) and XCode, which you can find on your original installation CD or online at Mac Developers tools.
- Make a folder that will include your blast output file and the R script
- In a terminal, go to the directory where are the two files
- Run the script by typing:
Rscript unique_lowest_Evalue.R <inputfile> <outputfile>
where you will type the name of your blast result file instead of <inputfile>, and you will type a name you wish for you output file instead of <outputfile>
Warnings:
- Make sure the number and the order of arguments are correct because an existing file will be overwritten if given the same name as your new output file.
- That script currently does not keep the headings of the columns, any improvement is welcome.
