Bio::FastParsers::Blast::Table - Front-end class for tabular BLAST parser
version 0.221230
use aliased 'Bio::FastParsers::Blast::Table'; # open and parse BLAST report in tabular format my $infile = 'test/blastp.m9'; my $report = Table->new( file => $infile ); # loop through hsps while (my $hsp = $report->next_hsp) { my ($hit_id, $evalue) = ($hsp->hit_id, $hsp->evalue); # ... } # ... my $infile = 'test/multiquery-blastp.m9'; my $report = Table->new( file => $infile ); # loop through first hits for each query while (my $first_hit = $report->next_query) { my ($hit_id, $evalue) = ($hsp->hit_id, $hsp->evalue); # ... }
This module implements a parser for the standard tabular output format of the BLAST program (e.g., -outfmt 7). It provides methods for iterating over queries, hits and HSPs (e.g., next_hsp). Individual HSPs can then be queried using methods described in Bio::FastParsers::Blast::Table::Hsp.
-outfmt 7
next_hsp
Path to BLAST report file in tabular format (m8/m9 or now 6/7) to be parsed
Shifts the first HSP of the report off and returns it, shortening the report by 1 and moving everything down. If there are no more HSPs in the report, returns undef.
undef
# $report is a Bio::FastParsers::Blast::Table while (my $hsp = $report->next_hsp) { # process $hsp # ... }
This method does not accept any arguments.
Directly returns the first HSP of the next hit, skipping any remaining HSPs for the current hit in the process. If there are no more hits in the report, returns undef. Useful for processing only the first HSP of each hit.
# $report is a Bio::FastParsers::Blast::Table while (my $first_hsp = $report->next_hit) { # process $first_hsp # ... }
Directly returns the first HSP of the next query, skipping any remaining HSPs for the current query in the process. If there are no more queries in the report, returns undef. Useful for processing only the first hit of each query.
# $report is a Bio::FastParsers::Blast::Table while (my $first_hit = $report->next_query) { # process $first_hit # ... }
Denis BAURAIN <denis.baurain@uliege.be>
This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Bio::FastParsers, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::FastParsers
CPAN shell
perl -MCPAN -e shell install Bio::FastParsers
For more information on module installation, please visit the detailed CPAN module installation guide.