Release Alphafold 2.0.1

- Improves the build system to install the submission scripts in bin
- Add README
This commit is contained in:
2021-10-08 20:57:18 +02:00
parent de21d05b14
commit 5233ffd6e6
7 changed files with 72 additions and 4 deletions

60
MX/alphafold/README.md Normal file
View File

@@ -0,0 +1,60 @@
# Alphafold
Alphafold contains two parts:
1. A conda environment containing dependencies
2. The alphafold module itself, containing the current code and submission scripts.
## Conda Environment
Alphafold was installed based on Dima's instructions on ra
(`/das/work/common/opt/alphafold/2021-07/INSTALL`).
On pmod6 as an admin user:
```
conda create --name alphafold python==3.8
conda update -n base conda
source miniconda3/etc/profile.d/conda.sh
conda activate alphafold
conda install -y -c conda-forge openmm==7.5.1 cudnn==8.2.1.32 cudatoolkit==11.0.3 pdbfixer==1.7
conda install -y -c bioconda hmmer==3.3.2 hhsuite==3.3.0 kalign2==2.04
pip install absl-py==0.13.0 biopython==1.79 chex==0.0.7 dm-haiku==0.0.4 \
dm-tree==0.1.6 immutabledict==2.0.0 jax==0.2.14 ml-collections==0.1.0 \
numpy==1.19.5 scipy==1.7.0 tensorflow==2.5.0
pip install --upgrade jax jaxlib==0.1.69+cuda111 \
-f https://storage.googleapis.com/jax-releases/jax_releases.html
```
If this needs to be updated in the future we may need to have versioned conda envs.
## Alphafold module
Add version to files/variants. The version number should match a github tag
(e.g. `v2.0.1`) or else have the commit hash as `$V_RELEASE`.
As admin user:
```
cd MX/alphafold
./build <version>
```
## Testing
Here's an example sequence:
```
mkdir example
cd example
cat > query.fasta <<EOF
>dummy_sequence
GWSTELEKHREELKEFLKKEGITNVEIRIDNGRLEVRVEGGTERLKRFLEELRQKLEKKGYTVDIKIE
EOF
module use MX unstable
module load alphafold/2.0.1
sbatch $ALPHAFOLD_DIR/bin/submit_merlin.sh query.fasta
```

View File

@@ -49,7 +49,7 @@ hostname >> "$LOG"
set +u # Allow unset variables in activate commands
module purge
module use MX unstable
module load anaconda/2019.07 cuda/11.0.3 alphafold/2.0.0-b88f8da 2>> "$LOG"
module load alphafold/ALPHAFOLD_VERSION 2>> "$LOG"
conda activate "${ALPHAFOLD_ENV:?"Error: ALPHAFOLD_ENV not set. Try 'module use MX unstable; module load alphafold'"}"
set -u

View File

@@ -18,6 +18,6 @@
export ALPHAFOLD_DATA=/data/project/bio/shared/alphafold
module purge
module use MX unstable
module load anaconda/2019.07 cuda/11.0.3 alphafold/2.0.0-b88f8da
module load alphafold/ALPHAFOLD_VERSION
exec "${ALPHAFOLD_DIR:?Error loading module}/bin/submit.sh" "$@"

View File

@@ -24,7 +24,7 @@ module --version
module purge
module use MX unstable Programming
module load anaconda/2019.07 cuda/11.0.3 alphafold/2.0.0-b88f8da
module load alphafold/ALPHAFOLD_VERSION
module list
exec "${ALPHAFOLD_DIR:?Error loading module}/bin/submit.sh" "$@"

View File

@@ -29,9 +29,14 @@ pbuild::install() {
git clone --depth=1 -b "$BRANCH" https://github.com/deepmind/alphafold.git "$ALPHAFOLD_HOME" || return $?
if ! [ -f "$ALPHAFOLD_HOME/alphafold/common/stereo_chemical_props.txt" ]; then
wget -q -P "$ALPHAFOLD_HOME/alphafold/common/" \
--no-check-certificate `# wget root certs are old` \
https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt
fi
wget -O "$ALPHAFOLD_HOME/run_alphafold.sh" \
https://raw.githubusercontent.com/kalininalab/alphafold_non_docker/main/run_alphafold.sh
chmod +x "$ALPHAFOLD_HOME/run_alphafold.sh"
cp -r "$BUILDBLOCK_DIR/bin" "$PREFIX/"
sed -i "s/ALPHAFOLD_VERSION/$V/g" "$PREFIX/bin/"*
}

View File

@@ -1 +1,2 @@
alphafold/2.0.0-b88f8da anaconda/2019.07 b:gcc/10.3.0 cuda/11.0.3
alphafold/2.0.0-b88f8da unstable anaconda/2019.07 b:gcc/10.3.0 cuda/11.0.3
alphafold/2.0.1 unstable anaconda/2019.07 b:gcc/10.3.0 cuda/11.0.3

View File

@@ -0,0 +1,2 @@
The alphafold environment is a complex mixture of conda and pip. See
MX/alphafold/README.md.