[Bioperl-l] registry configuration and access
Michael Bradley
mebradley at chem.ufl.edu
Thu Jul 29 11:06:52 EDT 2004
If anyone can help me figure out why I can't access my locally indexed
files with the registry system I would greatly appreciate it.
I have indexed some swissprot entries using bioflat_index.pl. This
appeared to work fine (no errors).
The config.dat file looks like this:
index BerkeleyDB/1
format URN:LSID:open-bio.org:swiss/protein
fileid_0 /home/bradley/PIPELINE/swissprot/uniprot_sprot.dat
575198688
primary_namespace ID
secondary_namespaces ACC VERSION
The seqdatabase.ini file looks like this:
[swissprot]
protocol=flat
location=/home/bradley/biodb_index/registryspandtrembl
dbname=registrySPandTrEMBL
My problem starts when attempting to use the registry.
use Bio::DB::Registry;
my $registry = new Bio::DB::Registry;
my $sp = $registry->get_database('swissprot');
I am getting the following error:
-------------------- WARNING ---------------------
MSG: Couldn't call new_from_registry on [Bio::DB::Flat]
------------- EXCEPTION -------------
MSG: you must specify an indexing scheme
STACK Bio::DB::Flat::new
/usr/lib/perl5/site_perl/5.8.0/Bio/DB/Flat.pm:163
STACK Bio::DB::Flat::new_from_registry
/usr/lib/perl5/site_perl/5.8.0/Bio/DB/Flat.pm:254
STACK (eval) /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Registry.pm:182
STACK Bio::DB::Registry::_load_registry
/usr/lib/perl5/site_perl/5.8.0/Bio/DB/Registry.pm:181
STACK Bio::DB::Registry::new
/usr/lib/perl5/site_perl/5.8.0/Bio/DB/Registry.pm:97
STACK toplevel
/home/bradley/PIPELINE/perl/scripts/Local_SP_EMBL_Retrieval.pl:232
--------------------------------------
By poking around in Flat.pm it appears that Flat.pm is unable to read
the index scheme from config.dat because it can't open config.dat. I
know this because I edited the Flat.pm with two print statements and
only the first statement is executed :
# read the configuration file
sub _read_config {
my $self = shift;
my $path = $self->_config_path;
print "in sub _read_config\n"; ## this works
return unless -e $path;
print "reading config\n"; ## this doesn't execute
open (F,$path) or $self->throw("open error on $path: $!");
my %config;
while (<F>) {
*****************************
Michael E. Bradley, Ph.D.
Postdoctoral Researcher
University of Florida
Department of Chemistry
Foundation for Applied
Molecular Evolution
Ph. (352) 271-7005
Fax (353) 271-7076
<mailto:mebradley at chem.ufl.edu> mebradley at chem.ufl.edu
****************************
More information about the Bioperl-l
mailing list