Hi Michael<div><br></div><div>I have already patched a fix for this into the CVS tree.<span></span></div><div><br></div><div>If you update your 67 branch of ensembl-variation it should work fine again.</div><div><br></div>
<div>Thanks for your help!</div><div><br></div><div>Will</div><div><br>On Wednesday, 13 June 2012, Michael Yourshaw  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">The attached 3 variant file causes "Not an ARRAY reference" error in VEP.pm sub build_slice_cache.<div><br></div><div>The error happens at VCF line:<div>19<span style="white-space:pre-wrap">        </span>42471050<span style="white-space:pre-wrap">        </span>rs919390<span style="white-space:pre-wrap">        </span>G<span style="white-space:pre-wrap">       </span>C<span style="white-space:pre-wrap">       </span>68571.33<span style="white-space:pre-wrap">        </span>PASS<span style="white-space:pre-wrap">    </span>AC=179;AF=0.6938;AN=258;DB;DP=3624;Dels=0.00;HRun=0;set=variant2-variant<span style="white-space:pre-wrap">        </span>GT:AD:DP:GQ:PL<span style="white-space:pre-wrap">  </span>...</div>
<div><br></div><div>However, curiously, the error does not happen unless the two preceeding lines are also present.</div><div><br></div><div><div><div><div><div>As best I can figure out, this is what is happening as each variant is processed by the VEP perl script at the line</div>
<div><span style="white-space:pre-wrap">  </span>print_line($config, $_) foreach @{get_all_consequences($config, \@vfs, $tr_cache, $rf_cache)};</div><div><br></div><div><span style="white-space:pre-wrap">  </span>1. first variant 19:42463050 $rf_cache is empty, and returns from get_all_consequences with {MotifFeatures} having an array of 4 items and {RegulatoryFeatures} having an array of 2 items.</div>
<div><br></div><div><span style="white-space:pre-wrap"> </span>2. second variant 19:42471049 the populated $rf_cache is passed to get_all_consequences. prune_cache removes the contents of {MotifFeature} and {RegulatoryFeature} from $rf_cache but leaves it populated with empty references to {MotifFeature} and {RegulatoryFeature}. Perhaps this is the Bad Thing.</div>
<div><span style="white-space:pre-wrap">  </span>at line 2178 in VEP.pm build_slice_cache is not called because $slice_cache is a HASH (empty), so no error is generated</div><div><br></div><div><span style="white-space:pre-wrap"> </span>3. third variant 19:42471050 $rf_cache is passed with the empty references to {MotifFeature} and {RegulatoryFeature}. </div>
<div><span style="white-space:pre-wrap">  </span>at line 2178 in VEP.pm  build_slice_cache is called because $slice_cache has no type.</div><div><span style="white-space:pre-wrap">    </span>build_slice_cache then fails at line 2920 in  $slice_cache{$chr} = scalar @{$tr_cache->{$chr}} ? $tr_cache->{$chr}[0]->slice : &get_slice($config, $chr);</div>
<div><div><div><div><br></div><div><span style="white-space:pre-wrap">        </span>$tr_cache->{$chr} is a HASH (not an ARRAY)</div><div><span style="white-space:pre-wrap">            </span>->{MotifFeature} ARRAY (empty)</div><div>
<span style="white-space:pre-wrap">             </span>->{RegulatoryFeature} ARRAY (empty)</div><div><br></div><div><span style="white-space:pre-wrap">  </span>scalar @{$tr_cache->{$chr}} fails with error</div><div><div><span style="white-space:pre-wrap">       </span>Not an ARRAY reference at /share/apps/myourshaw/ensembl/ensembl-variation/modules/Bio/EnsEMBL/Variation/Utils/VEP.pm line 2920, <GEN1> line 150.</div>
</div></div></div></div><div><br></div><div>I haven’t figured out what exactly is going on with $slice_cache, but I hope this helps.</div><div><br></div><div></div></div></div></div></div></div></div></blockquote></div>