<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello Will, <div><br></div><div>I tried that option already - it’s correct, the adaptors.gz file does not get written, however the option does not prevent that the adaptor information is written into the other index files - like the sequence ones… … </div><div><br></div><div><font face="Menlo">zcat homo_sapiens/74/1/230000001-231000000.gz | less</font></div><div><font face="Menlo"><br></font></div><div><div><font face="Menlo">S{</font></div><div><font face="Menlo">    package Bio::EnsEMBL::DBSQL::DBConnection;</font></div><div><font face="Menlo">    use strict 'refs';</font></div><div><font face="Menlo">    $arg;</font></div><div><font face="Menlo">}</font></div><div><br></div><div>I also tried the <font face="Menlo"><b>—strip</b></font> option in the hope that the DBadaptor info does not get written, however it’s not doing it :-( </div><div><br></div><div><br></div><div>I’ve added a line to strip_transcript_cache as it was keeping the Translation Adaptor … now it works. </div><div>I just sent you a pull request for the e74 checkout.  Below my change: </div><div><br></div><div><br></div><div><div><font face="Menlo">    sub strip_transcript_cache {</font></div><div><font face="Menlo">        my $config = shift;</font></div><div><font face="Menlo">        my $cache = shift;</font></div><div><font face="Menlo"><br></font></div><div><font face="Menlo">        foreach my $chr(keys %$cache) {</font></div><div><font face="Menlo">            foreach my $tr(@{$cache->{$chr}}) {</font></div><div><font face="Menlo">                foreach my $exon(@{$tr->{_trans_exon_array}}) {</font></div><div><font face="Menlo">                    delete $exon->{slice}->{adaptor};</font></div><div><font face="Menlo"><br></font></div><div><font face="Menlo">                    for(qw(adaptor created_date modified_date is_current version is_constitutive _seq_cache dbID slice)) {</font></div><div><font face="Menlo">                        delete $exon->{$_};</font></div><div><font face="Menlo">                    }</font></div><div><font face="Menlo">                }</font></div><div><font face="Menlo"><br></font></div><div><font face="Menlo">                delete $tr->{adaptor};</font></div><div><font face="Menlo">                delete $tr->{slice}->{adaptor};</font></div><div><font face="Menlo">                <font color="#b92d5d"><b>## jhv change to NOT store the adaptor in the dumped files.</b></font> </font></div><div><font face="Menlo">                <b><font color="#9a244f">delete $tr->{translation}->{adaptor} if defined($tr->{translation});</font></b></font></div><div><font face="Menlo">            }</font></div><div><font face="Menlo">        }</font></div><div><font face="Menlo">    }</font></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Thanks for your support, </div><div><br></div><div>    Jan </div><div><br></div><div><br></div><div><div>On Mar 3, 2015, at 1:16 AM, Will McLaren <<a href="mailto:wm2@ebi.ac.uk">wm2@ebi.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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"><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 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>
_______________________________________________<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">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog: <a href="http://www.ensembl.info/">http://www.ensembl.info/</a><br></blockquote></div><br></div></body></html>