Question: bioperl MapTiling error
gravatar for Shyam
4 months ago by
United States
Shyam80 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. Bioperl v1.007001 and BLAST+ 2.2.31

EDIT: Only throws this error when asking to report the methods for 'subject' or 'hit'. For 'query' only, everything works just as expected.

Thank you shyam

blast bioperl • 182 views
ADD COMMENTlink modified 3 months ago by Biostar ♦♦ 20 • written 4 months ago by Shyam80

I'd print out to stdout the query that's causing this error, then examine a GUI based BLAST output to check on the HSPs.

ADD REPLYlink written 4 months ago by Ram11k

I tried with different queries with different number of HSPs, it works if I use only the 'query' instead of 'subject' for

my $sub_length_tiling = $tiling->length('subject');

I emailed Dr Jensen the developer for this module. Will update when I heard back from him.

Thanks for the suggestion.

ADD REPLYlink modified 4 months ago • written 4 months ago by Shyam80
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 433 users visited in the last hour