[ensembl-dev] VEP cache and local database

Will McLaren wm2 at ebi.ac.uk
Fri Nov 15 10:09:01 GMT 2013


Hi Michael,

I'm not sure why this error is occurring, but the VEP stores a reference to
the slice adaptor which you can access from your plugin as:

$self->{config}->{sa}

There are a number of adaptors stored in this way; the references are
created in the get_adaptors sub-routine in variant_effect_predictor.pl

The second warning is nothing to worry about. The line:

Bio::EnsEMBL::Utils::Exception::verbose(1999)

in variant_effect_predictor.pl should suppress this warning from happening,
but currently this happens after the sub-routine configure_plugins is run,
so if your plugin creates an adaptor with no_slice_cache enabled you will
see the warning.

I'll update the script so the warning gets suppressed before
configure_plugins runs.

Cheers

Will


On 14 November 2013 22:56, Michael Yourshaw <myourshaw at ucla.edu> wrote:

> I normally use a local copy of the mySQL database to process large
> datasets. Some of my plugins make calls to the Ensembl database via the
> Perl API.
>
> VEP runs normally without the cache.
>
> I want to take advantage of some of the options available only through the
> cache, such as maf_esp, and possibly improve throughput, but still get
> everything not in the cache from the local database.
>
> I have downloaded and installed the homo_sapiens_73 cache, and use these
> parameters:
> cache=1
> dir_cache=/scratch1/tmp/myourshaw/ensembl/.vep/
> -—offline is not on
>
> There are two problems when I turn on the cache.
>
> First, some of my plugins get an error in Bio::EnsEMBL::DBSQL::GeneAdaptor
> in the fetch_nearest_Gene_by_Feature sub at the line
> my $seq_region_id = $feat->slice->adaptor->get_seq_region_id($feat->slice);
>
> The error is
> Can't call method "get_seq_region_id" on an undefined value at
> /share/apps/myourshaw/ensembl/ensembl/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
> line 1978.
>
> Specifically, $feat->slice->adapter is undef
>
> The call in my code that triggers this is:
> sub run {
>     my ($self, $bvfoa, $line_hash) = @_;
>
> if($bvfoa->isa('Bio::EnsEMBL::Variation::RegulatoryFeatureVariationAllele')){
>         my $feature = $bvfoa->regulatory_feature;
> # At this point, $feature->slice->adapter is undef and the next line fails
>         my $nearest_genes =
> $config->{ga}->fetch_nearest_Gene_by_Feature($feature);
>         my $gene = @{$nearest_genes}[0];
>     }
>
> Second, I get the following warning when VEP initializes. Is this related
> to the first problem? Should I be concerned?
> MSG: You are using the API without caching most recent features.
> Performance might be affected.
> FILE: EnsEMBL/DBSQL/BaseFeatureAdaptor.pm LINE: 76
> CALLED BY: Bio/EnsEMBL/Registry.pm  LINE: 1043
> Date (localtime)    = Thu Nov 14 11:52:27 2013
> Ensembl API version = 73
>
>
>>
> 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
>
> 970.691.8299
>
> 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.
>
>
>
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20131115/711410cd/attachment.html>


More information about the Dev mailing list