[ensembl-dev] Can't connect to ensembl database
Stephen Trevanion
st3 at sanger.ac.uk
Tue Aug 3 18:47:25 BST 2010
Hi Grace,
Your script works fine from here so I suspect a change at your end. Can
you connect to ensembldb.ensembl.org:5306 from the command line ?
Steve
On 08/03/10 18:30, Grace Cheng wrote:
> 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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev
>
More information about the Dev
mailing list