[Bioperl-l] FASTA.pm issue

sumit middha sm_middha at yahoo.com
Thu Jul 7 11:11:26 EDT 2005


Nopes, that did not help either. I tried it on a
different machine and both the codes worked. My guess
is that something might have gone bad with the perl
installed in this machine, but cannot guess what it
can be, and how to correct that !

> perl test.pl
Use of uninitialized value in numeric gt (>) at
/usr/local/lib/perl5/5.8.5/sun4-solaris/DB_File.pm
line 271.
Deep recursion on subroutine "DB_File::AUTOLOAD" at
/usr/local/lib/perl5/5.8.5/sun4-solaris/DB_File.pm
line 234.

Thanks for your help.

--- khoueiry <khoueiry at ibdm.univ-mrs.fr> wrote:

> Hi sumit,
> 
> I suggest you to change your index method. Try
> that... (In fact your
> code and the below one works well for me)
> 
> ------
> #!/usr/bin/perl -w
> use strict;
> use Bio::Index::Fasta;
> 
> 
> #Indexing....
> my $type = $ENV{'BIOPER_INDEX_TYPE'};
> if ($type) {
>   $Bio::Index::Abstract::USE_DBM_TYPE = $type;
> }
> 
> my $index = Bio::Index::Fasta->new(
> "/home/pierre/BioperlTest/f1.idx",
> 'WRITE' );
> $index->make_index("/home/pierre/BioperlTest/f1");
> 
> 
> my $seqobj = $index->fetch("abc");
> my $str = $seqobj->seq();
> print $str."\n";
> 
> exit; 
> 
> -----------
> 
> Le mercredi 06 juillet 2005 � 09:37 -0700, sumit
> middha a �crit :
> 
> > Well heres a small test code I made to explain my
> > problem. Please let me know your suggestions.
> > Thanks.
> > 
> > --------------code-----------------
> > #!/usr/bin/perl -w
> > use strict;
> > use Bio::DB::Fasta;
> > use Bio::DB::Flat;
> > use Bio::Index::Fasta;
> > use Bio::Seq;
> > 
> > my $db = Bio::DB::Fasta->new("f1");
> > #my $db = Bio::Index::Fasta->new("f1");
> > my $seqobj = $db->get_Seq_by_id("abc"); 
> > my $str = $seqobj->seq();
> > print $str;
> > 
> > exit; 
> > -----------end of code ------------
> > 
> > And here is the error I get (which I did not a few
> > months back)
> > 
> > > perl -w test.pl
> > AnyDBM_File doesn't define an EXISTS method at
> >
> /usr/local/lib/perl5/site_perl/5.8.5/Bio/DB/Fasta.pm
> > line 577
> > 
> > and f1 fasta file is 
> > > cat f1
> > >abc
> > AGCATCG
> > 
> > 
> > --- Brian Osborne <brian_osborne at cognia.com>
> wrote:
> > 
> > > Sumit,
> > > 
> > > You'll have to show us the code that gives you
> the
> > > error, I think.
> > > 
> > > 
> > > Brian O.
> > > 
> > > 
> > > On 6/23/05 1:07 PM, "sumit middha"
> > > <sm_middha at yahoo.com> wrote:
> > > 
> > > > 
> > > > Thanks for the reply Brian.
> > > > Changing it to Bio::Index::Fasta helped, but
> gave
> > > > another problem in my script, which I dont
> have a
> > > > clue.
> > > > 
> > > > ------------- EXCEPTION  -------------
> > > > MSG: Can't open 'SDBM_File' dbm file
> > > > '../Dyak/dyak_chr_ucsc.fa.rev' : No such file
> or
> > > > directory
> > > > STACK Bio::Index::Abstract::open_dbm
> > > >
> > >
> >
>
/usr/local/lib/perl5/site_perl/5.8.5/Bio/Index/Abstract.pm:392
> > > > STACK Bio::Index::Abstract::new
> > > >
> > >
> >
>
/usr/local/lib/perl5/site_perl/5.8.5/Bio/Index/Abstract.pm:150
> > > > STACK Bio::Index::AbstractSeq::new
> > > >
> > >
> >
>
/usr/local/lib/perl5/site_perl/5.8.5/Bio/Index/AbstractSeq.pm:91
> > > > STACK toplevel get_ortho.pl:31
> > > > 
> > > > I know that the file exists, and has been
> > > formatted as
> > > > a database to use BLAST search.
> > > > 
> > > > sumit
> > > > 
> > > > --- Brian Osborne <brian_osborne at cognia.com>
> > > wrote:
> > > > 
> > > >> Sumit,
> > > >> 
> > > >> In perl 5.8 a module that's using a tied hash
> is
> > > >> supposed to have an EXISTS
> > > >> method, but it appears that AnyDBM_File
> doesn't.
> > > You
> > > >> could try using
> > > >> Bio::Index::Fasta instead, or Bio::DB::Flat.
> > > >> 
> > > >> Brian O.
> > > >> 
> > > >> 
> > > >> On 6/22/05 6:24 PM, "sumit middha"
> > > >> <sm_middha at yahoo.com> wrote:
> > > >> 
> > > >>> 
> > > >>> Hello,
> > > >>> 
> > > >>> I have a trouble with using fasta module
> > > >>> 
> > > >>> I use the required statements
> > > >>> 
> > > >>> use Bio::DB::Fasta;
> > > >>> use Bio::Seq;
> > > >>> 
> > > >>> The error was:
> > > >>> 
> > > >>> AnyDBM_File doesn't define an EXISTS method
> at
> > > >>> 
> > > >>
> > >
> /usr/local/lib/perl5/site_perl/5.8.5/Bio/DB/Fasta.pm
> > > >>> line 577
> > > >>> 
> > > >>> thanks,
> > > >>> sm
> > 
> > 
> > 		
> > __________________________________ 
> > Do you Yahoo!? 
> > Make Yahoo! your home page 
> > http://www.yahoo.com/r/hs
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> >
>
http://portal.open-bio.org/mailman/listinfo/bioperl-l
> 



		
____________________________________________________
Sell on Yahoo! Auctions – no fees. Bid on great items.  
http://auctions.yahoo.com/


More information about the Bioperl-l mailing list