<div dir="ltr">Hi Jan,<div><br></div><div>If you add the flag --no_adaptor_cache to your command it should work OK.</div><div><br></div><div>This has been fixed in a newer version of VEP, but I guess you're tied to 74.</div><div><br></div><div>Regards</div><div><br></div><div>Will</div><div><br></div><div>More info: it's not the version of Storable that is the issue, it's that Storable is trying to serialise a DBI object that has an active connection to the database. The VEP's serialisation code takes care of this by disconnecting from the DB before the object gets serialised, but in this case it doesn't work (and FWIW caching in the adaptors is no longer necessary anyway, this behaviour should have been made the default way before 74).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 March 2015 at 05:55, Jan Vogel <span dir="ltr"><<a href="mailto:jan.vogel@gmail.com" target="_blank">jan.vogel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div><br></div><div>Hello Ensembl and Will,</div><div><br></div><div>I’m running into trouble when I am trying to <b>create / update my cache files</b> for VEP. </div><div><br></div><div>My best guess currently is, that the problem is either related to the ensembl code, or related to storing references with <b>Storable.pm</b> - I’m using version <b>$VERSION = ‘2.41’ of this module.</b></div><div><br></div><div><b>Here’s how to reproduce the error :</b></div><div><br></div><div><div><font face="Menlo">perl  ensembl-tools-release-74/scripts/variant_effect_predictor/<a href="http://variant_effect_predictor.pl" target="_blank">variant_effect_predictor.pl</a> \</font></div><div><font face="Menlo">       -build all -dir tmp --verbose --host <HOST> --user <USER> --pass <SECRET> --port 3326</font></div></div><div><font face="Menlo"><br></font></div><div><font face="Menlo">ERROR: </font></div><div><font face="Menlo"><br></font></div><div><div style="font-family:Menlo">2015-03-02 20:56:27 - Connected to core version 74 database and variation version 74 database</div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo">Can't store CODE items at …/perl/5.18.2/x86_64-linux-2.6-rhel6/lib/5.18.2/x86_64-linux-thread-multi/Storable.pm line 304, at </div><div style="font-family:Menlo">variant_effect_predictor/e74_api/ensembl-variation-release-74/modules/Bio/EnsEMBL/Variation/Utils/VEP.pm line 4261.</div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo"><br></div><div>So reading trough <a href="http://perldoc.perl.org/Storable.html#CODE-REFERENCES" target="_blank">http://perldoc.perl.org/Storable.html#CODE-REFERENCES</a> suggests to serialize code-references with B::Deparse. I’ve added 2 lines to the <a href="http://variant_effect_predictor.pl" target="_blank">variant_effect_predictor.pl</a> script: </div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo"><span style="color:rgb(0,104,139);font-family:monospace;font-size:12.4800004959106px;background-color:rgb(238,238,221)">$Storable::Eval=1; </span></div><div style="font-family:Menlo"><div><span style="color:rgb(0,104,139);font-family:monospace;font-size:12.4800004959106px;background-color:rgb(238,238,221)">$Storable::Deparse=1; </span></div></div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo"><br></div><div>Now, the script writes the binary cache files - however, the next problem occurs when I try to read them. </div><div><br></div><div>Depending on which version of the Ensembl API I am using, I get these error messages: </div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo"><b>e75: </b></div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo"><div>2015-03-02 21:42:33 - Reading cached adaptor data</div><div>code sub {</div><div>    package Bio::EnsEMBL::DBSQL::DBConnection;</div><div>    use strict;</div><div>    $args[0];</div><div>} caused an error: Global symbol "@args" requires explicit package name at (eval 108) line 4</div></div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo"><b>e74:</b></div><div style="font-family:Menlo"><div>2015-03-02 21:47:40 - Reading cached adaptor data</div><div>code sub {</div><div>    package Bio::EnsEMBL::DBSQL::DBConnection;</div><div>    use strict;</div><div>    $arg;</div><div>} caused an error: Global symbol "$arg" requires explicit package name at (eval 130) line 4, at /gne/research/apps/ensembl/ensembl-74/ensembl-variation/modules/Bio/EnsEMBL/Variation/Utils/VEP.pm line 4281.</div><div><br></div><div>I’ve tried various work-arounds and different ensembl versions, but did not succeed. Any help welcome.</div><div><br></div><div><br></div><div>The database I am currently working on is an e67 core which has been patched up to e74 ( so i can’t use the e74 cache files from the web). </div><div><br></div><div>I tried to build indices with e77 but did not succeed either. </div></div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo"><br></div><div style="font-family:Menlo">Any help welcome </div><span class="HOEnZb"><font color="#888888"><div style="font-family:Menlo"><br></div><div style="font-family:Menlo">   Jan Vogel </div><div style="font-family:Menlo"><br></div></font></span></div></div><br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>