[ensembl-dev] local Compara and perl API

Thomas Derrien tderrien at univ-rennes1.fr
Fri Jul 18 10:17:40 BST 2014


Dear all,

I have installed a local version of the compara database named GENOCOMP (without the core(s) databases).
Then, I would like to use the perl API to query it.
Here is the simple script I used with the ensembl.init file at the end of the email.

###############
use strict;
use warnings;
use Data::Dumper;
use Bio::EnsEMBL::Registry;

Bio::EnsEMBL::Registry->load_all();
my $member_adaptor = Bio::EnsEMBL::Registry->get_adaptor('Compara', 'compara', 'GeneMember');
print Dumper $member_adaptor;
#################

This scripts returns the following error:

------------------- WARNING ----------------------
MSG: Compara is not a valid species name (check DB and API version)
FILE: Bio/EnsEMBL/Registry.pm LINE: 1198
CALLED BY: Bio/EnsEMBL/Registry.pm  LINE: 983
Date (localtime)    = Fri Jul 18 11:04:36 2014
Ensembl API version = 75
---------------------------------------------------

-------------------- EXCEPTION --------------------
MSG: Can not find internal name for species 'Compara'
STACK Bio::EnsEMBL::Registry::get_adaptor /home/genouest/umr6061/recomgen/tderrien/src/ensembl/modules/Bio/EnsEMBL/Registry.pm:985
STACK toplevel getOrthologAPI_genocomp.pl:65
Date (localtime)    = Fri Jul 18 11:04:36 2014
Ensembl API version = 75
---------------------------------------------------


I also tried with:
my $member_adaptor = Bio::EnsEMBL::Registry->get_adaptor(‘Multi', 'compara', 'GeneMember');
without any success.

Any help would be much appreciated.

Thanks in advance

Thomas



PS: My ensembl.init file
$ cat ~/.ensembl_init 
use strict;

use Bio::EnsEMBL::Utils::ConfigRegistry;
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use Bio::EnsEMBL::Compara::DBSQL::DBAdaptor;


my $host   = 'genobdd';
my $user   = 'GENOCOMP';
my $port   = 5306;
my $dbname = 'GENOCOMP';
my $pass = ‘XXXXXXXXX';


new Bio::EnsEMBL::Compara::DBSQL::DBAdaptor(
  -host    => $host, 						
  -user    => $user,						
  -pass	   => $pass,
  -port    => $port,						
  -dbname  => $dbname,						
  -verbose => 1
);

1;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20140718/d6e404a8/attachment.html>


More information about the Dev mailing list