
This is the Title of the Book, eMatter Edition
Copyright © 2012 O’Reilly & Associates, Inc. All rights reserved.
309
Appendix E
APPENDIX E
blast2table.pl
It’s often useful to have both the standard report and tabular data for the same
search. This program converts standard WU-BLAST or NCBI-BLAST output to the
NCBI tabular format (
-m 8) described in Appendix A. It supports concatenated
BLAST reports and is more efficient than most full-featured BLAST parsers.
blast2table.pl can be used either on a file or in a pipe:
blast2table.pl my_blast_output > my_table_output
blastp nr query | blast2table.pl > table_from_wu-blast
The Unix tee program can create both the standard output and a table at the same
time:
blastall -p blastp -d nr -i query | tee standard | blast2table.pl > table
blast2table.pl also has a few useful filtering options (see Table E-1). The following
command displays only those with an alignment of over 50 percent identity and with
a bit score greater than 20:
blast2table.pl -p 50 -b 20 blast_output
The complete program is listed next and may be downloaded as blast2table.pl from
this book’s web site.
#!/usr/bin/perl -w
use strict;
use Getopt::Std;
Table E-1. blast2table.pl options
Option Description
-b Minimum number of bits for each alignment
-e Maximum E-value for each alignment or alignment group
-m Minimum coordinate of the query sequence
-n Maximum coordinate of the query sequence
-p Minimum percent ...