Bio::Search::Result ResultI
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::Search::Result::ResultI - Abstract interface to Search Result objects
Package variables
No package variables defined.
Included modules
Bio::AnalysisResultI
Inherit
Bio::AnalysisResultI
Synopsis
# Bio::Search::Result::ResultI objects cannot be instantiated since this
# module defines a pure interface.
# Given an object that implements the Bio::Search::Result::ResultI interface,
# you can do the following things with it:
    use Bio::SearchIO;
my $io = new Bio::SearchIO(-format => 'blast',
-file => 't/data/HUMBETGLOA.tblastx');
my $result = $io->next_result;
while( $hit = $result->next_hit()) { # enter code here for hit processing
}
my $id = $result->query_name(); my $desc = $result->query_description(); my $dbname = $result->database_name(); my $size = $result->database_letters(); my $num_entries = $result->database_entries(); my $gap_ext = $result->get_parameter('gapext'); my @params = $result->available_parameters; my $kappa = $result->get_statistic('kappa'); my @statnames = $result->available_statistics;
Description
Bio::Search::Result::ResultI objects are data structures containing
the results from the execution of a search algorithm. As such, it may
contain various algorithm specific information as well as details of
the execution, but will contain a few fundamental elements, including
the ability to return Bio::Search::Hit::HitI objects.
Methods
algorithmDescriptionCode
algorithm_referenceDescriptionCode
algorithm_versionDescriptionCode
available_parametersDescriptionCode
available_statisticsDescriptionCode
database_entriesDescriptionCode
database_lettersDescriptionCode
database_nameDescriptionCode
get_parameterDescriptionCode
get_statisticDescriptionCode
hitsDescriptionCode
iterationsDescriptionCode
next_hitDescriptionCode
no_hits_foundDescriptionCode
num_hitsDescriptionCode
psiblastDescriptionCode
query_accessionDescriptionCode
query_descriptionDescriptionCode
query_lengthDescriptionCode
query_nameDescriptionCode
set_no_hits_foundDescriptionCode
Methods description
algorithmcode    nextTop
 Title   : algorithm
Usage : my $r_type = $result->algorithm
Function: Obtain the name of the algorithm used to obtain the Result
Returns : string (e.g., BLASTP)
Args : [optional] scalar string to set value
algorithm_referencecodeprevnextTop
 Title   : algorithm_reference
Usage : $obj->algorithm_reference($newval)
Function:
Returns : value of the literature reference for the algorithm
Args : newvalue (optional)
Comments: The default implementation in ResultI returns an empty string
rather than throwing a NotImplemented exception, since
the ref may not always be available and is not critical.
algorithm_versioncodeprevnextTop
 Title   : algorithm_version
Usage : my $r_version = $result->algorithm_version
Function: Obtain the version of the algorithm used to obtain the Result
Returns : string (e.g., 2.1.2)
Args : [optional] scalar string to set algorithm version value
available_parameterscodeprevnextTop
 Title   : available_parameters
Usage : my @params = $result->available_parameters
Function: Returns the names of the available parameters
Returns : Return list of available parameters used for this result
Args : none
available_statisticscodeprevnextTop
 Title   : available_statistics
Usage : my @statnames = $result->available_statistics
Function: Returns the names of the available statistics
Returns : Return list of available statistics used for this result
Args : none
database_entriescodeprevnextTop
 Title   : database_entries
Usage : $num_entries = $result->database_entries()
Function: Used to obtain the number of entries contained in the database.
Returns : a scalar integer representing the number of entities in the database
or undef if the information was not available.
Args : none
database_letterscodeprevnextTop
 Title   : database_letters
Usage : $size = $result->database_letters()
Function: Used to obtain the size of database that was searched against.
Returns : a scalar integer (units specific to algorithm, but probably the
total number of residues in the database, if available) or undef if
the information was not available to the Processor object.
Args : none
database_namecodeprevnextTop
 Title   : database_name
Usage : $name = $result->database_name()
Function: Used to obtain the name of the database that the query was searched
against by the algorithm.
Returns : a scalar string
Args : none
get_parametercodeprevnextTop
 Title   : get_parameter
Usage : my $gap_ext = $result->get_parameter('gapext')
Function: Returns the value for a specific parameter used
when running this result
Returns : string
Args : name of parameter (string)
get_statisticcodeprevnextTop
 Title   : get_statistic
Usage : my $gap_ext = $result->get_statistic('kappa')
Function: Returns the value for a specific statistic available
from this result
Returns : string
Args : name of statistic (string)
hitscodeprevnextTop
 Title   : hits
Usage : my @hits = $result->hits
Function: Returns the available hits for this Result
Returns : Array of Bio::Search::Hit::HitI objects
Args : none
iterationscodeprevnextTop
 Usage     : $num_iterations = $blast->iterations;  (get)
$blast->iterations($num_iterations); (set)
Purpose : Set/get the number of iterations in the Blast Report (PSI-BLAST).
Returns : Total number of iterations in the report
Argument : integer (when setting)
next_hitcodeprevnextTop
 Title   : next_hit
Usage : while( $hit = $result->next_hit()) { ... }
Function: Returns the next available Hit object, representing potential
matches between the query and various entities from the database.
Returns : a Bio::Search::Hit::HitI object or undef if there are no more.
Args : none
no_hits_foundcodeprevnextTop
 Usage     : $nohits = $blast->no_hits_found( [iteration_number] ); 
