-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update VEP easyblock to make installation compatible with Bio::EnsEMBL::XS #1828
Conversation
easybuild/easyblocks/v/vep.py
Outdated
|
||
if 'Bio::EnsEMBL::XS' in [ext[0] for ext in self.cfg['exts_list']]: | ||
custom_paths['files'] += ['lib/perl%s/site_perl/%s/x86_64-linux-thread-multi/Bio/EnsEMBL/XS.pm'\ | ||
% (get_major_perl_version(), get_software_version('Perl'))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
easybuild/easyblocks/v/vep.py
Outdated
custom_paths = { | ||
'files': ['vep'], | ||
'dirs': ['modules/Bio/EnsEMBL/VEP'], | ||
} | ||
|
||
if 'Bio::EnsEMBL::XS' in [ext[0] for ext in self.cfg['exts_list']]: | ||
custom_paths['files'] += ['lib/perl%s/site_perl/%s/x86_64-linux-thread-multi/Bio/EnsEMBL/XS.pm'\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the backslash is redundant between brackets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lexming Please use extend
, use os.path.join
and avoid breaking the long line by using a local variable:
if 'Bio::EnsEMBL::XS' in [ext[0] for ext in self.cfg['exts_list']]:
perl_maj_ver = get_major_perl_version()
perl_ver = get_software_version('Perl')
perl_lib_subdir = os.path.join('lib', 'perl' + perl_maj_ver, 'site_perl', perl_ver)
bio_ensembl_xs_perl_mod = os.path.join(perl_lib_subdir, 'x86_64-linux-thread-multi', Bio', 'EnsEMBL', 'XS.pm')
custom_paths['files'].extend(bio_ensembl_xs_perl_mod)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with your suggestions. Thanks for the feedback.
easybuild/easyblocks/v/vep.py
Outdated
custom_paths = { | ||
'files': ['vep'], | ||
'dirs': ['modules/Bio/EnsEMBL/VEP'], | ||
} | ||
|
||
if 'Bio::EnsEMBL::XS' in [ext[0] for ext in self.cfg['exts_list']]: | ||
custom_paths['files'] += ['lib/perl%s/site_perl/%s/x86_64-linux-thread-multi/Bio/EnsEMBL/XS.pm'\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lexming Please use extend
, use os.path.join
and avoid breaking the long line by using a local variable:
if 'Bio::EnsEMBL::XS' in [ext[0] for ext in self.cfg['exts_list']]:
perl_maj_ver = get_major_perl_version()
perl_ver = get_software_version('Perl')
perl_lib_subdir = os.path.join('lib', 'perl' + perl_maj_ver, 'site_perl', perl_ver)
bio_ensembl_xs_perl_mod = os.path.join(perl_lib_subdir, 'x86_64-linux-thread-multi', Bio', 'EnsEMBL', 'XS.pm')
custom_paths['files'].extend(bio_ensembl_xs_perl_mod)
easybuild/easyblocks/v/vep.py
Outdated
@@ -105,9 +112,13 @@ 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_libpath += ['lib/perl%s/site_perl/%s' % (perl_majver, get_software_version('Perl'))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, please use .extend
and os.path.join
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perl_maj_ver = get_major_perl_version()
perl_ver = get_software_version('Perl')
perl_libpath.extend(os.path.join('lib', 'perl' + perl_maj_ver, 'site_perl', perl_ver)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed as well 👍
tested with existing Thanks @lexming! |
Update for
vep
easyblock to add sanity checks and set specific environment variables for the extensionBio::EnsEMBL::XS
if it is present in the list of extension list.