MSG: Start/stop out of range | Bio::Search::Tiling::MapTiling

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

MSG: Start/stop out of range | Bio::Search::Tiling::MapTiling

Thiago Venancio
Hi all,

By running the following code in the BLAST report attached I get the following error:

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Start/stop out of range [824, 1141]
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/local/share/perl/5.20.1/Bio/Root/
STACK: Bio::Search::HSP::HSPI::matches_MT /usr/local/share/perl/5.20.1/Bio/Search/Tiling/
STACK: Bio::Search::Tiling::MapTiling::_calc_stats /usr/local/share/perl/5.20.1/Bio/Search/Tiling/
STACK: Bio::Search::Tiling::MapTiling::length /usr/local/share/perl/5.20.1/Bio/Search/Tiling/
STACK: Bio::Search::Tiling::MapTiling::num_aligned /usr/local/share/perl/5.20.1/Bio/Search/Tiling/
STACK: Bio::Search::Tiling::MapTiling::frac_aligned /usr/local/share/perl/5.20.1/Bio/Search/Tiling/

I used the following code:

use strict;
use warnings;
use Bio::SearchIO;
use Bio::Search::Tiling::MapTiling;

my $searchio = Bio::SearchIO->new( -format => 'blast',
  -file   => shift );

my $gene;

while ( my $result = $searchio->next_result() ) {

    $result->query_name =~ /(\S+_\S+)_i/;
    my $g = $1;

    while( my $hit = $result->next_hit ) {
my $tiling = Bio::Search::Tiling::MapTiling->new($hit);
my $hsp    = $hit->next_hsp;

my $st    = $hsp->query->strand == "1" ? "p" : "m";
my $frame = $hsp->query->frame;
my $context = $st.$frame;

print $tiling->frac_aligned('query', 'exact', $context)."\n";

Any clues on how to deal with this error ?

Thanks in advance.

Bioperl-l mailing list
[hidden email]