def make_module_extra(self):
     """Add install path to PERL*LIB"""
     majver = get_major_perl_version()
     sitearchsuffix = get_sitearch_suffix()
     # also add sitearch dir to Perl search path
     txt = self.moduleGenerator.prepend_paths("PERL%sLIB" % majver,
                                              ['', sitearchsuffix])
     return ExtensionEasyBlock.make_module_extra(self, txt)
    def make_module_req_guess(self):
        """Customized dictionary of paths to look for with PERL*LIB."""
        majver = get_major_perl_version()
        sitearchsuffix = get_site_suffix("sitearch")
        sitelibsuffix = get_site_suffix("sitelib")

        guesses = super(PerlModule, self).make_module_req_guess()
        guesses.update({"PERL%sLIB" % majver: ["", sitearchsuffix, sitelibsuffix]})
        return guesses
Ejemplo n.º 3
0
    def make_module_req_guess(self):
        """Custom guesses for environment variables (PATH, ...) for VEP."""
        perl_majver = get_major_perl_version()

        guesses = super(EB_VEP, self).make_module_req_guess()
        guesses = {
            'PATH': '',
            'PERL%sLIB' % perl_majver: self.api_mods_subdir,
        }
        return guesses
Ejemplo n.º 4
0
    def make_module_req_guess(self):
        """Custom guesses for environment variables (PATH, ...) for VEP."""
        perl_majver = get_major_perl_version()

        guesses = super(EB_VEP, self).make_module_req_guess()
        guesses = {
            'PATH': '',
            'PERL%sLIB' % perl_majver: self.api_mods_subdir,
        }
        return guesses
Ejemplo n.º 5
0
    def make_module_req_guess(self):
        """Customized dictionary of paths to look for with PERL*LIB."""
        majver = get_major_perl_version()
        sitearchsuffix = get_site_suffix('sitearch')
        sitelibsuffix = get_site_suffix('sitelib')

        guesses = super(PerlModule, self).make_module_req_guess()
        guesses.update({
            "PERL%sLIB" % majver: ['', sitearchsuffix, sitelibsuffix],
        })
        return guesses
Ejemplo n.º 6
0
    def make_module_extra(self):
        """Correctly prepend $PATH and $PERLXLIB for MUMmer."""
        # determine major version for Perl (e.g. '5'), required for e.g. $PERL5LIB
        perlmajver = get_major_perl_version()

        # set $PATH and $PERLXLIB correctly
        txt = super(EB_MUMmer, self).make_module_extra()
        txt += self.module_generator.prepend_paths("PATH", ['bin'])
        txt += self.module_generator.prepend_paths("PATH", ['bin/aux_bin'])
        txt += self.module_generator.prepend_paths("PERL%sLIB" % perlmajver, ['bin/scripts'])
        return txt
Ejemplo n.º 7
0
    def install_step(self):
        """Custom install procedure for VEP."""

        # patch INSTALL.pl script to use https:// rather than ftp://
        apply_regex_substitutions('INSTALL.pl', [('ftp://', 'https://')])

        # update PERL5LIB so tests can run (done automatically by INSTALL.pl unless --NO_TEST is used)
        perl_majver = get_major_perl_version()
        perllib_envvar = 'PERL%sLIB' % perl_majver
        perllib = os.getenv(perllib_envvar, '')
        api_mods_dir = os.path.join(self.installdir, self.api_mods_subdir)
        self.log.info("Adding %s to $%s (%s)", api_mods_dir, perllib_envvar,
                      perllib)
        env.setvar(perllib_envvar, '%s:%s' % (api_mods_dir, perllib))

        # check for bundled dependencies
        bundled_deps = [
            # tuple format: (package name in EB, option name for INSTALL.pl)
            ('BioPerl', 'NO_BIOPERL'),
            ('Bio-DB-HTS', 'NO_HTSLIB'),
        ]
        installopt_deps = []

        for (dep, opt) in bundled_deps:
            if get_software_root(dep):
                installopt_deps.append('--%s' % opt)

        installopt_deps = ' '.join(installopt_deps)

        # see https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#installer
        cmd = ' '.join([
            self.cfg['preinstallopts'],
            'perl',
            'INSTALL.pl',
            # disable installation of bundled dependencies that are provided as dependencies in the easyconfig
            installopt_deps,
            # a: API, f: FASTA
            # not included:
            # c: cache, should be downloaded by user
            # l: Bio::DB::HTS, should be provided via EasyBuild
            # p: plugins
            '--AUTO af',
            # install all species
            '--SPECIES all',
            # don't update VEP during installation
            '--NO_UPDATE',
            # location to install Perl API modules into
            '--DESTDIR ' + api_mods_dir,
            self.cfg['installopts'],
        ])
        run_cmd(cmd, log_all=True, simple=True, log_ok=True)
