Closed VictorGoitea closed 2 years ago
@VictorGoitea first off, welcome to EasyBuild!
My first doubt is about the easyblock selections. It is not clear to me yet the criteria about how to choose the easyblock. Based on others easyconfig files I picked 'Binary'.
The easyblocks encapsulate different build/installation procedures that are common. The Binary
easyblock is designed to copy a prebuilt binary to the installation directory. Looking at the the phantompeakqualtools
repository, the installation consists of:
R
, SAMtools
, spp
etc.)run_spp.R
(and LICENSE
, README.md
) files to the installation directory, and ensuring the script is in $PATH
As such, I would probably go for the Tarball
easyblock, which simply unpacks a tarball and copies it to the installation directory. Before installing, we should also remove the spp tarball that is shipped:
preinstall_cmd = "rm spp-1.14.tar.gz"
Anyway, I realized that any of the dependencies R-bundle-Bioconductor nor R-4.2.0 include the r package "spp". Do you think it would be possible to include that here or must it be done in the R-4.2.0 eb file?
Since phantompeakqualtools
requires an older version of spp
than the latest release (according to the documentation, 1.14
or 1.15.x
, whereas the latest available is 1.16.0
), I would actually install spp
as part of the phantompeakqualtools
package, as an extension. To do this, add something like this to the easyconfig:
exts_defaultclass = 'RPackage'
exts_default_options = {
'source_urls': [
'https://cran.r-project.org/src/contrib/Archive/%(name)s', # package archive
'https://cran.r-project.org/src/contrib/', # current version of packages
'https://cran.freestatistics.org/src/contrib', # mirror alternative for current packages
],
'source_tmpl': '%(name)s_%(version)s.tar.gz',
}
exts_list = [
# phantompeakqualtools requires spp 1.14 or 1.15.x (1.16 is not supported)
('spp', '1.15.5', {
'checksums': ['1c486792ac3feb194c95efe7a8a98eab4331877ba901d774561b8839c958f924'],
}),
]
I provided spp to R in provisory way just to try to continue with the installation, but it still fails at the sanity check instance, even though I did not include a sanity check in the eb file because run_spp.R seems not to have a --help optional argument.
We should explicitly add a check that run_spp.R
is in the installation directory, and add it to PATH
(given relative to installdir):
modextrapaths = {'PATH': ''}
sanity_check_paths = {
'files': ['run_spp.R'],
'dirs': [],
}
Adding a sanity check command is nice to do where possible; in this case, since it does not accept --help
or --version
. The workaround for this is often something like:
sanity_check_commands = ['run_spp.R | grep "Usage: Rscript run_spp.R <options>"']
On another note, please consider making a pull request for phantompeakqualtools
(even if you haven't ironed out all the issues, we're happy to help)
I believe this can be closed now?
Hi,
I was trying to create an easyconfig for this tool:
I read the tutorials, all the info on Easybuild website, and I tried my best, but it is not working yet. Maybe you can help me with what I am missing here. Below is the recipe and the last error log file.
My first doubt is about the easyblock selections. It is not clear to me yet the criteria about how to choose the easyblock. Based on others easyconfig files I picked 'Binary'.
Then, the toolchain, I picked {'name': 'foss', 'version': '2021b'} but again I am not sure if it is the right one for this case.
I think I have stated
source_urls
andsources
correctly, at least I found the tar.gz in the folder after the failed installation and I stopped getting the error about this when I was setting these variables differently.Anyway, I realized that any of the dependencies R-bundle-Bioconductor nor R-4.2.0 include the r package "spp". Do you think it would be possible to include that here or must it be done in the R-4.2.0 eb file?
I provided spp to R in provisory way just to try to continue with the installation, but it still fails at the sanity check instance, even though I did not include a sanity check in the eb file because run_spp.R seems not to have a --help optional argument. Do you
What
Sanity check failed: no (non-empty) directory found at 'bin'
means? Seems to me that it complains that the folder already exists, but I make sure to delete the folder at Phantompeakqualtools at /work/easybuild/software/Phantompeakqualtools every time before trying again (and with --rebuild)Last lines of the Error log file:
It would be nice to have an easyconfig recipe for this tool. Thanks in advance for help :)