Re: error whiling using MapTiling

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

Re: error whiling using MapTiling

The error is thrown only for the subject or the hit methods. If I use only query methods the scripts runs fine and reports as expected. 

Any ideas on resolving this?


On Friday, February 17, 2017 at 10:07:49 AM UTC-6, Ghana wrote:
Hi I wrote a script for parsing blast output and get some of the statistics. But while I run the script:


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

my $infile = $ARGV[0];
my $in = Bio::SearchIO->new(-format => 'blast', -file => $infile);
my $result = $in->next_result;

my $hit;
while ($hit = $result->next_hit){
my $tiling = Bio::Search::Tiling::MapTiling->new($hit);
                my $query_length_tiling = $tiling->length('query');
my $sub_length_tiling = $tiling->length('subject');
my $qid = $tiling->frac_identical('query');
my $qcov = $tiling->percent_identity('query');
                print $query_length_tiling."\t".$sub_length_tiling."\t".$qid."\t".$qcov;
print "\n";

I am getting this error

--------------------- WARNING ---------------------

MSG: No HSPS present for type 'hit' in context 'p_' for this hit


Can't use an undefined value as an ARRAY reference at /Library/Perl/5.18/Bio/Search/Tiling/ line 1135, <GEN1> line 600.

Please help me to resolve this error. 

Thank you

Bioperl-l mailing list
[hidden email]