[Bioperl-l] BLAST to FeaturePair

Ewan Birney birney@ebi.ac.uk
Mon, 31 Jul 2000 14:21:46 +0100 (GMT)

On Mon, 31 Jul 2000 hilmar.lapp@pharma.novartis.com wrote:

> Dear all,
> we need to convert BLAST hits into FeaturePair objects. As I've noticed
> this is already realized by Bio::Tools::BPlite::HSP.
> However, I have some problems with this.
> 1) I need the HSP tiling functionality of Blast.pm, which may be beyond the
> scope of a lightweight BLAST parser like BPlite. Likewise, I need the
> statistics about the alignment as neatly gathered by Blast.pm.

Tiling should definitely be built ontop of BPLite, not inside of it. Could
you make the tiling generic, 

   # a tiled_seqfeature has sub_SeqFeatures set as their tiles.
   @tiled_seqfeatures = Bio::Tools::SeqFeatureTiler->tile(@input_seqfeatures);

> 2) Bio::Tools::BPlite::HSP has several implementation short-comings from my
> perspective: a) $feature->seqname() does not return a seq id but the full
> BLAST description line, incl. the '>' (could be fixed easily),

This could be done client side: Keep BPLite just "representing BLAST"
without too much magic. But stripping '>' seems sane.

> b) the
> lengths of the sequences are not stored (would require additional parsing
> code), 

> c) properties of the alignment are stored as 'new' tags, instead of
> through the tag system. This prevents them from easy de/serialization
> through the gff_string()/_from_gff_string() methods. (BTW does the string
> returned by $bplite_hsp->homologySeq() make sense to anyone?)

Talking to Lorenz - I'm not siure about this.

> What do you think of having the ability to turn a Bio::Tools::Blast::Sbjct
> object into a FeaturePair, too. Possibilities for implementation could be
> to make Sbjct.pm inherit off FeaturePair, or to add a method as_featurePair
> () which returns what it suggests. I favor the latter.

That would be great. I have always worried that Bio::Tools::Blast did not
play well with the SeqFeature system I wrote, so doing this change would
be a good thing in my view.

> Feedback appreciated.
>      Hilmar
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420