NAME
Bio::Search::Result::ResultI - Abstract interface to Search Result objects
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 = Bio::SearchIO->new(-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.
FEEDBACK
Mailing Lists
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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR
Aaron Mackey <[email protected]> (original author)
Steve Chervitz <[email protected]>
See the FEEDBACK section for where to send bug reports and comments.
COPYRIGHT
Copyright (c) 1999-2001 Aaron Mackey, Steve Chervitz. All Rights Reserved.
DISCLAIMER
This software is provided "as is" without warranty of any kind.
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
next_hit
Title : next_hitUsage : while( $hit = $result->next_hit()) { ... }Function: Returns the next available Hit object, representing potentialmatches 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
sort_hits
Title : sort_hitsUsage : $result->sort_hits(\&sort_function)Function : Sorts the available hit objects by a user-supplied function. Defaults to sortby descending score.Returns : n/aArgs : A coderef for the sort function. See the documentation on the Perl sort()function for guidelines on writing sort functions.Note : To access the special variables $a and $b used by the Perl sort() functionthe user function must access Bio::Search::Result::ResultI namespace.For example, use :$result->sort_hits( sub{$Bio::Search::Result::ResultI::a->length <=>$Bio::Search::Result::ResultI::b->length});NOT $result->sort_hits($a->length <=>$b->length);
_default sort_hits
Title : _default_sort_hitsUsage : Do not call directly.Function: Sort hits in descending order by scoreArgs : NoneReturns: 1 on successNote : Used by $result->sort_hits()
query_name
Title : query_nameUsage : $id = $result->query_name();Function: Get the string identifier of the query used by thealgorithm that performed the search.Returns : a string.Args : none
query_accession
Title : query_accessionUsage : $id = $result->query_accession();Function: Get the accession (if available) for the query sequenceReturns : a stringArgs : none
query_length
Title : query_lengthUsage : $id = $result->query_length();Function: Get the length of the query sequenceused in the search.Returns : a numberArgs : none
query_description
Title : query_descriptionUsage : $id = $result->query_description();Function: Get the description of the query sequenceused in the search.Returns : a stringArgs : none
database_name
Title : database_nameUsage : $name = $result->database_name()Function: Used to obtain the name of the database that the query was searchedagainst by the algorithm.Returns : a scalar stringArgs : none
database_letters
Title : database_lettersUsage : $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 thetotal number of residues in the database, if available) or undef ifthe information was not available to the Processor object.Args : none
database_entries
Title : database_entriesUsage : $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 databaseor undef if the information was not available.Args : none
get_parameter
Title : get_parameterUsage : my $gap_ext = $result->get_parameter('gapext')Function: Returns the value for a specific parameter usedwhen running this resultReturns : stringArgs : name of parameter (string)
available_parameters
Title : available_parametersUsage : my @params = $result->available_parametersFunction: Returns the names of the available parametersReturns : Return list of available parameters used for this resultArgs : none
get_statistic
Title : get_statisticUsage : my $gap_ext = $result->get_statistic('kappa')Function: Returns the value for a specific statistic availablefrom this resultReturns : stringArgs : name of statistic (string)
available_statistics
Title : available_statisticsUsage : my @statnames = $result->available_statisticsFunction: Returns the names of the available statisticsReturns : Return list of available statistics used for this resultArgs : none
algorithm
Title : algorithmUsage : my $r_type = $result->algorithmFunction: Obtain the name of the algorithm used to obtain the ResultReturns : string (e.g., BLASTP)Args : [optional] scalar string to set value
algorithm_version
Title : algorithm_versionUsage : my $r_version = $result->algorithm_versionFunction: Obtain the version of the algorithm used to obtain the ResultReturns : string (e.g., 2.1.2)Args : [optional] scalar string to set algorithm version value
algorithm_reference
Title : algorithm_referenceUsage : $obj->algorithm_reference($newval)Function:Returns : value of the literature reference for the algorithmArgs : newvalue (optional)Comments: The default implementation in ResultI returns an empty stringrather than throwing a NotImplemented exception, sincethe ref may not always be available and is not critical.
rid
Title : ridUsage : $obj->rid($newval)Function:Returns : value of the BLAST Request ID (eg. RID: ZABJ4EA7014)Args : newvalue (optional)Comments: The default implementation in ResultI returns an empty stringrather than throwing a NotImplemented exception, sincethe RID may not always be available and is not critical.See: (1) https://www.ncbi.nlm.nih.gov/Class/MLACourse/Modules/BLAST/rid.html(2) https://www.ncbi.nlm.nih.gov/staff/tao/URLAPI/new/node63.html
num_hits
Title : num_hitsUsage : my $hitcount= $result->num_hitsFunction: returns the number of hits for this query resultReturns : integerArgs : none
hits
Title : hitsUsage : my @hits = $result->hitsFunction: Returns the HitI objects contained within this ResultReturns : Array of Bio::Search::Hit::HitI objectsArgs : none
See Also: Bio::Search::Hit::HitI
no_hits_found
Usage : $nohits = $blast->no_hits_found();Purpose : Get boolean indicator indicating whether or not any hitswere present in the report.This is NOT the same as determining the number of hits viathe hits() method, which will return zero hits if there were nohits in the report or if all hits were filtered out during the parse.Thus, this method can be used to distinguish these possibilitiesfor hitless reports generated when filtering.Returns : BooleanArgument : none
set_no_hits_found
Usage : $blast->set_no_hits_found();Purpose : Set boolean indicator indicating whether or not any hitswere present in the report.Returns : n/aArgument : none