Ensembl / VEP_plugins

Plugins for the Ensembl Variant Effect Predictor (VEP)
Apache License 2.0
138 stars 115 forks source link

FATHMM-MKL: Failed to compile plugin FATHMM_MKL: Global symbol "$allele" requires explicit package name. #676

Closed JasperBoom closed 9 months ago

JasperBoom commented 9 months ago

Greetings!

I am trying to run VEP using the plugin FATHMM-MKL. However, it is generating an error:

WARNING: Failed to compile plugin FATHMM_MKL: Global symbol "$allele" requires explicit package name (did you forget to declare "my $allele"?) at FATHMM_MKL.pm line 92.
Global symbol "$allele" requires explicit package name (did you forget to declare "my $allele"?) at FATHMM_MKL.pm line 93.
Global symbol "$allele" requires explicit package name (did you forget to declare "my $allele"?) at FATHMM_MKL.pm line 94.
Compilation failed in require at (eval 63) line 2.
BEGIN failed--compilation aborted at (eval 63) line 2.

I managed to avoid the error by editing the FATHMM_MKL.pm file, specifically the sub run, adding my to foreach my $allele (@{$alleles}) {:

sub run {
  my ($self, $tva) = @_;

  my $vf = $tva->variation_feature;

  return {} unless $vf->{start} == $vf->{end};

  # get allele, reverse comp if needed
  my $alleles = $tva->base_variation_feature->alt_alleles;

  # adjust coords, file is BED-like (but not 0-indexed, go figure...)
  my ($s, $e) = ($vf->{start}, $vf->{end} + 1);

  foreach my $data(@{$self->get_data($vf->{chr}, $s, $e)}) {
    foreach my $allele (@{$alleles}) {
      reverse_comp(\$allele) if $vf->{strand} < 0;
      if($data->{start} == $s && $allele eq $data->{alt}) {
        return $data->{result};
      }
    }
  }

  return {};
}
dglemos commented 9 months ago

Hi @JasperBoom, Thank you for reporting the issue. We will include a fix in the next release, in the meantime, you should use your local version of the file.

Best wishes, Diana