Skip to content

Commit

Permalink
Merge pull request #1355 from nuno-agostinho/fix/INSTALL-vep-version
Browse files Browse the repository at this point in the history
Hotfix: remove deprecated VERSION argument from `INSTALL.pl`
  • Loading branch information
nakib103 authored Feb 15, 2023
2 parents 367c10c + 71d7e48 commit c5669c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
32 changes: 5 additions & 27 deletions INSTALL.pl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ BEGIN
GetOptions(
$config,
'DESTDIR|d=s',
'VERSION|v=i', # Deprecated
'CACHE_VERSION|e=i',
'ASSEMBLY|y=s',
'BIOPERL|b=s',
Expand Down Expand Up @@ -198,7 +197,6 @@ sub read_config_from_environment {

# Quick fix: this script should use $config instead of multiple global variables
$DEST_DIR ||= $config->{DESTDIR};
$API_VERSION ||= $config->{VERSION};
$DATA_VERSION ||= $config->{CACHE_VERSION};
$ASSEMBLY ||= $config->{ASSEMBLY};
$BIOPERL_URL ||= $config->{BIOPERL};
Expand Down Expand Up @@ -321,14 +319,14 @@ sub read_config_from_environment {

else {
my $api_msg =
" - Install v$API_VERSION of the Ensembl API for use by the VEP. " .
" - Install v$API_VERSION of the Ensembl API for use by the VEP. " .
"It will not affect any existing installations of the Ensembl API that you may have.\n";

print "Hello! This installer will help you set up VEP v$API_VERSION, including:\n" .
($NO_UPDATE ? "" : $api_msg) .
" - Download and install cache files from Ensembl's FTP server.\n" .
" - Download FASTA files from Ensembl's FTP server.\n" .
($NO_PLUGINS ? "" : " - Download VEP plugins.\n") . "\n"
" - Download and install cache files from Ensembl's FTP server.\n" .
" - Download FASTA files from Ensembl's FTP server.\n" .
($NO_PLUGINS ? "" : " - Download VEP plugins.\n") . "\n"
unless $QUIET;

# run subs
Expand Down Expand Up @@ -387,26 +385,6 @@ ()

my $current_branch = $CURRENT_VERSION_DATA->{'ensembl-vep'}->{release};

# Check if the $API_VERSION has been set by the deprecated "--VERSION" flag
my $api_branch = $API_VERSION;
$api_branch =~ s/release\///;

# branch provided by the "--VERSION" flag
if ($api_branch != $current_branch) {
print "The 'VERSION' installation flag has been deprecated.\n\n";
my $branch = looks_like_number($API_VERSION) ? 'release/'.$API_VERSION : $API_VERSION;
if(`which git` && -d $RealBin.'/.git') {
print "Please, use git to update '$module' using the commands:\n\n";
print "\tgit pull\n";
print "\tgit checkout $branch\n\n";
}
else {
print "Please, re-download '$module' with the desired version.\n\n";
}
print "Exit VEP install script\n";
exit(0);
}

my $message;

# don't have latest
Expand Down Expand Up @@ -1933,7 +1911,7 @@ sub usage {
-h | --help Display this message and quit
-d | --DESTDIR Set destination directory for API install (default = './')
--CACHE_VERSION Set data (cache, FASTA) version to install if different from --VERSION (default = $VERSION)
--CACHE_VERSION Set data (cache, FASTA) version to install (default = $VERSION)
-c | --CACHEDIR Set destination directory for cache files (default = '$ENV{HOME}/.vep/')
-a | --AUTO Run installer without user prompts. Use "a" (API + Faidx/htslib),
Expand Down
2 changes: 1 addition & 1 deletion modules/Bio/EnsEMBL/VEP/Constants.pm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use warnings;
use base qw(Exporter);

our $VEP_VERSION = 109;
our $VEP_SUB_VERSION = 1;
our $VEP_SUB_VERSION = 2;

our @EXPORT_OK = qw(
@FLAG_FIELDS
Expand Down

0 comments on commit c5669c8

Please sign in to comment.