[ensembl-dev] Can't get adapters from plant registry
Simon Andrews
simon.andrews at babraham.ac.uk
Fri Aug 5 10:26:22 BST 2022
I'm trying to do some work through the API for a plant genome, but I can't get the initial connection to work. This is a script I've used many times before, but now seems to be failing. I've checked the docs but can't see any major changes. I'm using the latest API release and I can manually connect to the mysql server OK and see the list of databases there.
Any suggestions would be very welcome.
Thanks
Simon.
#!/usr/bin/perl
use warnings;
use strict;
use lib ("/home/andrewss/EnsemblAPI/bioperl-live");
use lib ("/home/andrewss/EnsemblAPI/ensembl/modules");
use Bio::EnsEMBL::Registry;
my $registry = 'Bio::EnsEMBL::Registry';
$registry->load_registry_from_db(
-host => 'mysql-eg-publicsql.ebi.ac.uk',
-port => 4157,
-user => 'anonymous'
);
my @adapters = @{$registry -> get_all_DBAdaptors(-group => 'core')};
warn "Found ".scalar @adapters." adapters from $registry \n";
my $db_adapter = $registry->get_DBAdaptor("Hordeum_vulgare",'Core');
print($db_adapter);
## Results:
$ ./test_plants.pl
Found 0 adapters from Bio::EnsEMBL::Registry
-------------------- WARNING ----------------------
MSG: Hordeum_vulgare is not a valid species name (check DB and API version)
FILE: Bio/EnsEMBL/Registry.pm LINE: 1334
CALLED BY: Bio/EnsEMBL/Registry.pm LINE: 636
Date (localtime) = Fri Aug 5 10:18:45 2022
Ensembl API version = 107
---------------------------------------------------
-------------------- EXCEPTION --------------------
MSG: Can not find internal name for species 'Hordeum_vulgare'
STACK Bio::EnsEMBL::Registry::get_DBAdaptor /home/andrewss/EnsemblAPI/ensembl/modules/Bio/EnsEMBL/Registry.pm:640
STACK toplevel ./test_plants.pl:22
Date (localtime) = Fri Aug 5 10:18:45 2022
Ensembl API version = 107
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20220805/8a5e2429/attachment.html>
More information about the Dev
mailing list