Purpose : Get boolean indicator indicating whether or not any hits
were present in the report.
This is NOT the same as determining the number of hits via the hits() method, which will return zero hits if there were no hits in the report or if all hits were filtered out during the parse. Thus, this method can be used to distinguish these possibilities for hitless reports generated when filtering. Returns : Boolean Argument : (optional) integer indicating the iteration number (PSI-BLAST) If iteration number is not specified and this is a PSI-BLAST result, then this method will return true only if all iterations had no hits found.
num_hitscodeprevnextTop
 Title   : num_hits
Usage : my $hitcount= $result->num_hits
Function: returns the number of hits for this query result
Returns : integer
Args : none
psiblastcodeprevnextTop
 Usage     : if( $blast->psiblast ) { ... }
Purpose : Set/get a boolean indicator whether or not the report
is a PSI-BLAST report.
Returns : 1 if PSI-BLAST, undef if not.
Argument : 1 (when setting)
query_accessioncodeprevnextTop
 Title   : query_accession
Usage : $id = $result->query_accession();
Function: Get the accession (if available) for the query sequence
Returns : a string
Args : none
query_descriptioncodeprevnextTop
 Title   : query_description
Usage : $id = $result->query_description();
Function: Get the description of the query sequence
used in the search.
Returns : a string
Args : none
query_lengthcodeprevnextTop
 Title   : query_length
Usage : $id = $result->query_length();
Function: Get the length of the query sequence
used in the search.
Returns : a number
Args : none
query_namecodeprevnextTop
 Title   : query_name
Usage : $id = $result->query_name();
Function: Get the string identifier of the query used by the
algorithm that performed the search.
Returns : a string.
Args : none
set_no_hits_foundcodeprevnextTop
 Usage     : $blast->set_no_hits_found( [iteration_number] ); 
Purpose : Set boolean indicator indicating whether or not any hits
were present in the report.
Returns : n/a
Argument : (optional) integer indicating the iteration number (PSI-BLAST)
Methods code
algorithmdescriptionprevnextTop
sub algorithm {
   my ($self) = @_;
   $self->throw_not_implemented();
}
algorithm_referencedescriptionprevnextTop
sub algorithm_reference {
   my ($self) = @_;
   return '';
}
algorithm_versiondescriptionprevnextTop
sub algorithm_version {
   my ($self) = @_;
   $self->throw_not_implemented();
}
available_parametersdescriptionprevnextTop
sub available_parameters {
   my ($self) = @_;
   $self->throw_not_implemented();
}
available_statisticsdescriptionprevnextTop
sub available_statistics {
   my ($self) = @_;
   $self->throw_not_implemented();
}
database_entriesdescriptionprevnextTop
sub database_entries {
    my ($self,@args) = @_;

    $self->throw_not_implemented();
}
database_lettersdescriptionprevnextTop
sub database_letters {
    my ($self,@args) = @_;
    $self->throw_not_implemented();
}
database_namedescriptionprevnextTop
sub database_name {
    my ($self,@args) = @_;

    $self->throw_not_implemented;
}
get_parameterdescriptionprevnextTop
sub get_parameter {
   my ($self,@args) = @_;
   $self->throw_not_implemented();
}
get_statisticdescriptionprevnextTop
sub get_statistic {
   my ($self,@args) = @_;
   $self->throw_not_implemented();
}
hitsdescriptionprevnextTop
sub hits {
   my ($self,@args) = @_;
   $self->throw_not_implemented();
}
iterationsdescriptionprevnextTop
sub iterations {
 shift->throw_not_implemented
}
next_hitdescriptionprevnextTop
sub next_hit {
    my ($self,@args) = @_;
    $self->throw_not_implemented;
}
no_hits_founddescriptionprevnextTop
sub no_hits_found {
 shift->throw_not_implemented
}
num_hitsdescriptionprevnextTop
sub num_hits {
   my ($self,@args) = @_;
   $self->throw_not_implemented();
}
psiblastdescriptionprevnextTop
sub psiblast {
 shift->throw_not_implemented
}
query_accessiondescriptionprevnextTop
sub query_accession {
    my ($self,@args) = @_;
    $self->throw_not_implemented;
}
query_descriptiondescriptionprevnextTop
sub query_description {
    my ($self,@args) = @_;
    $self->throw_not_implemented;
}
query_lengthdescriptionprevnextTop
sub query_length {
    my ($self,@args) = @_;
    $self->throw_not_implemented;
}
query_namedescriptionprevnextTop
sub query_name {
    my ($self,@args) = @_;
    $self->throw_not_implemented;
}
set_no_hits_founddescriptionprevnextTop
sub set_no_hits_found {
 shift->throw_not_implemented
}
General documentation
FEEDBACKTop
Mailing ListsTop
User feedback is an integral part of the evolution of this
and other Bioperl modules. Send your comments and suggestions preferably
to one of the Bioperl mailing lists.
Your participation is much appreciated.
  bioperl-l@bioperl.org              - General discussion
http://bio.perl.org/MailList.html - About the mailing lists
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution.
Bug reports can be submitted via email or the web:
  bioperl-bugs@bio.perl.org
http://bugzilla.bioperl.org/
AUTHOR Top
Aaron Mackey <amackey@virginia.edu> (original author)
Steve Chervitz <sac@bioperl.org>
See the FEEDBACK section for where to send bug reports and comments.
COPYRIGHTTop
Copyright (c) 1999-2001 Aaron Mackey, Steve Chervitz. All Rights Reserved.
DISCLAIMERTop
This software is provided "as is" without warranty of any kind.
APPENDIXTop
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _