Merge branch '309-deepemhancer-merlin7' into 'master'
Resolve "deepEMhancer merlin7" Closes #309 See merge request Pmodules/buildblocks!476
This commit is contained in:
34
EM/DeepEMhancer/build
Executable file
34
EM/DeepEMhancer/build
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
|
||||
pbuild::configure() {
|
||||
#MINICONDA INSTALL
|
||||
mkdir -p "$PREFIX/miniconda"
|
||||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O "$PREFIX/miniconda/miniconda.sh"
|
||||
bash "$PREFIX/miniconda/miniconda.sh" -b -u -p "$PREFIX/miniconda/"
|
||||
|
||||
|
||||
#CREATE ENV
|
||||
"$PREFIX/miniconda/condabin/conda" env create --name "${P}_${V}" -f "$BUILDBLOCK_DIR/environment.yaml"
|
||||
|
||||
|
||||
#activate env and download deep learning models
|
||||
mkdir -p "$PREFIX/deepmodels"
|
||||
source "$PREFIX/miniconda/etc/profile.d/conda.sh"
|
||||
conda activate "${P}_${V}"
|
||||
deepemhancer --download "$PREFIX/deepmodels"
|
||||
conda deactivate
|
||||
}
|
||||
|
||||
#DO NOTHING
|
||||
pbuild::compile(){
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::install(){
|
||||
:
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
7
EM/DeepEMhancer/environment.yaml
Normal file
7
EM/DeepEMhancer/environment.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
channels:
|
||||
- rsanchez1369
|
||||
- anaconda
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python=3.10
|
||||
- deepEMhancer
|
||||
13
EM/DeepEMhancer/files/config.yaml
Normal file
13
EM/DeepEMhancer/files/config.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
format: 1
|
||||
DeepEMhancer:
|
||||
defaults:
|
||||
group: EM
|
||||
overlay: base
|
||||
relstage: unstable
|
||||
versions:
|
||||
0.16:
|
||||
variants:
|
||||
- overlay: Alps
|
||||
systems: [.*.merlin7.psi.ch]
|
||||
relstage: unstable
|
||||
34
EM/DeepEMhancer/modulefile
Normal file
34
EM/DeepEMhancer/modulefile
Normal file
@@ -0,0 +1,34 @@
|
||||
#%Module
|
||||
|
||||
module-whatis "Deep cryo-EM Map Enhancer (DeepEMhancer) "
|
||||
module-url "https://github.com/rsanchezgarc/deepEMhancer"
|
||||
module-license "Apache-2.0 License"
|
||||
module-maintainer "Greta Assmann <greta.assmann@psi.ch>"
|
||||
|
||||
module-help "DeepEMhancer is a python package designed to perform post-processing of cryo-EM maps as described in DeepEMhancer: a deep learning solution for cryo-EM volume post-processing, by Sanchez-Garcia et al, 2021."
|
||||
|
||||
# Check for supported shell types
|
||||
set shelltype [module-info shelltype]
|
||||
switch -- $shelltype {
|
||||
"sh" {
|
||||
puts stdout "conda(){ :; };"
|
||||
puts stdout "set +u"
|
||||
puts stdout "source \"${PREFIX}\"/miniconda/etc/profile.d/conda.sh;\n"
|
||||
}
|
||||
default {
|
||||
puts stderr "Shells of type '$shelltype' are NOT supported!"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch [module-info mode] {
|
||||
"load" {
|
||||
# Relies on the anaconda module being loaded since we need to update the path
|
||||
puts stdout "conda activate ${P}_${V};\n"
|
||||
}
|
||||
"unload" -
|
||||
"remove" {
|
||||
puts stdout "conda deactivate;\n"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user