easybuilders / easybuild-easyconfigs

A collection of easyconfig files that describe which software to build using which build options with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
380 stars 704 forks source link

MEME module does not add perl and python scripts to PATH #10290

Open ghuls opened 4 years ago

ghuls commented 4 years ago

The MEME (local version has updated version numbers) module does not add libexec/meme-<version> to PATH when installing the module. It contains a lot of tools:

ls ./MEME/5.1.1-foss-2018a-Perl-5.28.1-Python-3.6.4/libexec/meme-5.1.1 | wc -l
78
alphtype
ama
ama-qvalues
beeml2meme
ceqlogo
chen2meme
clustalw2fasta
clustalw2phylip
compute-prior-dist
compute-uniform-priors
create-priors
dreme_xml_to_html
dreme_xml_to_txt
dtc
elm2meme
fasta-center
fasta-dinucleotide-shuffle
fasta-fetch
fasta-get-markov
fasta-grep
fasta-hamming-enrich
fasta-make-index
fasta-most
fasta-re-match
fasta-shuffle-letters
fasta-subsample
fasta-unique-names
fisher_exact
fitevd
gendb
getsize
glam2format
glam2html
glam2mask
glam2psfm
glam2scan2html
gomo_highlight
hart2meme-bkg
hartemink2psp
import-html-template
iupac2meme
jaspar2meme
llr
mast_xml_to_html
mast_xml_to_txt
matrix2meme
meme2alph
meme2images
meme2meme
meme-chip_html_to_tsv
meme-get-motif
meme-rename
meme_xml_to_html
motif-shuffle-columns
motiph
nmica2meme
plotgen
pmp_bf
priority2meme
psp-gen
qvalue
ramen
ranksum_test
reconcile-tree-alignment
reduce-alignment
remove-alignment-gaps
rna2meme
rsat-retrieve-seq
rsat-supported-organisms
scpd2meme
sd
sites2meme
taipale2meme
tamo2meme
tomtom_xml_to_html
transfac2meme
uniprobe2meme

If I added this to the final module file, it works:

prepend-path    PATH            $root/libexec/meme-5.1.1
ghuls commented 3 years ago

Is there a way to add this path to PATH directly from the easybuild config file?

akesandgren commented 3 years ago

Yes, modextrapaths = { 'PATH': 'libexec/%(namelower)s-%(version)s' } should do it. Although stuff under libexec is normally not supposed to be used by users directly. But they (MEM devs) can of course have done a bad setup...

ghuls commented 3 years ago

Thanks, seems to work.

I notices that while compiling MEME via easybuild or via the default configure script, the tomtom binary of MEME is 58% faster than when it is compiled with easybuild. This looks like a big performance difference.

MEME also support compilation with openMPI.

MEME configure script uses this (without "-march-native"):

buildopts = 'CFLAGS="-std=gnu89 -fno-common -Wall -Wno-unused -DUNIX -D__USE_FIXED_PROTOTYPES__ -O3 -march=native"'
--- MEME-5.1.1-foss-2018a-Perl-5.28.1-Python-3.6.4.eb   2020-03-30 18:16:19.636747000 +0200
+++ MEME-5.3.3-foss-2018a-Perl-5.28.1-Python-3.6.4.eb   2021-06-28 13:32:30.565076000 +0200
@@ -1,7 +1,7 @@
 easyblock = 'ConfigureMake'

 name = 'MEME'
-version = '5.1.1'
+version = '5.3.3'
 versionsuffix = '-Perl-%(perlver)s-Python-%(pyver)s'

 homepage = 'http://meme-suite.org'
@@ -15,24 +15,26 @@

 source_urls = ['http://meme-suite.org/meme-software/%(version)s/']
 sources = ['%(namelower)s-%(version)s.tar.gz']
-checksums = ['38d73d256d431ad4eb7da2c817ce56ff2b4e26c39387ff0d6ada088938b38eb5']
+checksums = ['5f2679c944573a6cb3556e88f11529973753993fe227b2399fc06451270fa1ed']

 dependencies = [
     ('libxml2', '2.9.9'),
     ('libxslt', '1.1.33'),
     ('zlib', '1.2.11'),
 ...

 configopts = '--with-perl=${EBROOTPERL}/bin/perl --with-python3=${EBROOTPYTHON}/bin/python '

-# Remove Python2 script
-postinstallcmds = ['rm -f %(installdir)s/bin/dreme']
+buildopts = 'CFLAGS="-std=gnu89 -fno-common -Wall -Wno-unused -DUNIX -D__USE_FIXED_PROTOTYPES__ -O3 -march=native"'
+
+# Add MEME python/perl scripts to PATH.
+modextrapaths = {'PATH': 'libexec/%(namelower)s-%(version)s'}

 sanity_check_paths = {
-    #'files': ["bin/meme", "bin/dreme-py3", "bin/meme-chip"],
-    'files': ["bin/meme", "bin/meme-chip"],
+    'files': ["bin/meme", "bin/meme-chip", "bin/tomtom"],
     'dirs': ["lib"],
 }