<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple style='word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space'><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Monika,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Many thanks – I think we are getting close.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>1_Attached is my copy of </span>DBEntryAdaptor found in D:\Bioinformatics\Ensembl\src\ensembl\modules\Bio\EnsEMBL\DBSQL<span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal>As you can see “add_linkage_type” is at line 1263 in DBEntryAdaptor in this version 62<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here’s an extract [since file too big for dev list]<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>      if (    defined($linkage_type)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>           && $linkage_type ne ""<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>           && !$linkage_types{$refID}->{$linkage_key} )<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>      {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>        $source_xref = ( defined($source_xref_id)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>                            ? $self->fetch_by_dbID($source_xref_id)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>                            : undef );<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>        $seen{$refID}<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>          ->add_linkage_type( $linkage_type, $source_xref || () );<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>        $linkage_types{$refID}->{$linkage_key} = 1;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>      }<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>    } ## end while ( my $arrRef = shift...<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>  } ## end while ( my $rowcache = $sth...<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>2_This was downloaded using instructions from Ensembl (see below) using CVS<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>$ cvs -d :pserver:cvsuser@cvs.sanger.ac.uk:/cvsroot/ensembl login<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Logging in to :pserver:cvsuser@cvs.sanger.ac.uk:2401/cvsroot/ensembl<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>CVS password: CVSUSER<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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: <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>$ cvs -d :pserver:cvsuser@cvs.sanger.ac.uk:/cvsroot/ensembl checkout -r branch-ensembl-62 ensembl-api<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>3_However, I found an old install – based on version 56 – this worked up to version 59, but software failed after that.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Any more thoughts? Looks like my version 62 is wrong?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Dave<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Professor David W. Burt<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Chair of Comparative Genomics<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Dept. Genomics and Genetics<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>The Roslin Institute and Royal (Dick) School of Veterinary  Studies <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>The Roslin Institute Building<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>University of Edinburgh <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Easter Bush Campus<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Midlothian EH25 9RG<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Phone: +44 (0)131 651 9216<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Lab:   +44 (0)131 651 9380<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Fax:   +44 (0)131 651 9105<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Email: <a href="mailto:Dave.Burt@roslin.ed.ac.uk">Dave.Burt@roslin.ed.ac.uk</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>WWW site: <a href="http://www.roslin.ed.ac.uk/dave-burt/">http://www.roslin.ed.ac.uk/dave-burt/</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>The 6th International chick meeting - Edinburgh: <a href="http://www.roslin.ed.ac.uk/chick6/">http://www.roslin.ed.ac.uk/chick6/</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>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<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Monika Komorowska [mailto:monika@ebi.ac.uk] <br><b>Sent:</b> 13 June 2011 11:01<br><b>To:</b> BURT David<br><b>Cc:</b> dev@ensembl.org<br><b>Subject:</b> Re: [ensembl-dev] FW: ensembl api query<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi David<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Are you sure you're using version 62, I just tried your script on 62 and didn't get the error.<o:p></o:p></p></div><div><p class=MsoNormal>I can't see a call to add_linkage_type at line 1262 in DBEntryAdaptor in version 62 either.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Can you add these two lines to your code, to get the API version you're running:<o:p></o:p></p></div><div><div><div style='border:dotted windowtext 1.0pt;padding:0cm 0cm 0cm 0cm'><pre style='margin-bottom:12.0pt;z-index:auto' id=podParagraph><span style='font-family:Courier'>use Bio::EnsEMBL::ApiVersion;<o:p></o:p></span></pre><pre><span style='font-family:Courier'>  printf( "The API version used is %s\n", software_version() );<o:p></o:p></span></pre></div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Regards<o:p></o:p></p></div><div><p class=MsoNormal>Monika<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On 12 Jun 2011, at 18:46, BURT David wrote:<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>any more ideas on problem below?<br><br>made a few changes - still not working on my system (tried two PCs)<br><br>interesting - I can get $dbe->display_id() but nothing from $dbe->dbname()<br>also able to get versions, release and other parameters but no dbname (this is w=oine of the things I wanted)<br>so looks like the external database name is not being assigned<br><br>however Bert and Daniel get the simple script to work<br><br>I have re-sinatlled v62 - still odd behaviour<br><br>"Can't locate object method "add_linkage_type" via package "Bio::EnsEMBL::IdentityXref"<br>at /cygdrive/c/Bioinformatics/Ensembl/src/ensembl/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm line 1262."<br><br>where there is no add_linkage_type metrhod in Bio::EnsEMBL::IdentityXref<br><br>so I think must be earlier problem related to dbname not being assigned<br><br>must be something with my setup?<br><br><br><br>Recently ran a "simple" test of my Ensembl perl api install using an example from the core tutorial - to list external database entries.<br><br>Perl program and output is attached and below.<br><br>PERL SCRIPT<br>==========<br><br>#!/bin/perl.exe -w<br><br>use strict;<br><br>use Bio::EnsEMBL::Registry;<br>my $registry = 'Bio::EnsEMBL::Registry';<br>$registry->load_registry_from_db(-host => 'ensembldb.ensembl.org', -user => 'anonymous');<br><br>print $gene_adaptor->dbc->dbname."\n";<br>print $gene_adaptor->dbc->port."\n\n";<br><br># Define a helper subroutine to print DBEntries<br>sub print_DBEntries<br>{<br>   my $db_entries = shift;<br><br>   foreach my $dbe ( @{$db_entries} ) {<br>       printf "\tXREF %s (%s)\n", $dbe->display_id(), $dbe->dbname();<br>   }<br>}<br><br>my $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );<br><br># Get the 'COG6' gene from human<br>my $gene = $gene_adaptor->fetch_by_display_label('COG6');<br><br>print "GENE ", $gene->stable_id(), "\n";<br>print_DBEntries( $gene->get_all_DBEntries() );<br><br>foreach my $transcript ( @{ $gene->get_all_Transcripts() } ) {<br>   print "TRANSCRIPT ", $transcript->stable_id(), "\n";<br>   print_DBEntries( $transcript->get_all_DBEntries() );<br><br>   # Watch out: pseudogenes have no translation<br>   if ( defined $transcript->translation() ) {<br>       my $translation = $transcript->translation();<br><br>       print "TRANSLATION ", $translation->stable_id(), "\n";<br>       print_DBEntries( $translation->get_all_DBEntries() );<br>   }<br>}<br><br><br>OUTPUT<br>======<br><br>homo_sapiens_core_62_37g<br>5306<br><br>GENE ENSG00000133103<br>Use of uninitialized value in printf at <a href="http://test.pl">test.pl</a> line 39.<br>       XREF OTTHUMG00000016768 ()<br>Use of uninitialized value in printf at <a href="http://test.pl">test.pl</a> line 39.<br>       XREF COG6 ()<br>TRANSCRIPT ENST00000416691<br><br>Can't locate object method "add_linkage_type" via package "Bio::EnsEMBL::IdentityXref"<br>at /cygdrive/c/Bioinformatics/Ensembl/src/ensembl/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm line 1262.<br><br><br><br>-- <br>The University of Edinburgh is a charitable body, registered in<br>Scotland, with registration number SC005336.<br><br><dbentry_errors.txt><dbentry_test.pl>_______________________________________________<br>Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>List admin (including subscribe/unsubscribe): <a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog: <a href="http://www.ensembl.info/">http://www.ensembl.info/</a><br>_______________________________________________<br>Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>List admin (including subscribe/unsubscribe): <a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog: <a href="http://www.ensembl.info/">http://www.ensembl.info/</a><o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>Monika Komorowska<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>EnsEMBL Software Developer<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>European Bioinformatics Institute (EMBL-EBI)<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>tel: +44(0) 1233 494 409<o:p></o:p></span></p></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>