[Bioperl-l] testing for valid return from HTMLResultWriter

Charles Hauser chauser at duke.edu
Tue Jul 22 20:32:06 EDT 2003


J,


I added the return '' if line to HTMLResultWriter to abort if cutoffs not met:

    while( my $hit = $result->next_hit ) {
	next if( $hitfilter && ! &{$hitfilter}($hit) );
	my @hsps = $hit->hsps;
	return '' if (($hsps[0]->length < 100) && ($hsps[0]->percent_identity < 40));



In the script I have something looking like:


while( my $result = $parser->next_result ) {
	$writer->write_result($result) unless ??????;
}

Before writing the file ($writer) I want to test that I returned data
(don't want to print blank reports).

How would I test that I did not return ''?

C



More information about the Bioperl-l mailing list