[ensembl-dev] FW: ensembl api query
Monika Komorowska
monika at ebi.ac.uk
Mon Jun 13 16:04:39 BST 2011
Hi David
Sorry about this, but it looks like we had the wrong version of DBEntryAdaptor checked in to branch 62.
I have checked in the correct version, please checkout the DBEntryAdaptor module again.
Thanks
Monika
On 13 Jun 2011, at 14:44, BURT David wrote:
> Hi Monika
>
> I still get the wrong version
> With same error about add_linkage_type
>
> When you look at DBEntryAdaptor.pm what do you find at line 1262 and 1263?
>
> I am sorry I can’t understand how CVS picks up the wrong version?
>
> Dave
>
> Professor David W. Burt
> Chair of Comparative Genomics
> Dept. Genomics and Genetics
> The Roslin Institute and Royal (Dick) School of Veterinary Studies
> The Roslin Institute Building
> University of Edinburgh
> Easter Bush Campus
> Midlothian EH25 9RG
>
> Phone: +44 (0)131 651 9216
> Lab: +44 (0)131 651 9380
> Fax: +44 (0)131 651 9105
> Email: Dave.Burt at roslin.ed.ac.uk
> WWW site: http://www.roslin.ed.ac.uk/dave-burt/
> The 6th International chick meeting - Edinburgh: http://www.roslin.ed.ac.uk/chick6/
>
> Roslin Institute is a company limited by guarantee, registered in Scotland (registered number SC157100) and a Scottish Charity (registered number SC023592). Our registered office is at Roslin, Midlothian, EH25 9PS. VAT registration number 847380013.
>
> The information contained in this e-mail (including any attachments) is confidential and is intended for the use of the addressee only. The opinions expressed within this e-mail (including any attachments) are the opinions of the sender and do not necessarily constitute those of Roslin Institute (Edinburgh) ("the Institute") unless specifically stated by a sender who is duly authorised to do so on behalf of the Institute
>
> From: Monika Komorowska [mailto:monika at ebi.ac.uk]
> Sent: 13 June 2011 14:18
> To: BURT David
> Cc: dev at ensembl.org
> Subject: Re: [ensembl-dev] FW: ensembl api query
>
> Hi David
>
> Would you mind creating a new sub-directory say ensembl_v62 in your home directory, cd into it and checkout version 62 again, using this command:
> $ cvs -d :pserver:cvsuser at cvs.sanger.ac.uk:/cvsroot/ensembl checkout -r branch-ensembl-62 ensembl-api
>
> Add the new path to the PERL5LIB variable in your .cshrc file:
> setenv PERL5LIB ${PERL5LIB}:${HOME}/ensembl_v62/ensembl/modules
> and delete any other paths to ensembl/modules
>
> You'll need to source the .cshrc file
> Hopefully this time your script will pick up the correct version of the API
>
> Thanks
> Monika
>
>
> On 13 Jun 2011, at 14:02, BURT David wrote:
>
>
> Hi Monika,
>
> Many thanks – I think we are getting close.
>
> 1_Attached is my copy of DBEntryAdaptor found in D:\Bioinformatics\Ensembl\src\ensembl\modules\Bio\EnsEMBL\DBSQL
> As you can see “add_linkage_type” is at line 1263 in DBEntryAdaptor in this version 62
>
> Here’s an extract [since file too big for dev list]
>
> if ( defined($linkage_type)
> && $linkage_type ne ""
> && !$linkage_types{$refID}->{$linkage_key} )
> {
> $source_xref = ( defined($source_xref_id)
> ? $self->fetch_by_dbID($source_xref_id)
> : undef );
> $seen{$refID}
> ->add_linkage_type( $linkage_type, $source_xref || () );
> $linkage_types{$refID}->{$linkage_key} = 1;
> }
> } ## end while ( my $arrRef = shift...
> } ## end while ( my $rowcache = $sth...
>
> 2_This was downloaded using instructions from Ensembl (see below) using CVS
>
> $ cvs -d :pserver:cvsuser at cvs.sanger.ac.uk:/cvsroot/ensembl login
> Logging in to :pserver:cvsuser at cvs.sanger.ac.uk:2401/cvsroot/ensembl
> CVS password: CVSUSER
>
> NB: You can install as many Ensembl APIs as you need in this way. To install all the APIs in one go, use the command:
> $ cvs -d :pserver:cvsuser at cvs.sanger.ac.uk:/cvsroot/ensembl checkout -r branch-ensembl-62 ensembl-api
>
> 3_However, I found an old install – based on version 56 – this worked up to version 59, but software failed after that.
>
> Any more thoughts? Looks like my version 62 is wrong?
>
> Dave
>
> Professor David W. Burt
> Chair of Comparative Genomics
> Dept. Genomics and Genetics
> The Roslin Institute and Royal (Dick) School of Veterinary Studies
> The Roslin Institute Building
> University of Edinburgh
> Easter Bush Campus
> Midlothian EH25 9RG
>
> Phone: +44 (0)131 651 9216
> Lab: +44 (0)131 651 9380
> Fax: +44 (0)131 651 9105
> Email: Dave.Burt at roslin.ed.ac.uk
> WWW site: http://www.roslin.ed.ac.uk/dave-burt/
> The 6th International chick meeting - Edinburgh: http://www.roslin.ed.ac.uk/chick6/
>
> Roslin Institute is a company limited by guarantee, registered in Scotland (registered number SC157100) and a Scottish Charity (registered number SC023592). Our registered office is at Roslin, Midlothian, EH25 9PS. VAT registration number 847380013.
>
> The information contained in this e-mail (including any attachments) is confidential and is intended for the use of the addressee only. The opinions expressed within this e-mail (including any attachments) are the opinions of the sender and do not necessarily constitute those of Roslin Institute (Edinburgh) ("the Institute") unless specifically stated by a sender who is duly authorised to do so on behalf of the Institute
>
> From: Monika Komorowska [mailto:monika at ebi.ac.uk]
> Sent: 13 June 2011 11:01
> To: BURT David
> Cc: dev at ensembl.org
> Subject: Re: [ensembl-dev] FW: ensembl api query
>
> Hi David
>
> Are you sure you're using version 62, I just tried your script on 62 and didn't get the error.
> I can't see a call to add_linkage_type at line 1262 in DBEntryAdaptor in version 62 either.
>
> Can you add these two lines to your code, to get the API version you're running:
> use Bio::EnsEMBL::ApiVersion;
> printf( "The API version used is %s\n", software_version() );
>
>
> Regards
> Monika
>
> On 12 Jun 2011, at 18:46, BURT David wrote:
>
>
> any more ideas on problem below?
>
> made a few changes - still not working on my system (tried two PCs)
>
> interesting - I can get $dbe->display_id() but nothing from $dbe->dbname()
> also able to get versions, release and other parameters but no dbname (this is w=oine of the things I wanted)
> so looks like the external database name is not being assigned
>
> however Bert and Daniel get the simple script to work
>
> I have re-sinatlled v62 - still odd behaviour
>
> "Can't locate object method "add_linkage_type" via package "Bio::EnsEMBL::IdentityXref"
> at /cygdrive/c/Bioinformatics/Ensembl/src/ensembl/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm line 1262."
>
> where there is no add_linkage_type metrhod in Bio::EnsEMBL::IdentityXref
>
> so I think must be earlier problem related to dbname not being assigned
>
> must be something with my setup?
>
>
>
> Recently ran a "simple" test of my Ensembl perl api install using an example from the core tutorial - to list external database entries.
>
> Perl program and output is attached and below.
>
> PERL SCRIPT
> ==========
>
> #!/bin/perl.exe -w
>
> use strict;
>
> use Bio::EnsEMBL::Registry;
> my $registry = 'Bio::EnsEMBL::Registry';
> $registry->load_registry_from_db(-host => 'ensembldb.ensembl.org', -user => 'anonymous');
>
> print $gene_adaptor->dbc->dbname."\n";
> print $gene_adaptor->dbc->port."\n\n";
>
> # Define a helper subroutine to print DBEntries
> sub print_DBEntries
> {
> my $db_entries = shift;
>
> foreach my $dbe ( @{$db_entries} ) {
> printf "\tXREF %s (%s)\n", $dbe->display_id(), $dbe->dbname();
> }
> }
>
> my $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );
>
> # Get the 'COG6' gene from human
> my $gene = $gene_adaptor->fetch_by_display_label('COG6');
>
> print "GENE ", $gene->stable_id(), "\n";
> print_DBEntries( $gene->get_all_DBEntries() );
>
> foreach my $transcript ( @{ $gene->get_all_Transcripts() } ) {
> print "TRANSCRIPT ", $transcript->stable_id(), "\n";
> print_DBEntries( $transcript->get_all_DBEntries() );
>
> # Watch out: pseudogenes have no translation
> if ( defined $transcript->translation() ) {
> my $translation = $transcript->translation();
>
> print "TRANSLATION ", $translation->stable_id(), "\n";
> print_DBEntries( $translation->get_all_DBEntries() );
> }
> }
>
>
> OUTPUT
> ======
>
> homo_sapiens_core_62_37g
> 5306
>
> GENE ENSG00000133103
> Use of uninitialized value in printf at test.pl line 39.
> XREF OTTHUMG00000016768 ()
> Use of uninitialized value in printf at test.pl line 39.
> XREF COG6 ()
> TRANSCRIPT ENST00000416691
>
> Can't locate object method "add_linkage_type" via package "Bio::EnsEMBL::IdentityXref"
> at /cygdrive/c/Bioinformatics/Ensembl/src/ensembl/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm line 1262.
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> <dbentry_errors.txt><dbentry_test.pl>_______________________________________________
> 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/
> _______________________________________________
> 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/
>
> Monika Komorowska
> EnsEMBL Software Developer
>
> European Bioinformatics Institute (EMBL-EBI)
> tel: +44(0) 1233 494 409
>
>
> Monika Komorowska
> EnsEMBL Software Developer
>
> European Bioinformatics Institute (EMBL-EBI)
> tel: +44(0) 1233 494 409
>
Monika Komorowska
EnsEMBL Software Developer
European Bioinformatics Institute (EMBL-EBI)
tel: +44(0) 1233 494 409
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20110613/1c170bae/attachment.html>
More information about the Dev
mailing list