[ensembl-dev] VEP installer not fully automatic with --DESTDIR

Michael Yourshaw myourshaw at gmail.com
Tue Feb 20 23:23:29 GMT 2018


The VEP option --AUTO should be capable of running a fully automatic
installation.


However, if --DESTDIR is specified, the script will pause for input, and
may exit prematurely.


Automatic installation may be desirable for some users who also wish to
specify a non-standard DESTDIR,  for example, if building a Singularity
image.


I suggest adding a test for $AUTO to skip the exit associated with the
PERL5LIB/PATH warning, for example:


  # check if $DEST_DIR is default
  if(defined($DEST_DIR)) {
    print "Using non-default API installation directory $DEST_DIR.\n";
    print "Please note this just specifies the location for downloaded API
files. The vep script will remain in its current location where ensembl-vep
was unzipped.\n";
    print "Have you \n";
    print "1. added $DEST_DIR to your PERL5LIB environment variable?\n";
    print "2. added $DEST_DIR/htslib to your PATH environment variable?\n";
    if( $this_os eq 'darwin' && !$NO_HTSLIB) {
      print "3. added $DEST_DIR/htslib to your DYLD_LIBRARY_PATH
environment variable?\n";
    }
    print "(y/n): ";

    my $ok = <>;

 *   # do not exit if AUTO*
*    if($AUTO) {*
*      $ok = 'y';*
*    }*

    if($ok !~ /^y/i) {
      print "Exiting. Please \n";
      print "1. add $DEST_DIR to your PERL5LIB environment variable\n";
      print "2. add $DEST_DIR/htslib to your PATH environment variable\n";
      if( $this_os eq 'darwin' && !$NO_HTSLIB) {
        print "3. add $DEST_DIR/htslib to your DYLD_LIBRARY_PATH
environment variable\n";
      }
      exit(0);
    }
    if( ! -d $DEST_DIR ) {
      mkdir $DEST_DIR || die "Could not make destination directory
$DEST_DIR"
    }
    $default_dir_used = 0;
  }




ॐ
Michael Yourshaw
myourshaw at gmail.com <myourshaw at ucla.edu>

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20180220/cda091e1/attachment.html>


More information about the Dev mailing list