NAME¶
Zerg::Report - get attributes from a BLAST file in a data structure
SYNOPSIS¶
use Zerg::Report;
my $zerg_report = new Zerg::Report("output.blastn");
while($r=$zerg_report->getReport())
{
foreach my $hit (@{$r->{hits}})
{
foreach my $hsp (@{$hit->{hsps}})
{
print "$r->{query_name} $hit->{subject_name} $hsp->{score_bits}\n";
}
}
}
$zerg_report->closeFile();
DESCRIPTION¶
Zerg::Report uses Zerg to parse a file - or STDIN if file is not given -
containing one or multiple BLAST reports and, for each report, stores
the obtained fields in a data structure made of arrays and hashes.
Please consult the Zerg man page to see which fields are extracted.
The method getReport() reads a BLAST report from the input file and
returns a reference to a data structure like the one in the example
below. When no report is found, it returns undef. It dies from
syntax errors in BLAST reports with a stack backtrace.
Example of a data structure returned by getReport():
$r = {
'query_name' => 'ME1-0081T-R227-B12-U.G',
'blast_version' => 'BLASTX 1.3.6 [2002-03-05]',
'byte_offset' => 4981,
'query_length' => '444',
'query_annotation' => ''
'round_begins' => [ 0, 129, 201 ], # indicates the first hit in each round of iterated blast
'hits' => [
{
'subject_annotation' => '(NC_003210) similar to cation (calcium) transporting ATPase [Listeria monocytogenes EGD-e]',
'hsps' => [
{
'query_end' => '82',
'subject_ali' => 'ASELEIFAALIECEA-GSTDYDGMLAVASVVMNRVNHRYYPDTITGVIYQSGQFSPVASGKLDKVLKRGIKSSCLEVAKDA',
'query_ali' => 'DAQTRKLAAIAYGEASGANDANEIGGIAWAVANRARAWGGK-TVDGLLAADPNYTYAVKDG-NQRYAKLMKATEAAIAADP',
'subject_end' => '328',
'identities' => '15',
'score' => '87',
'percent_positives' => '41',
'gaps' => '3',
'score_bits' => '37.9',
'alignment_length' => '81',
'evalue' => '0.40',
'percent_identities' => '18',
'positives' => '34',
'query_start' => '4',
'subject_start' => '249'
}
],
'subject_length' => '880',
'subject_name' => 'gi|16802882|ref|NP_464367.1|'
},
],
};
AUTHORS¶
Apua~ Paquola <apua@iq.usp.br>, Abimael Machado <abimael@iq.usp.br>
IQ-USP Bioinformatics Lab
Laszlo Kajan <lkajan@rostlab.org>, Technical University of Munich, Germany
SEE ALSO¶
Zerg
POD ERRORS¶
Hey!
The above document had some coding errors, which are explained
below:
- Around line 287:
- Non-ASCII character seen before =encoding in 'Apua~'. Assuming
ISO8859-1