Content-type: text/html

Report

Section: User Contributed Perl Documentation (3pm)
Updated: 2005-01-10
Index Return to Main Contents
 

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 containing 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 false. It dies from
  syntax errors in BLAST reports.

   $r = {
          'byte_offset' => '0',
          'query_name' => 'C200205.1',
          'query_length' => '364',
          'query_annotation' => 'EST contig 200205'
          'hits' => [
                      {
                        'subject_name' => 'gi|19067878|gb|AY027869.1|',
                        'subject_length' => '3921',
                        'subject_annotation' => 'Schistosoma japonicum retrotransposon SjR2 polyprotein gene, complete cds'
                        'hsps' => [
                                    {
                                      'score' => '54',
                                      'score_bits' => '107',
                                      'evalue' => '4e-25',
                                      'alignment_length' => '166',
                                      'gaps' => '1'
                                      'identities' => '139',
                                      'percent_identities' => '83',
                                      'query_end' => '364',
                                      'query_orientation' => 'Plus',
                                      'query_start' => '199',
                                      'subject_end' => '1896',
                                      'subject_orientation' => 'Minus',
                                      'subject_start' => '2060',
                                    }
                                  ],
                      }
                    ],
        };

 

AUTHORS

Apuã Paquola <apua@iq.usp.br>, Abimael Machado <abimael@iq.usp.br> IQ-USP Bioinformatics Lab  

SEE ALSO

Zerg


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHORS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 23:43:06 GMT, January 10, 2005