
This is the Title of the Book, eMatter Edition
Copyright © 2012 O’Reilly & Associates, Inc. All rights reserved.
305
Appendix D
APPENDIX D
blast-imager.pl
blast-imager.pl creates a graphical summary of a BLAST report using Thomas Bou-
tell’s GD graphics library (http://www.boutell.com/gd), which has been ported to Perl
by Lincoln Stein (http://stein.cshl.org/WWW/software/GD). The latest versions sup-
port PNG or JPEG format, but not GIF. Depending on which GD installation you
have, you may want to edit the output section in the program. Just toggle the com-
ments from one output to another.
To use the blast-imager.pl program, the data must be in NCBI tabular format (
-m 8)
as described in Appendix A. Appendix E presents a program for converting standard
BLAST output to tabular format. The simplest way to use blast-imager.pl is to have it
read an entire BLAST report (but not concatenated BLAST reports).
blast-imager.pl blast_table > blast.gif
In Figure D-1, a Takifugu rubripes genomic sequence (AY016024.1) containing an
alpha globin gene cluster was used to search the nr protein database. The output of
the BLASTX report was converted to tabular format with blast2table.pl in the region
of 34,000 to 35,000.
blast2table.pl -m 34000 -n 35000 report | blast-imager.pl > fugu.gif
Database matches and alignments are shown in the order they appear in the report.
Only the best alignments are color-coded (the