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

Grace Cheng himwo at yahoo.com.hk
Tue Aug 3 18:30:56 BST 2010


Hi Steve,

Thanks for your reply. I still having problem when I tried to run my scritp, 
however, I have no idea what's going wrong since the script works some days ago.

Belows is the details of my scritp:

#!/usr/bin/perl -w
use lib "/src/ensembl/modules";
use Bio::EnsEMBL::Registry;
my $registry = 'Bio::EnsEMBL::Registry';
$registry->load_registry_from_db(
    -host => 'ensembldb.ensembl.org',
    -user => 'anonymous'
);
my $slice_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Slice' );
#get gene MLH1
my $slice = $slice_adaptor->fetch_by_gene_stable_id( 'ENSG00000076242', 150000);
my $unmasked_seq   = $slice->seq();
my $softmasked_seq = $slice->get_repeatmasked_seq( undef, 1 );
my $softmasked_length = $softmasked_seq ->length();
my $sst = $slice->start();
my $sen = $slice->end();
my $chr = $slice->seq_region_name();
my $id = "MLH1";
print "\>$id||$chr\:$sst\-$sen||Seq_length\:$softmasked_length\n";
print $softmasked_seq->seq(), "\n";

And I keep getting the error msg:
  DBD::mysql::db selectall_arrayref failed: fetch() without execute() at 
> /src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 1362.
> Can't call method "fetch_by_gene_stable_id" on an undefined value at 
> Seq_find_hardmask.pl line 17.

Could you please give me some help? Many thanks!

Regards,
Grace



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


More information about the Dev mailing list