From 51066a5431114e443298020a1640bdf88d86d083 Mon Sep 17 00:00:00 2001 From: Greta Assmann Date: Thu, 19 Dec 2024 13:47:10 +0100 Subject: [PATCH] new DeepEMhancer merlin7 --- EM/DeepEMhancer/build | 34 +++++++++++++++++++++++++++++++ EM/DeepEMhancer/environment.yaml | 7 +++++++ EM/DeepEMhancer/files/config.yaml | 13 ++++++++++++ EM/DeepEMhancer/modulefile | 34 +++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100755 EM/DeepEMhancer/build create mode 100644 EM/DeepEMhancer/environment.yaml create mode 100644 EM/DeepEMhancer/files/config.yaml create mode 100644 EM/DeepEMhancer/modulefile diff --git a/EM/DeepEMhancer/build b/EM/DeepEMhancer/build new file mode 100755 index 0000000..cbf5ff7 --- /dev/null +++ b/EM/DeepEMhancer/build @@ -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(){ + : +} + + + + diff --git a/EM/DeepEMhancer/environment.yaml b/EM/DeepEMhancer/environment.yaml new file mode 100644 index 0000000..9a2d1d9 --- /dev/null +++ b/EM/DeepEMhancer/environment.yaml @@ -0,0 +1,7 @@ +channels: + - rsanchez1369 + - anaconda + - conda-forge +dependencies: + - python=3.10 + - deepEMhancer diff --git a/EM/DeepEMhancer/files/config.yaml b/EM/DeepEMhancer/files/config.yaml new file mode 100644 index 0000000..5b4312b --- /dev/null +++ b/EM/DeepEMhancer/files/config.yaml @@ -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 diff --git a/EM/DeepEMhancer/modulefile b/EM/DeepEMhancer/modulefile new file mode 100644 index 0000000..657d101 --- /dev/null +++ b/EM/DeepEMhancer/modulefile @@ -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 " + +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" + } +} +