Report(3pm)

πŸ’– Report(3pm) πŸ’–

okay so bestie, welcome to Report(3pm) β€” the manual page for Zerg::Report β€” and lowkey it's the cutest way to get your BLAST results out of a file and into a data structure. no cap. let's go. πŸ¦‹


✨ NAME ✨

Zerg::Report β€” get attributes from a BLAST file in a data structure. that's the whole assignment, periodt. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's the vibe, in code form:

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();

so you make the object, you keep asking it for reports while it still has reports to give you, you walk down through hits and then through each hit's hsps, and you print literally whatever fields you're obsessed with. then you closeFile(). that's it, that's the whole main character arc. 🌟


πŸ’œ DESCRIPTION πŸ’œ

Zerg::Report uses Zerg to parse a file β€” or STDIN if no file is given β€” containing one or multiple BLAST reports and, for each report, stores the obtained fields in a data structure made of arrays and hashes. so if you're the kind of girlie who pipes things around, it's got you. 🫢

πŸ’Œ please consult the Zerg man page to see which fields are extracted. i'm not making that up, the page literally tells you to go there. iykyk.

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. and if there's a syntax error in a BLAST report? it dies with a stack backtrace. not a soft little goodbye, a full dramatic exit. πŸ’€

🌸 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|'
                    },
                  ],
      };

okay so the tea β˜• β€” top level you got the report-y stuff: query_name, blast_version, byte_offset, query_length, query_annotation, and round_begins (which is literally the first hit in each round of iterated blast, and the comment in the code says so too πŸ“). then hits is an array, and each hit brings subject_annotation, subject_length, subject_name, plus its own hsps array. and each hsp in there is stacked with query_end, subject_ali, query_ali, subject_end, identities, score, percent_positives, gaps, score_bits, alignment_length, evalue, percent_identities, positives, query_start and subject_start. it's giving ✨rich inner life✨. don't @ me.


πŸ‘‘ AUTHORS πŸ‘‘

these are the icons who built it:

  • ApuοΏ½ 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 β€” go read it, the locals are lovely. πŸ’–

and that's a wrap, bestie! πŸŽ€ this lil beauty is perl v5.42.3, dated 2026-08-19, and you found it under Report(3pm). go parse something iconic. πŸ’…βœ¨

πŸ“¦ where this page comes from