[ensembl-dev] Question about mixing of local and remote connections (Registry)

ian Longden ianl at ebi.ac.uk
Fri Aug 26 08:41:23 BST 2011


The first thing to check is are you able to connect to the databases.
If you add -verbose => 1 to the registry loading subroutine it will
let you know which databases you have connected too.

example code:-

use Bio::EnsEMBL::Registry;
use strict;

#
# Connect to ensembl and give mesages about what databases are found
#
Bio::EnsEMBL::Registry->load_registry_from_db(
   -host => "ensembldb.ensembl.org",
   -user => "anonymous",
   -verbose => 1
);

#
# Get the adaptor
#

my $GenomeDB_adaptor = Bio::EnsEMBL::Registry->get_adaptor('Multi',
'compara', 'GenomeDB');

print "GenomeDB adaptor -->".ref($GenomeDB_adaptor)."\n";


Should produce something like :-

Species 'saccharomyces_cerevisiae' loaded from database
'saccharomyces_cerevisiae_core_63_3'
Species 'ciona_savignyi' loaded from database 'ciona_savignyi_core_63_2'
Species 'myotis_lucifugus' loaded from database 'myotis_lucifugus_core_63_2'
....
danio_rerio_funcgen_63_9 loaded
sus_scrofa_funcgen_63_9 loaded
caenorhabditis_elegans_funcgen_63_220 loaded
ciona_intestinalis_funcgen_63_2 loaded
ensembl_compara_63 loaded
ensembl_ancestral_63 loaded
ensembl_ontology_63 loaded

GenomeDB adaptor -->Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor


-Ian Longden
EnsEMBL Developer.

On Fri, Aug 26, 2011 at 7:54 AM, Marc Hoeppner <mphoeppner at gmail.com> wrote:
> Hi list,
>
> I am new to using the PERL Api, but have used the Ruby version quite a bit
> and am familiar with the data structure and so on. One thing I have yet to
> figure out (being relatively new to PERL in general) is how I can connect to
> a local installation of e.g. ensembl_compara_63 through the registry. Just
> putting in the address, username and password throws an error message when
> trying to get the db adaptor for compara
>
> my $db = Bio::EnsEMBL::Registry->get_adaptor('Multi', 'compara',
> 'GenomeDB');
>
> Can't locate object method "get_adaptor" via package
> "Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor" at
> /home/mh/scripts/ensembl_test.pl line 15.
>
> Maybe someone could quickly point me to my error - I would very much like to
> use parts of EnsEMBL locally, for performance reasons mostly.
>
> Regards,
>
> Marc
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> List admin (including subscribe/unsubscribe):
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>




More information about the Dev mailing list