[Bioperl-l] filtering output from HTMLResultWriter

Jason Stajich jason at cgt.duhs.duke.edu
Tue Jul 29 21:21:57 EDT 2003


On Tue, 29 Jul 2003, Charles Hauser wrote:

> Novice question here,
>
> I'd like to spew out html pgs from blast results, but want to impose a
> couple of cutoff criteria using:
> 	- $hsp->length >  xxx
> 	- $hsp->percent_identity > yyyy
>
> HTMLResultWriter method to_string has:
> 	my @hsps = $hit->hsps;
>
>
> the docs for HTMLResultWriter suggest:
>
> 	$writer->filter('hsp', \&hsp_filter);
>
> I am not clear on how to implement this.
>
>
> ?
> my $writer = new Bio::SearchIO::Writer::HTMLResultWriter( length,%id );
>
> $writer->filter('hsp', \&hsp_filter);
>
 my $MinLen = 100;
 my $MinPID = 70.00;
 sub hsp_filter {
    my $hsp = shift
   return 0 if $hsp->length < $MinLen || $hsp->percent_identity < $MinPID;
   return 1;
}
>
>
> }
>
>
>
> Charles
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list