<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)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0mm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-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:0mm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0mm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0mm;
        margin-right:0mm;
        margin-bottom:0mm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.k
        {mso-style-name:k;}
span.nf
        {mso-style-name:nf;}
span.p
        {mso-style-name:p;}
span.nv
        {mso-style-name:nv;}
span.o
        {mso-style-name:o;}
span.nn
        {mso-style-name:nn;}
span.n
        {mso-style-name:n;}
span.s
        {mso-style-name:s;}
.MsoChpDefault
        {mso-style-type:export-only;}
@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="2050" />
</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-NZ link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have just upgraded the my local Ensembl instance to the latest (from version 69 to version 74), and I have a question regarding how to handle species with no DAS url.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In version 69 having no DAS registry URL specified was no problem, but with version 74 this causes Ensembl to break, as explained below.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Why it breaks:<o:p></o:p></p><p class=MsoNormal>At SpeciesDefs.pm line 533:<o:p></o:p></p><p class=MsoNormal><a href="https://github.com/Ensembl/ensembl-webcode/blob/release/74/modules/EnsEMBL/Web/SpeciesDefs.pm#L533">https://github.com/Ensembl/ensembl-webcode/blob/release/74/modules/EnsEMBL/Web/SpeciesDefs.pm#L533</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>sub _merge_db_tree {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>  my ($self, $tree, $db_tree, $key) = @_;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>  Hash::Merge::set_behavior('RIGHT_PRECEDENT');<o:p></o:p></span></p><p class=MsoNormal style='background:#FFFFCC'><span style='font-size:10.0pt;font-family:"Courier New"'>  my $t = merge($tree->{$key}, $db_tree->{$key});<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>  $tree->{$key} = $t;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>When no DAS is available <span style='font-size:10.0pt;font-family:"Courier New"'>$db_tree->{$key} </span>returns ‘undef’ when $dbtree is a das_tree object, which overwrites (due to RIGHT PRECEDENT merge behaviour) the original $tree, thus returning an empty tree which is later stored. This results in the main config file config.packed having missing hash values which should have been loaded from the species.ini/DEAFULTS.ini config files.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have found 2 solutions(outlined at the end of this email) however both solutions involve altering the Ensembl code in SpecesDefs.pm, which I would rather not do. So is there some other way to disable the DAS so this doesn’t happen, perhaps in the species.ini/DEAFULTS.ini or SiteDefs.pm?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have tried un-setting the 'DAS_REGISTRY_URL' in DEFAULTS.ini, which does stop Ensembl trying to connect to the default DAS registry, but does not prevent the afore-mentioned behaviour.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>(Hacky) solutions I have found:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>1. Change merge precedence at SpeciesDefs.pm line 532:<o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>        Hash::Merge::set_behavior('RIGHT_PRECEDENT');<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>        To<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>        Hash::Merge::set_behavior(LEFT_PRECEDENT');<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>        * This means the original config tree has priority over any DAS config<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>2. Only try to process DAS if a DAS_REGISTRY_URL is available<o:p></o:p></p><p class=MsoNormal>                    * best way to do this seems to be to test for the URL at SpeciesDefs.pm line 630:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-left:36.0pt'><span style='font-family:"Courier New"'>    if ($species ne 'MULTI') {<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span style='font-family:"Courier New"'>      $self->process_ini_files($species, 'das', $config_packer, $defaults);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span style='font-family:"Courier New"'>      $self->_merge_db_tree($tree, $das_tree, $species);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span style='font-family:"Courier New"'>    }<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>                    * Change <o:p></o:p></p><p class=MsoNormal>                    <span style='font-family:"Courier New"'>if ($species ne 'MULTI')<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>       </span>to<o:p></o:p></p><p class=MsoNormal><span style='font-family:"Courier New"'>       if ($tree->{$species}{'DAS_REGISTRY_URL'} && $species ne 'MULTI')</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>N.B. These snippets of SpeciesDefs.pm code do not seem to have changed since version 69, so something else must have changed to cause this issue, though I cannot find what that change is... Also this issue exists in version 73 as well (I tried that for comparison).<span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>Kind Regards<span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Ben Warren</span></b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Research Technologist<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><div><p class=MsoNormal><a href="http://www.plantandfood.co.nz/"><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:blue;text-decoration:none'><img border=0 width=210 height=70 id="_x0000_i1025" src="cid:image001.gif@01CF113E.2BEC6170" alt="Plant & Food Research"></span></a><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='font-size:8.5pt;font-family:"Arial","sans-serif"'>T: +64 9 925 8615<br>F: +64 9 925 7001<br>E: ben.warren@plantandfood.co.nz<br>www.plantandfood.co.nz<br>The New Zealand Institute for Plant & Food Research Limited<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><div><p class=MsoNormal><b><span style='font-size:8.5pt;font-family:"Arial","sans-serif"'>Postal Address:</span></b><span style='font-size:8.5pt;font-family:"Arial","sans-serif"'> Plant & Food Research<br>Private Bag 92169, Auckland Mail Centre, Auckland, 1142, New Zealand<br></span><b><span style='font-size:8.5pt;font-family:"Arial","sans-serif"'>Physical Address:</span></b><span style='font-size:8.5pt;font-family:"Arial","sans-serif"'> Plant & Food Research<br>120 Mt Albert Road, Sandringham, Auckland, 1025, New Zealand<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>
<table><tr><td bgcolor=#ffffff><font color=#000000><pre>The contents of this e-mail are confidential and may be subject to legal privilege.
 If you are not the intended recipient you must not use, disseminate, distribute or
 reproduce all or any part of this e-mail or attachments.  If you have received this
 e-mail in error, please notify the sender and delete all material pertaining to this
 e-mail.  Any opinion or views expressed in this e-mail are those of the individual
 sender and may not represent those of The New Zealand Institute for Plant and
 Food Research Limited.</pre></font></td></tr></table>