Bio::SearchIO SearchWriterI
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::SearchIO::SearchWriterI - Interface for outputting parsed Search results
Package variables
No package variables defined.
Included modules
Bio::Root::RootI
Inherit
Bio::Root::RootI
Synopsis
Bio::SearchIO::SearchWriterI objects cannot be instantiated since this
module defines a pure interface.
Given an object that implements the Bio::SearchIO::SearchWriterI interface,
you can do the following things with it:
    print $writer->to_string( $result_obj, @args );
Description
This module defines abstract methods that all subclasses must implement
to be used for outputting results from Bio::Search::Result::ResultI
objects.
Methods
end_reportDescriptionCode
filterDescriptionCode
to_stringDescriptionCode
Methods description
end_reportcode    nextTop
 Title   : end_report
Usage : $self->end_report()
Function: The method to call when ending a report, this is
mostly for cleanup for formats which require you to
have something at the end of the document (</BODY></HTML>)
for HTML
Returns : string
Args : none
filtercodeprevnextTop
 Title   : filter
Usage : $writer->filter('hsp', \&hsp_filter);
Function: Filter out either at HSP,Hit,or Result level
Returns : none
Args : string => data type,
CODE reference
to_stringcodeprevnextTop
 Purpose   : Produces data for each Search::Result::ResultI in a string.
: This is an abstract method. For some useful implementations,
: see ResultTableWriter.pm, HitTableWriter.pm,
: and HSPTableWriter.pm.
Usage : print $writer->to_string( $result_obj, @args );
Argument : $result_obj = A Bio::Search::Result::ResultI object
: @args = any additional arguments used by your implementation.
Returns : String containing data for each search Result or any of its
: sub-objects (Hits and HSPs).
Throws : n/a
Methods code
end_reportdescriptionprevnextTop
sub end_report {
     my $self = shift;
    return '';
}
filterdescriptionprevnextTop
sub filter {
    my ($self,$method,$code) = @_;    
    return undef unless $method;
    $method = uc($method);
    if( $method ne 'HSP' &&
	$method ne 'HIT' &&
	$method ne 'RESULT' ) {
	$self->warn("Unknown method $method");
	return undef;
    }
    if( $code )  {
	$self->throw("Must provide a valid code reference") unless ref($code) =~ /CODE/;
	$self->{$method} = $code;
    }
    return $self->{$method};
}

1;
}
to_stringdescriptionprevnextTop
sub to_string {
    my ($self, $result, @args) = @_;
    $self->throw_not_implemented;
}
General documentation
AUTHORTop
Steve Chervitz <sac@bioperl.org>
DISCLAIMERTop
This software is provided "as is" without warranty of any kind.
APPENDIXTop
The rest of the documentation details each of the object methods.