[ensembl-dev] Uncached variants + Offline mode

Sebastian Ginzel sginze2s at inf.h-brs.de
Thu Oct 1 14:16:25 BST 2015


Hi,

I am using VEP 80 and use the --offline and --cache option, which 
usually works fine, but now fails on one input file with the message:

Can't call method "db" on an undefined value at 
/path_to_lib/ensembl_80/lib/ensembl-variation/modules/Bio/EnsEMBL/Variation/Utils/VEP.pm 
line 6360, <GEN0> line 190004

After digging into the code I found that this line is called when a 
variant is not available in the cache and VEP tries to retrieve the 
information from the database via through the get_variations_from_region 
function.

The line where the script fails is:
     if(defined($config->{vfa}->db)) {

Other functions such as 'have_pubmed' have an additional condition which 
prevents the error:
     if(defined($config->{vfa}) && defined($config->{vfa}->db)) {

I fixed the error for my VEP script by adding the 
"defined($config->{vfa})" condition. But now I am wondering if the error 
is intentional and if not which should be the default return value, if 
the script is running in offline mode.


Best wishes,
Sebastian Ginzel








More information about the Dev mailing list