[Bioperl-l] RE: :DB::Registry

Brian Osborne brian_osborne at cognia.com
Mon Oct 27 09:56:13 EST 2003


Heikki,

Yes, with your modified Registry.t I see a problem. With my version,
everything was OK. The problem is that I can only work on this after-hours.
If you're trying to stay on schedule you have some choices: we can remove
Registry.t, and the code stays broken. We can solicit help from bioperl-l,
whoever's interested, or you can wait while I take a closer look.

Here's what I've done. No index method was being passed to Flat, that won't
work since it's required. Also, config.dat wasn't being read. That wouldn't
work since these databases are created before Registry is called, and the
only way Flat knows whether something is bdb or binarysearch (flat) is by
reading config.dat, then it knows which child class to call. Also, Registry
was reading only the first file in OBDA_SEARCH_PATH, that was also not
desirable. I think I see where the problem is now. If you take a look at the
$db passed to Failover using your test you'll see that there's a file path
missing:

db: Bio::DB::Flat::BDB::fasta=HASH(0x105b7d28)
key: flat_directory t/tmp
key: flat_flat_file_no HASH(0x105b7e6c)
key: flat_format fasta
key: flat_primary_namespace ACC
key: flat_indexing BerkeleyDB/1
key: flat_flat_file_path HASH(0x105b7e48)
Use of uninitialized value in print at
/usr/lib/perl5/site_perl/5.8.0/Bio/DB/Failover.pm line 113.
key: flat_verbose
key: flat_dbname testbdb
key: flat_secondary_namespaces ARRAY(0x105b7d7c)
key: flat_alphabet protein
key: bdb_maxopen 32

So the proper child class is involved, Flat::BDB, the correct flat_indexing
is there, the name is right. So that's what I'll be looking at next. I could
be wrong, of course, this is just my suspicion. You decide whether you want
someone who can work faster than me!

Brian O.




-----Original Message-----
From: Heikki Lehvaslaiho [mailto:heikki at ebi.ac.uk]
Sent: Monday, October 27, 2003 8:21 AM
To: Brian Osborne
Subject: RE: :DB::Registry

Brian,

I hope my mail yesterday made sense. I had to send it off in a hurry.

I think there is a fundamental problem in processing multiple registry
files. I know that you have take on this area, but I if you get stuck, I
recommend contacting Lincoln directly. I would. Now.

        -Heikki

On Sun, 2003-10-26 at 03:26, Brian Osborne wrote:
> Heikki,
>
> I have a guesss. Since you're running 11 tests that means you have DB_File
> installed. Here are the 9th and 10th tests:
>
> $db = $registry->get_database('testbdb');
>  ok defined($db);
>  $seq = $db->get_Seq_by_id("ALEU_HORVU");
>  ok defined($seq);
>
> So, apparently the flat database testdbd is getting made. One way to
confirm
> this is to comment out the END block in Registry.t and run the test. You
> should see t/tmp/testbdb, t/tmp/testbdb/config.dat, and the index file
> t/tmp/testbdb/key_ACC. Now, if you see those files the database has been
> made, so the question is why can't you retrieve the sequence?
>
> I've noticed this note in DB/Flat.pm:
>
> -index is one of "bdb" or "binarysearch" and indicates the type of
> index to generate.  "bdb" corresponds to Berkeley DB.  You *must* be
> using BerkeleyDB version 2 or higher, and have the Perl BerkeleyDB
> extension installed (DB_File will *not* work).
>
> Do you have this recent version of BerkeleyDB? I'll add this check to
> Registry.t.
>
>
> Brian O.
>
> -----Original Message-----
> From: Heikki Lehvaslaiho [mailto:heikki at nildram.co.uk]
> Sent: Saturday, October 25, 2003 10:41 AM
> To: Brian Osborne
> Subject: Bio::DB::Registry
>
> Brian,
>
> Your recent changes broke Registry.t for me. Can you give a hint what
> might be going on?
>
>         -Heikki
>
> localhost ~/src/bioperl/core> perl -w t/Registry.t
> 1..11
> ok 1
> ok 2
>
> -------------------- WARNING ---------------------
> MSG: Couldn't call new_from_registry on [Bio::DB::Flat]
>
> ------------- EXCEPTION  -------------
> MSG: First line not compatible with flat file index.  Should be
> something like
>
> index   flat/1
> STACK Bio::DB::Flat::BinarySearch::read_config_file
> /home/heikki/src/bioperl/core/Bio/DB/Flat/BinarySearch.pm:1192
> STACK Bio::DB::Flat::BinarySearch::new
> /home/heikki/src/bioperl/core/Bio/DB/Flat/BinarySearch.pm:270
> STACK Bio::DB::Flat::new
> /home/heikki/src/bioperl/core/Bio/DB/Flat.pm:178
> STACK Bio::DB::Flat::new_from_registry
> /home/heikki/src/bioperl/core/Bio/DB/Flat.pm:254
> STACK (eval) /home/heikki/src/bioperl/core/Bio/DB/Registry.pm:182
> STACK Bio::DB::Registry::_load_registry
> /home/heikki/src/bioperl/core/Bio/DB/Registry.pm:181
> STACK Bio::DB::Registry::new
> /home/heikki/src/bioperl/core/Bio/DB/Registry.pm:97
> STACK toplevel t/Registry.t:56
>
> --------------------------------------
>
> ---------------------------------------------------
> ok 3
> ok 4
> ok 5
> ok 6
> ok 7
> ok 8
> ok 9
> not ok 10
> # Failed test 10 in t/Registry.t at line 75
> Use of uninitialized value in scalar assignment at t/Registry.t line 85.
--
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho    heikki_at_ebi ac uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________




More information about the Bioperl-l mailing list