<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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 class="Apple-tab-span" style="white-space:pre">     </span>42471050<span class="Apple-tab-span" style="white-space:pre">    </span>rs919390<span class="Apple-tab-span" style="white-space:pre">    </span>G<span class="Apple-tab-span" style="white-space:pre">   </span>C<span class="Apple-tab-span" style="white-space:pre">   </span>68571.33<span class="Apple-tab-span" style="white-space:pre">    </span>PASS<span class="Apple-tab-span" style="white-space:pre">        </span>AC=179;AF=0.6938;AN=258;DB;DP=3624;Dels=0.00;HRun=0;set=variant2-variant<span class="Apple-tab-span" style="white-space:pre">    </span>GT:AD:DP:GQ:PL<span class="Apple-tab-span" style="white-space:pre">      </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 class="Apple-tab-span" style="white-space:pre">    </span>print_line($config, $_) foreach @{get_all_consequences($config, \@vfs, $tr_cache, $rf_cache)};</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </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 class="Apple-tab-span" style="white-space:pre">  </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 class="Apple-tab-span" style="white-space:pre">        </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 class="Apple-tab-span" style="white-space:pre">     </span>3. third variant 19:42471050 $rf_cache is passed with the empty references to {MotifFeature} and {RegulatoryFeature}. </div><div><span class="Apple-tab-span" style="white-space:pre">      </span>at line 2178 in VEP.pm  build_slice_cache is called because $slice_cache has no type.</div><div><span class="Apple-tab-span" style="white-space:pre">   </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 class="Apple-tab-span" style="white-space:pre">        </span>$tr_cache->{$chr} is a HASH (not an ARRAY)</div><div><span class="Apple-tab-span" style="white-space: pre; ">             </span>->{MotifFeature} ARRAY (empty)</div><div><span class="Apple-tab-span" style="white-space: pre; ">         </span>->{RegulatoryFeature} ARRAY (empty)</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>scalar @{$tr_cache->{$chr}} fails with error</div><div><div><span class="Apple-tab-span" style="white-space:pre">   </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></body></html>