<div dir="ltr">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. <div><br></div><div>Any ideas on resolving this?</div><div><br></div><div>Thanks</div><div>Ghana<br><br>On Friday, February 17, 2017 at 10:07:49 AM UTC-6, Ghana wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hi I wrote a script for parsing blast output and get some of the statistics. But while I run the script:<div><br></div><div><div>#!/usr/local/bin/perl</div><div><br></div><div><br></div><div>use strict;</div><div>use warnings;</div><div>use Bio::SearchIO;</div><div>use Bio::Search::Tiling::<wbr>MapTiling;</div><div><br></div><div>my $infile = $ARGV[0];</div><div>my $in = Bio::SearchIO->new(-format => 'blast', -file => $infile);</div><div>my $result = $in->next_result;</div></div><div><br></div><div>my $hit;<br></div><div><div>while ($hit = $result->next_hit){</div><div><span style="white-space:pre"> </span>my $tiling = Bio::Search::Tiling::<wbr>MapTiling->new($hit);<span style="white-space:pre"> </span></div></div><div><div> my $query_length_tiling = $tiling->length('query');</div><div><span style="white-space:pre"> </span>my $sub_length_tiling = $tiling->length('subject');</div><div><span style="white-space:pre"> </span>my $qid = $tiling->frac_identical('<wbr>query');</div><div><span style="white-space:pre"> </span>my $qcov = $tiling->percent_identity('<wbr>query');</div></div><div> print $query_length_tiling."\t".$<wbr>sub_length_tiling."\t".$qid."\<wbr>t".$qcov;</div><div><span style="white-space:pre"> </span>print "\n";</div><div><span style="white-space:pre"> </span>}</div><div><br></div><div>I am getting this error</div><div><br></div><div><p style="font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85098);min-height:14px"><span></span><br></p>
<p style="font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85098)"><span>--------------------- WARNING ---------------------</span></p>
<p style="font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85098)"><span>MSG: No HSPS present for type 'hit' in context 'p_' for this hit</span></p>
<p style="font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85098)"><span>------------------------------<wbr>---------------------</span></p>
<p style="font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85098)"><span>Can't use an undefined value as an ARRAY reference at /Library/Perl/5.18/Bio/Search/<wbr>Tiling/MapTiling.pm line 1135, <GEN1> line 600.</span></p></div><div><br></div><div>Please help me to resolve this error. </div><div><br></div><div>Thank you</div><div>Ghana</div><div><br></div></div></blockquote></div></div>