[Bioperl-l] problem with a script

Mark A. Jensen maj at fortinbras.us
Wed Sep 16 15:18:26 UTC 2009


Hi Joonas-- 

Put a semicolon after "use Bio::SearchIO" in line 2.
If that doesn't work, then the error suggests that $searchio is undefined 
because the parser failed for some reason.
You could try
 my $searchio = Bio::SearchIO->new(-format => 'hmmer', -file   => 
'/wrk/xxxx/hmm/hmmsearch_nr.out'
                   -verbose=>1);
to get more detailed error messages, they may direct you to the issue.

cheers MAJ

----- Original Message ----- 
From: ""Joonas Jämsen"" <jajams at utu.fi>
To: "bioperl list" <bioperl-l at lists.open-bio.org>
Sent: Wednesday, September 16, 2009 6:04 AM
Subject: [Bioperl-l] problem with a script


> Hi,
>
> Im trying to run the script below and I get an error: "Can't call method 
> "next_result" on an undefined value at parser.pl line 5."
>
>
> #!/v/linux26_x86_64/appl/molbio/bioperl/perl/bin/
> use Bio::SearchIO
> my $searchio = Bio::SearchIO->new(-format => 'hmmer', -file   => 
> '/wrk/xxxx/hmm/hmmsearch_nr.out');
> while ( my $result = $in->next_result ) {
>     while ( my $hit = $result->next_hit ) {
>         while ( my $hsp-evalue<=10 ) {
>             while ( my $hsp = $hit->next_hsp ) {
>                 print $hit->accession(), "\n";
>         }
>     }
> }
>
> Could someone tell me what is wrong?
>
> Thanks.
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> 




More information about the Bioperl-l mailing list