[Bioperl-l] how to "tile" the HSPs of a hit-object ?

Harald haralds_listen at gmx.de
Mon Mar 20 20:14:21 UTC 2006


Hi all.

I want to use Bioperl for doing some psi-blast postprocessing (under 
linux with bioperl 1.5 and perl 5.8.7).
 
For doing so I would like to get for every hit-sequence its alignment 
with the query. So I dont want all those overlapping HSPs, but the one 
and only alignment with best score.

I am reading in the documentation for that for some time and think, that 
"tiling" is what I want to do to each hit-object.

As far as I have understood the documentation, calling
Bio::Search::SearchUtils::tile_hsps($hit); (or calling 
$hit->ambiguous_aln(), which will call the aforementioned)
should be suficient so that $hit will become tiled. Right?

But if I run the following program, the ranges of the hsp-objects will 
still overlap :-( - no matter if I use tile_hsp($hit) or 
$hit->ambiguous_aln().

================================
use strict;
use Bio::Tools::Run::StandAloneBlast;

my $report = new Bio::SearchIO('-file'=>'out.txt',
                   '-fomat'=>'psiblast');
my $result = $report->next_result;
my $iterat = $result->next_iteration;

while( my $hit = $iterat->next_hit )
{
    $hit->overlap(0);
#    Bio::Search::SearchUtils::tile_hsps($hit);
    $hit->ambiguous_aln(); #

    while( my $hsp = $hit->next_hsp )
    {
    my @q_range = $hit->range('query');
    my @h_range = $hit->range('hit');
   
    $, = " ";
    print @q_range,"\n";
    print @h_range,"\n\n";
    }
    print "-" x 5, "\n";
}
================================

Can anyone tell me where my problem lies?

Regards and thanks in advance,
Harald




More information about the Bioperl-l mailing list