[ensembl-dev] accessing E. coli genes via API

Ameya Chaubal ameya at ebi.ac.uk
Wed May 27 09:59:12 BST 2020


Hello Sabine,

This should be fixed now. 

Thanks,
Ameya

> On 26 May 2020, at 19:59, Ameya Chaubal <ameya at ebi.ac.uk> wrote:
> 
> Hello Sabine,
> 
> Thanks for bringing this up. We will look into it. 
> 
> Best,
> Ameya
> 
> On Mon, 25 May 2020 at 15:12, Sabine Rei?er <sabine.reisser at mdc-berlin.de> wrote:
> Hi everyone,
> 
> I'm trying to access E. coli genes via the API. 
> 
> The output I get is
> 
> The API version used is 100
> chromosome:ASM584v2:Chromosome:1:4641652:1
> Slice: chromosome Chromosome 1-4641652 (1)
> DBD::mysql::st execute failed: Table 'bacteria_0_collection_core_47_100_1.analysis' doesn't exist at /home/sabine/bin/ensembl_api/src/ensembl/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm line 128.
> DBD::mysql::st execute failed: Table 'bacteria_0_collection_core_47_100_1.analysis' doesn't exist at /home/sabine/bin/ensembl_api/src/ensembl/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm line 128.
> 
> If I run in verbose mode I get
> 
> Species 'escherichia_coli_str_k_12_substr_mg1655' (id:99) loaded from database 'bacteria_0_collection_core_47_100_1'.
> 
> Maybe I'm missing something in the installation?
> 
> It would be great if someone could give me a hint.
> 
> Please find my code below. 
> 
> Cheers
> 
> Sabine
> 
> 
> 
> use Bio::EnsEMBL::ApiVersion;
> 
> printf( "The API version used is %s", software_version() ); 
> use Bio::EnsEMBL::Registry;
> 
> my $registry = 'Bio::EnsEMBL::Registry';
> $registry->load_registry_from_db(
>     -host => 'mysql-eg-publicsql.ebi.ac.uk',
>     -port => 4157,
> );
> 
> my $sp_EC = 'escherichia_coli_str_k_12_substr_mg1655';
> my $group = 'Core';
> 
> my $slice_adaptor = $registry->get_adaptor($sp_EC, $group, "slice");
> $slices = $slice_adaptor->fetch_all('toplevel');
> foreach my $slice (@$slices) {
>     print $slice->name(), "\n";
>         my $coord_sys  = $slice->coord_system()->name();
>         my $seq_region = $slice->seq_region_name();
>         my $start      = $slice->start();
>         my $end        = $slice->end();
>         my $strand     = $slice->strand();
> 
>         print "Slice: $coord_sys $seq_region $start-$end ($strand)\n";                
>         foreach my $gene ( @{ $slice->get_all_Genes() } ) {
>                 print $gene->stable_id(), "\n";
>         }
>  }
> 
> 
> 
> 
> 
> -- 
> Dr. Sabine Rei?er
> Postdoctoral researcher
> 
> Bioinformatics of RNA Structure and Transcriptome Regulation
> Berlin Institute for Medical Systems Biology
> Max Delbr?ck Center for Molecular Medicine in the Helmholtz Association
> Hannoversche Str. 28, 10115 Berlin, Germany
> 
> Tel.: +49 30 9406-3294
> 
> sabine.reisser at mdc-berlin.de <mailto:sabine.reisser at mdc-berlin.de>
> www.mdc-berlin.de <http://www.mdc-berlin.de/>_______________________________________________ 
> Dev mailing list Dev at ensembl.org 
> Posting guidelines and subscribe/unsubscribe info: https://lists.ensembl.org/mailman/listinfo/dev_ensembl.org 
> Ensembl Blog: http://www.ensembl.info/ 
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: https://lists.ensembl.org/mailman/listinfo/dev_ensembl.org
> Ensembl Blog: http://www.ensembl.info/

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


More information about the Dev mailing list