Merge branch 'cryodrgn' into 'master'
Create cryodrgn/1.1.0 pmodule See merge request Pmodules/buildblocks!354
This commit is contained in:
11
EM/cryodrgn/README.md
Normal file
11
EM/cryodrgn/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# cryoDRGN
|
||||
|
||||
CryoDRGN is installed in a central conda environment.
|
||||
## Adding New Versions
|
||||
|
||||
To add a new version, first create the conda environment, as described in
|
||||
../../Programming/anaconda/2019.07/conda-env-defs/cryodrgn/README.md.
|
||||
|
||||
Next, update files/variants with the new version and run `./build <VERSION>` to
|
||||
install the modulefile
|
||||
|
||||
20
EM/cryodrgn/build
Executable file
20
EM/cryodrgn/build
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
|
||||
pbuild::add_to_group 'EM'
|
||||
pbuild::prep() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::configure() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::compile() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::install() {
|
||||
:
|
||||
}
|
||||
|
||||
2
EM/cryodrgn/files/variants
Normal file
2
EM/cryodrgn/files/variants
Normal file
@@ -0,0 +1,2 @@
|
||||
cryodrgn/1.1.0 stable anaconda/2019.07
|
||||
|
||||
49
EM/cryodrgn/modulefile
Normal file
49
EM/cryodrgn/modulefile
Normal file
@@ -0,0 +1,49 @@
|
||||
#%Module
|
||||
|
||||
module-whatis "cryoDRGN: Deep Reconstructing Generative Networks for cryo-EM heterogeneous reconstruction"
|
||||
module-url "https://github.com/zhonge/cryodrgn"
|
||||
module-license "GPL v3.0"
|
||||
module-maintainer "Spencer Bliven <spencer.bliven@psi.ch>"
|
||||
|
||||
module-help "
|
||||
CryoDRGN is a neural network based algorithm for heterogeneous cryo-EM
|
||||
reconstruction. In particular, the method models a continuous distribution over
|
||||
3D structures by using a neural network based representation for the volume.
|
||||
|
||||
> CryoDRGN: reconstruction of heterogeneous cryo-EM structures using neural
|
||||
> networks. Ellen D. Zhong, Tristan Bepler, Bonnie Berger, Joseph H. Davis.
|
||||
> https://www.nature.com/articles/s41592-020-01049-4
|
||||
|
||||
> Reconstructing continuous distributions of 3D protein structure from cryo-EM
|
||||
> images. Ellen D. Zhong, Tristan Bepler, Joseph H. Davis, Bonnie Berger.
|
||||
> ICLR 2020, Spotlight presentation, https://arxiv.org/abs/1909.05215
|
||||
"
|
||||
|
||||
# Check for supported shell types
|
||||
set shelltype [module-info shelltype]
|
||||
switch -- $shelltype {
|
||||
"sh" {
|
||||
puts stdout "source \"\${ANACONDA_PREFIX}\"/admintools/conda_setup.sh;\n"
|
||||
}
|
||||
default {
|
||||
puts stderr "Shells of type '$shelltype' are NOT supported!"
|
||||
}
|
||||
}
|
||||
|
||||
# Determine useflags and construct conda env name
|
||||
set list [split $V "_"]
|
||||
set version [lindex ${list} 0]
|
||||
set useflags [lrange ${list} 1 end]
|
||||
set env_to_activate [string tolower ${P}]-${version}
|
||||
|
||||
switch [module-info mode] {
|
||||
"load" {
|
||||
# Relies on the anaconda module being loaded since we need to update the path
|
||||
puts stdout "conda activate $env_to_activate;\n"
|
||||
}
|
||||
"unload" -
|
||||
"remove" {
|
||||
puts stdout "conda deactivate;\n"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# INSTALLATION
|
||||
|
||||
IMPORTANT! DON'T INSTALL WITH AURISTOR. Use an OpenAFS system (e.g. *pmod7*).
|
||||
GLIBC>=2.14 is required (so pmod6 doesn't work).
|
||||
|
||||
In theory, the yaml environment contains all the requirements. This should be
|
||||
updated for each version to change the env name and update requirements.
|
||||
|
||||
CONDA_COPY_ALWAYS=1 conda env create --file cryodrgn.yml
|
||||
conda activate cryodrgn-1.1.0
|
||||
|
||||
In practice, some manual installation was required following the github
|
||||
instructions. (Most errors ultimately stemed from quota issues, so try the
|
||||
file-based install next version).
|
||||
|
||||
Now configure jupyterlab:
|
||||
|
||||
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
|
||||
jupyter labextension install jupyterlab-plotly --no-build
|
||||
jupyter labextension install plotlywidget --no-build
|
||||
jupyter lab build
|
||||
|
||||
## Pmodules
|
||||
|
||||
After installing a new environment, wrap it in the EM/cryodrgn module
|
||||
|
||||
## Testing
|
||||
|
||||
To test:
|
||||
|
||||
conda activate cryodrgn-1.1.0
|
||||
cryodrgn -h
|
||||
|
||||
git clone https://github.com/zhonge/cryodrgn.git
|
||||
cd cryodrgn/testing
|
||||
./quicktest.sh
|
||||
|
||||
It should take ~20 seconds to run and reach a final loss around 0.08 in version
|
||||
1.0 and 0.03 in version 1.1+. Note that the output should contain Use cuda
|
||||
True in the first few lines.
|
||||
@@ -0,0 +1,20 @@
|
||||
name: cryodrgn-1.1.0
|
||||
channels:
|
||||
- pytorch
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python=3.9
|
||||
- pytorch
|
||||
- pandas
|
||||
- seaborn
|
||||
- scikit-learn
|
||||
- umap-learn
|
||||
- jupyterlab
|
||||
- ipywidgets
|
||||
- cufflinks-py
|
||||
- nodejs>=15.12.0
|
||||
|
||||
- pip
|
||||
- pip:
|
||||
- git+https://github.com/zhonge/cryodrgn.git@1.1.0
|
||||
Reference in New Issue
Block a user