<div dir="ltr">Hi Michael,<div><br></div><div>I'm not sure why this error is occurring, but the VEP stores a reference to the slice adaptor which you can access from your plugin as:</div><div><br></div><div>$self->{config}->{sa}</div>
<div><br></div><div>There are a number of adaptors stored in this way; the references are created in the get_adaptors sub-routine in <a href="http://variant_effect_predictor.pl">variant_effect_predictor.pl</a></div><div><br>
</div><div>The second warning is nothing to worry about. The line:</div><div><br></div><div>Bio::EnsEMBL::Utils::Exception::verbose(1999)<br></div><div><br></div><div>in <a href="http://variant_effect_predictor.pl">variant_effect_predictor.pl</a> should suppress this warning from happening, but currently this happens after the sub-routine configure_plugins is run, so if your plugin creates an adaptor with no_slice_cache enabled you will see the warning.</div>
<div><br></div><div>I'll update the script so the warning gets suppressed before configure_plugins runs.</div><div><br></div><div>Cheers</div><div><br></div><div>Will</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 14 November 2013 22:56, Michael Yourshaw <span dir="ltr"><<a href="mailto:myourshaw@ucla.edu" target="_blank">myourshaw@ucla.edu</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"><font face="Monaco" size="1">I normally use a local copy of the mySQL database to process large datasets. Some of my plugins make calls to the Ensembl database via the Perl API.</font><div>
<font face="Monaco" size="1"><br></font><font face="Monaco" size="1">VEP runs normally without the cache.<br></font><div><font face="Monaco" size="1"><br></font></div><div>I want to take advantage of some of the options available only through the cache, such as <span style="font-family:Monaco;font-size:10px">maf_esp, and possibly improve throughput, but still get everything not in the cache from the local database.</span><div>
<font face="Monaco" size="1"><br></font></div><div><div><font face="Monaco" size="1">I have downloaded and installed the homo_sapiens_73 cache, and use these parameters:</font></div><div><div style="margin:0px;font-size:10px;font-family:Monaco">
<span style="white-space:pre-wrap">     </span>cache=1</div><div style="margin:0px"><div style="font-family:Monaco;font-size:10px;margin:0px"><span style="white-space:pre-wrap">   </span>dir_cache=/scratch1/tmp/myourshaw/ensembl/.vep/</div>
<div style="font-family:Monaco;font-size:10px;margin:0px">-—offline is not on</div><div style="font-family:Monaco;font-size:10px;margin:0px"><br></div><div style="font-family:Monaco;font-size:10px;margin:0px">There are two problems when I turn on the cache.</div>
<div style="font-family:Monaco;font-size:10px;margin:0px"><br></div><div style="font-family:Monaco;font-size:10px;margin:0px">First, some of my plugins get an error in Bio::EnsEMBL::DBSQL::GeneAdaptor in the fetch_nearest_Gene_by_Feature sub at the line</div>
<div style="font-family:Monaco;font-size:10px;margin:0px"><span style="white-space:pre-wrap">   </span>my $seq_region_id = $feat->slice->adaptor->get_seq_region_id($feat->slice);</div><div style="font-family:Monaco;font-size:10px;margin:0px">
<br></div><div style="font-family:Monaco;font-size:10px;margin:0px">The error is</div><div style="font-family:Monaco;font-size:10px;margin:0px"><span style="white-space:pre-wrap">   </span>Can't call method "get_seq_region_id" on an undefined value at /share/apps/myourshaw/ensembl/ensembl/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm line 1978.</div>
<div style="font-family:Monaco;font-size:10px;margin:0px"><br></div><div style="font-family:Monaco;font-size:10px;margin:0px">Specifically, $feat->slice->adapter is undef</div><div style="font-family:Monaco;font-size:10px;margin:0px">
<br></div><div style="font-family:Monaco;font-size:10px;margin:0px">The call in my code that triggers this is:</div><div style="font-family:Monaco;font-size:10px;margin:0px">sub run {</div><div style="margin:0px"><div style="margin:0px">
<font face="Monaco" size="1">    my ($self, $bvfoa, $line_hash) = @_;</font></div><div><div><font face="Monaco" size="1">    if($bvfoa->isa('Bio::EnsEMBL::Variation::RegulatoryFeatureVariationAllele')){</font></div>
<div><span style="font-family:Monaco;font-size:x-small">        my $feature = $bvfoa->regulatory_feature;</span></div><div><span style="font-family:Monaco;font-size:x-small"><span style="white-space:pre-wrap">        </span># </span><span style="font-family:Monaco;font-size:10px">At this point, $feature->slice->adapter is undef and the next line fails</span></div>
<div><font face="Monaco" size="1">        my $nearest_genes = $config->{ga}->fetch_nearest_Gene_by_Feature($feature);</font></div><div><font face="Monaco" size="1">        my $gene = @{$nearest_genes}[0];</font></div>
<div><font face="Monaco" size="1">    }</font></div><div><br></div></div></div></div><div><div><font face="Monaco" size="1">Second, I get the following warning when VEP initializes. Is this related to the first problem? Should I be concerned?</font></div>
<div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">        </span>MSG: You are using the API without caching most recent features. Performance might be affected.</div><div style="margin:0px;font-size:10px;font-family:Monaco">
<span style="white-space:pre-wrap">     </span>FILE: EnsEMBL/DBSQL/BaseFeatureAdaptor.pm LINE: 76</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">        </span>CALLED BY: Bio/EnsEMBL/Registry.pm  LINE: 1043</div>
<div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">   </span>Date (localtime)    = Thu Nov 14 11:52:27 2013</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">  </span>Ensembl API version = 73</div>
</div><div><br></div><div><div><span style="border-collapse:separate;font-size:12px;border-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:10px;white-space:normal;font-family:'Lucida Grande';word-spacing:0px"><p class="MsoNormal">
<font face="'Devanagari MT'" size="7"><span style="font-size:27px"><font face="'Lucida Grande'" size="3"><span style="font-size:12px"><br></span></font><font size="5"><span style="font-size:18px">ॐ</span></font></span></font></p>
</span><p></p><p style="margin-top:0px;margin-right:0px;margin-bottom:6px;margin-left:0px;line-height:19px;font:normal normal normal 16px/normal Helvetica"><span style="font-family:'Lucida Grande';font-size:10px">Michael Yourshaw</span></p>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'"><span style="letter-spacing:0px">UCLA Geffen School of Medicine</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'">
<span style="letter-spacing:0px">Department of Human Genetics, Nelson Lab</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'">
<span style="letter-spacing:0px">695 Charles E Young Drive S</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'"><span style="letter-spacing:0px">Gonda 5554</span></div>
<p style="margin-top:0px;margin-right:0px;margin-bottom:3px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'"><span style="letter-spacing:0px">Los Angeles CA 90095-8348 USA</span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:3px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande';color:rgb(0,0,153)">
<span style="text-decoration:underline;letter-spacing:0px"><a href="mailto:myourshaw@ucla.edu" target="_blank">myourshaw@ucla.edu</a></span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:6px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'">
<span style="letter-spacing:0px"><a href="tel:970.691.8299" value="+19706918299" target="_blank">970.691.8299</a></span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:6px;margin-left:0px;font:normal normal normal 9px/normal 'Lucida Grande'">
<span style="letter-spacing:0px">This message is intended only for the use of the addressee and may contain information that is PRIVILEGED and CONFIDENTIAL, and/or may contain ATTORNEY WORK PRODUCT. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Thank you.</span></p>
<div><font size="1"><span style="font-size:9px"><br></span></font></div></span><br><br></span></span>
</div>
<br></div></div></div></div></div></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>