[ensembl-dev] Re: Re: Can't connect to ensembl database

Abel Ureta-Vidal abel at eaglegenomics.com
Wed Aug 4 19:39:57 BST 2010


Hi Grace,

I may have reproduced your problem. I'm assuming you downloaded the  
ensembl core API from this URL.
http://www.ensembl.org/info/docs/api/api_installation.html. There is a  
link to download ensembl. The link url is
http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar

I reproduce (partially) your error, by getting this API with a wget  
like this on the command line.

wget http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar

It happens that if you do it like that, without ' or " around the  
complete url, the shell cut the url for wget to digest. And when it  
does it,
the API it somehow downloads the latest branch which is v59.

Do a

grep API_VERSION /src/ensembl/modules/Bio/EnsEMBL/Registry.pm

and let us know what you get. In my case I get a line (among others)
my $API_VERSION = 59;

So to download the proper API (e.g.v58) with wget add ' or ", e.g.

wget "http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar 
"

To debug such thing, use the -verbose in your script. That is how I  
got into the right direction to found what was going on, because
it was telling me the script was trying to load the v59 databases,  
that are not yet on ensembldb.ensembl.org
$registry->load_registry_from_db(
     -host => 'ensembldb.ensembl.org',
     -user => 'anonymous',
     -verbose => 1
     );

Hope this help and solve your problem. If not, I'm as stuck as you.

Cheers,

Abel

On 4 Aug 2010, at 18:37, Grace Cheng wrote:

> I get 42 when I run the code you provided, however, I still can't  
> run my script. Any other thing I could test for?
>
> Thanks,
> Grace
>
> 寄件人﹕ Andy Yates <ayates at ebi.ac.uk>
> 收件人﹕ Grace Cheng <himwo at yahoo.com.hk>
> 副本(CC) dev ensembl <dev at ensembl.org>
> 傳送日期﹕ 2010/8/4 (三) 9:41:14 PM
> 主題: Re: [ensembl-dev] Re: Can't connect to ensembl database
>
> I would suggest prodding the DBI connection parameters in a separate  
> call. The following will connect to EnsemblDB & will also raise an  
> error if it cannot do the connection with some error information
>
> use strict;
> use warnings;
> use DBI;
> my $host ='ensembldb.ensembl.org';
> my $port = 5306;
> my $user = 'anonymous';
> my $pass = undef;
> my $dbh = DBI->connect( "DBI:mysql:host=$host;port=$port", $user,  
> $pass ) or die $DBI::errstr;
> warn $dbh->selectrow_array('select 42');
> $dbh->disconnect();
>
> If you get a warning saying 42 then this is fine; if not then post  
> the DBI error back to the list.
>
> Andy
>
>  _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev

__
Abel Ureta-Vidal, PhD MBA
Eagle Genomics Ltd | E: abel at eaglegenomics.com
http://www.eaglegenomics.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20100804/7cf570be/attachment.html>


More information about the Dev mailing list