Skip to content

Commit

Permalink
Simplified logic, dir_plugins appends '/Plugins'
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhoyle committed Apr 16, 2021
1 parent 9cac6d4 commit fb23f71
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions vep
Expand Up @@ -223,18 +223,13 @@ $config->{database} ||= 0;
# If the optional parameter is supplied for --cache,
# AND that parameter is a directory
# AND --dir|dir_cache|dir_plugins is not also defined,
# set --dir|dir_cache|dir_plugins to the value given for --cache.

if (-d "$config->{cache}"}
if (!defined($config->{dir})) {
$config->{dir} = $config->{cache};
}
if (!defined($config->{dir_cache})) {
$config->{dir_cache} = $config->{cache};
}
if (!defined($config->{dir_plugins})) {
$config->{dir_plugins} = $config->{cache};
}
# set --dir|dir_cache to the value given for --cache.
# (--dir_plugins gets --cache ./Plugins

if (-d "$config->{cache}") {
$config->{dir} ||= $config->{cache};
$config->{dir_cache} ||= $config->{cache};
$config->{dir_plugins} ||= ($config->{dir} || $config->{cache}).'/Plugins';
}

my $runner = Bio::EnsEMBL::VEP::Runner->new($config);
Expand Down

0 comments on commit fb23f71

Please sign in to comment.