[ensembl-dev] Not an ARRAY reference error in VEP.pm

Will McLaren wm2 at ebi.ac.uk
Wed Jun 13 08:37:40 BST 2012


Hi Michael

I have already patched a fix for this into the CVS tree.

If you update your 67 branch of ensembl-variation it should work fine again.

Thanks for your help!

Will

On Wednesday, 13 June 2012, Michael Yourshaw wrote:

> The attached 3 variant file causes "Not an ARRAY reference" error in
> VEP.pm sub build_slice_cache.
>
> The error happens at VCF line:
> 19 42471050 rs919390 G C 68571.33 PASS
> AC=179;AF=0.6938;AN=258;DB;DP=3624;Dels=0.00;HRun=0;set=variant2-variant
> GT:AD:DP:GQ:PL ...
>
> However, curiously, the error does not happen unless the two preceeding
> lines are also present.
>
> As best I can figure out, this is what is happening as each variant is
> processed by the VEP perl script at the line
> print_line($config, $_) foreach @{get_all_consequences($config, \@vfs,
> $tr_cache, $rf_cache)};
>
> 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.
>
> 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.
> at line 2178 in VEP.pm build_slice_cache is not called because
> $slice_cache is a HASH (empty), so no error is generated
>
> 3. third variant 19:42471050 $rf_cache is passed with the empty references
> to {MotifFeature} and {RegulatoryFeature}.
> at line 2178 in VEP.pm  build_slice_cache is called because $slice_cache
> has no type.
> 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);
>
> $tr_cache->{$chr} is a HASH (not an ARRAY)
> ->{MotifFeature} ARRAY (empty)
> ->{RegulatoryFeature} ARRAY (empty)
>
> scalar @{$tr_cache->{$chr}} fails with error
> Not an ARRAY reference at
> /share/apps/myourshaw/ensembl/ensembl-variation/modules/Bio/EnsEMBL/Variation/Utils/VEP.pm
> line 2920, <GEN1> line 150.
>
> I haven’t figured out what exactly is going on with $slice_cache, but I
> hope this helps.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20120613/e8913604/attachment.html>


More information about the Dev mailing list