[ensembl-dev] Connection to Ensembl variation, funcgen dbs

Andy Yates ayates at ebi.ac.uk
Thu Jun 28 07:59:18 BST 2012


Hi Ken,

I'm not 100% sure why but from running your code on live servers I've noticed the following errors which once fixed I got a positive response (using human rather than corn):

1). You are not adding the regulation API libraries onto your @INC. You should change the use lib map command to

use lib map { $ENV{'EnsemblDir'}."/$_" } qw (ensembl/modules
   ensembl-external/modules ensembl-variation/modules ensembl-draw/modules
   ensembl-compara/modules ensembl-functgenomics/modules );

2). There is no adaptor to retrieve for regulation. Try the following instead:

   my $adaptor = $registry->get_adaptor(
       $species,
       $type,
       $type eq 'core'      ? 'gene'      : 
       $type eq 'variation' ? 'variation' : 
       'probe'
   );

Apart from this try adding the -VERBOSE flags in. If you call out to Registry's load_registry_from_db() in your gramene ensembl.registry file then add it in there and we should be in a better situation to diagnose the problem.

Best regards,

Andy

Andrew Yates                   Ensembl Core Software Project Leader
EMBL-EBI                       Tel: +44-(0)1223-492538
Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468
Cambridge CB10 1SD, UK         http://www.ensembl.org/

On 27 Jun 2012, at 21:56, Youens-Clark, Ken wrote:

> According to this info:
> 
> 	http://uswest.ensembl.org/info/docs/api/variation/variation_tutorial.html#connect
> 
> I believe I should be able to do this:
> 
>> $ cat test-connect.pl 
>> #!/usr/local/bin/perl
>> 
>> BEGIN{
>>    $ENV{'EnsemblDir'} ||= '/usr/local/ensembl-live/';
>> }
>> 
>> use strict;
>> use warnings;
>> use autodie;
>> 
>> use lib map { $ENV{'EnsemblDir'}."/$_" } qw (modules ensembl/modules
>>    ensembl-external/modules ensembl-variation/modules ensembl-draw/modules
>>    ensembl-compara/modules );
>> 
>> use Bio::EnsEMBL::Registry;
>> 
>> my $registry = 'Bio::EnsEMBL::Registry';
>> 
>> $registry->load_all('/usr/local/gramene/conf/ensembl.registry');
>> 
>> my $species = 'Zea_mays';
>> for my $type ( qw/ core variation funcgen / ) {
>>    my $adaptor = $registry->get_adaptor(
>>        $species,
>>        $type,
>>        $type eq 'core'      ? 'gene'      : 
>>        $type eq 'variation' ? 'variation' : 
>>        ''
>>    );
>> 
>>    printf "$type %sok\n", $adaptor ? '' : 'NOT ';
>> }
>> 
>> $ ./test-connect.pl 
>> core ok
>> variation NOT ok
>> funcgen NOT ok 
> 
> Why don't the latter two work?  We have maize funcgen and variation dbs.
> 
> Ken
> _______________________________________________
> 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