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

Michael Yourshaw myourshaw at ucla.edu
Wed Jun 13 01:01:21 BST 2012

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.


Michael Yourshaw
UCLA Geffen School of Medicine
Department of Human Genetics, Nelson Lab
695 Charles E Young Drive S
Gonda 5554
Los Angeles CA 90095-8348 USA
myourshaw at ucla.edu

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20120612/858947b5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: union.recalibrated.snps.indels.vcf.part.00000041Y13
Type: application/octet-stream
Size: 29986 bytes
Desc: not available
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20120612/858947b5/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20120612/858947b5/attachment-0001.html>

More information about the Dev mailing list