[Bioperl-l] can't parse blast file anymore
Hubert Prielinger
hubert.prielinger at gmx.at
Thu May 4 23:57:44 UTC 2006
Torsten Seemann wrote:
> Hubert
>
>> the following perl script worked fine until a few days ago....
>>
>> #iterate over each query sequence
>> print "try to enter while loop\n";
>>
>>
> die "Bad BLAST report" if not defined $search;
>
>> while (my $result = $search->next_result) {
>> print "entered 1st while loop\n";
>>
>> Output:
>>
>> [Hubert at ppc7 Database_Search]$ /usr/bin/perl Blast.pl
>> try to enter while loop
>>
>> but it doesn't enter the first while loop, it stuck there, first I
>>
> What is the value of $search before you start the WHILE loop ?
>
>
hi,
$search is defined, like
my $search = new Bio::SearchIO (-format => 'blast',
-file => $file)
if I try it with the debugger as barry has suggested than I get the following
DB<1> n
main::(Blast.pl:24): print "Connection established \n";
DB<1> n
Connection established
main::(Blast.pl:26): my $selectID = 0;
DB<1> n
main::(Blast.pl:27): my $count = 0;
DB<1> n
main::(Blast.pl:37): print "start program\n";
DB<1> n
start program
main::(Blast.pl:38): my $directory = '/home/Hubert/test';
DB<1> n
main::(Blast.pl:39): opendir(DIR, $directory) || die("Cannot open
directory");
DB<1> n
main::(Blast.pl:40): print "opened directory\n";
DB<1> n
opened directory
main::(Blast.pl:42): foreach my $file (readdir(DIR)) {
DB<1> n
main::(Blast.pl:43): if ($file =~ /txt$/) {
DB<1> n
main::(Blast.pl:44): $count++;
DB<1> n
main::(Blast.pl:45): print "read file $file \n";
DB<1> n
read file 40026.txt
main::(Blast.pl:48): $file = $directory . '/' . $file;
DB<1> n
main::(Blast.pl:50): my $search = new Bio::SearchIO (-format =>
'blast',
main::(Blast.pl:51):
-file => $file);
DB<1> n
main::(Blast.pl:52): print "bioperl seems to work....\n";
DB<1> s $search
main::((eval 14)[/usr/lib/perl5/5.8.8/perl5db.pl:628]:3):
3: $search;
DB<<2>> n
DB<2> n
bioperl seems to work....
main::(Blast.pl:53): my $cutoff_len = 10;
DB<2> n
main::(Blast.pl:56): print "try to enter while loop\n";
DB<2> n
try to enter while loop
main::(Blast.pl:57): while (my $result = $search->next_result) {
DB<2> s $result
main::((eval 15)[/usr/lib/perl5/5.8.8/perl5db.pl:628]:3):
3: $result;
DB<<3>>
More information about the Bioperl-l
mailing list