[Bioperl-l] Alignment Blast parser

Will Spooner whs at sanger.ac.uk
Fri Jan 23 09:53:42 EST 2004


Hi Jason,

Having looked at the code, it does seem sensible to split the
TextResultWriter->to_string method into component parts. This would allow
users like me, with detached HSPI objects kicking about, to reuse the
writer code, e.g:

  my $writer = Bio::SearchIO::Writer::TextResultWriter->new();
  my $hsp = Bio::Search::HSP::MyHSP->new(-id=>'foo');
  print $writer->hsp_alignment_string( $hsp );

This approach would also allow TextResultWriter subclasses to get a bit
more granularity from the parent.

I'm happy to do the necessary, and will post a patch to bugzilla once
complete.

Will

On Fri, 23 Jan 2004, Jason Stajich wrote:

> Currently the code to do this sort of thing is embedded in
> SearchIO::Writer::TextResultWriter but generates a whole report.
>
> Someone can move the code out that part of the code to a separate function
> so it can be used for situations like what Nathan is asking for.  Not sure
> where it should go at this point other than in TextResultWriter - we don't
> really have a class of 'HSP consumers' other than in there.
>
> Will's code is smarter as it figures out the multiplier from the start/end
> while we code it up based on the alignment alg (TBLASTN, BLASTX, etc).
>
>


More information about the Bioperl-l mailing list