Ejemplo n.º 8
0
    def make_module_req_guess(self):
        """Custom guesses for environment variables (PATH, ...) for VEP."""
        perl_majver = get_major_perl_version()

        perl_libpath = [self.api_mods_subdir]
        if 'Bio::EnsEMBL::XS' in [ext[0] for ext in self.cfg['exts_list']]:
            perl_ver = get_software_version('Perl')
            perl_libpath.extend([os.path.join('lib', 'perl' + perl_majver, 'site_perl', perl_ver)])

        guesses = super(EB_VEP, self).make_module_req_guess()
        guesses = {
            'PATH': '',
            'PERL%sLIB' % perl_majver: perl_libpath,
        }
        return guesses
Ejemplo n.º 9
0
    def sanity_check_step(self):
        """Custom sanity check for VEP."""

        custom_paths = {
            'files': ['vep'],
            'dirs': ['modules/Bio/EnsEMBL/VEP'],
        }

        if 'Bio::EnsEMBL::XS' in [ext[0] for ext in self.cfg['exts_list']]:
            perl_majver = get_major_perl_version()
            perl_ver = get_software_version('Perl')
            perl_libpath = os.path.join('lib', 'perl' + perl_majver, 'site_perl', perl_ver)
            bio_ensembl_xs_ext = os.path.join(perl_libpath, 'x86_64-linux-thread-multi', 'Bio', 'EnsEMBL', 'XS.pm')
            custom_paths['files'].extend([bio_ensembl_xs_ext])

        custom_commands = ['vep --help']

        super(EB_VEP, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)
Ejemplo n.º 10
0
    def install_step(self):
        """Custom install procedure for VEP."""

        # patch INSTALL.pl script to use https:// rather than ftp://
        apply_regex_substitutions('INSTALL.pl', [('ftp://', 'https://')])

        # update PERL5LIB so tests can run (done automatically by INSTALL.pl unless --NO_TEST is used)
        perl_majver = get_major_perl_version()
        perllib_envvar = 'PERL%sLIB' % perl_majver
        perllib = os.getenv(perllib_envvar, '')
        api_mods_dir = os.path.join(self.installdir, self.api_mods_subdir)
        self.log.info("Adding %s to $%s (%s)", api_mods_dir, perllib_envvar,
                      perllib)
        env.setvar(perllib_envvar, '%s:%s' % (api_mods_dir, perllib))

        # see https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#installer
        cmd = ' '.join([
            self.cfg['preinstallopts'],
            'perl',
            'INSTALL.pl',
            # don't try to install optional Bio::DB::HTS (can be provided as an extension instead)
            '--NO_HTSLIB',
            # a: API, f: FASTA
            # not included:
            # c: cache, should be downloaded by user
            # l: Bio::DB::HTS, should be provided via EasyBuild
            # p: plugins
            '--AUTO af',
            # install all species
            '--SPECIES all',
            # don't update VEP during installation
            '--NO_UPDATE',
            # location to install Perl API modules into
            '--DESTDIR ' + api_mods_dir,
            self.cfg['installopts'],
        ])
        run_cmd(cmd, log_all=True, simple=True, log_ok=True)
Ejemplo n.º 11
0
    def install_step(self):
        """Custom install procedure for VEP."""

        # patch INSTALL.pl script to use https:// rather than ftp://
        apply_regex_substitutions('INSTALL.pl', [('ftp://', 'https://')])

        # update PERL5LIB so tests can run (done automatically by INSTALL.pl unless --NO_TEST is used)
        perl_majver = get_major_perl_version()
        perllib_envvar = 'PERL%sLIB' % perl_majver
        perllib = os.getenv(perllib_envvar, '')
        api_mods_dir = os.path.join(self.installdir, self.api_mods_subdir)
        self.log.info("Adding %s to $%s (%s)", api_mods_dir, perllib_envvar, perllib)
        env.setvar(perllib_envvar, '%s:%s' % (api_mods_dir, perllib))

        # see https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#installer
        cmd = ' '.join([
            self.cfg['preinstallopts'],
            'perl',
            'INSTALL.pl',
            # don't try to install optional Bio::DB::HTS (can be provided as an extension instead)
            '--NO_HTSLIB',
            # a: API, f: FASTA
            # not included:
            # c: cache, should be downloaded by user
            # l: Bio::DB::HTS, should be provided via EasyBuild
            # p: plugins
            '--AUTO af',
            # install all species
            '--SPECIES all',
            # don't update VEP during installation
            '--NO_UPDATE',
            # location to install Perl API modules into
            '--DESTDIR ' + api_mods_dir,
            self.cfg['installopts'],
        ])
        run_cmd(cmd, log_all=True, simple=True, log_ok=True)