Skip to content

Commit

Permalink
Merge branch 'pdb_ihm_rename'
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jan 11, 2025
2 parents 4ff7a13 + 42d37ec commit 2f66611
Show file tree
Hide file tree
Showing 194 changed files with 67,502 additions and 13,827 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Validation pipeline for integrative and hybrid models

## Project objective
- `1.` Develop a validation pipeline (including data validation, model validation, fit of input to model, fit of data not used for modeling and uncertainty of the model) for assessing IHM structures deposited to [PDB-Dev](https://pdb-dev.wwpdb.org/index.html)
- `1.` Develop a validation pipeline (including data validation, model validation, fit of input to model, fit of data not used for modeling and uncertainty of the model) for assessing IHM structures deposited to [PDB-IHM](https://pdb-ihm.org/index.html)

## List of files and directories:
- `docs` documentation for all classes and functions (sphinx)
Expand Down
216 changes: 0 additions & 216 deletions about_validation.html

This file was deleted.

13 changes: 0 additions & 13 deletions dependencies.txt

This file was deleted.

52 changes: 36 additions & 16 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
FROM centos:7
MAINTAINER Ben Webb <[email protected]>
FROM ubuntu:22.04
MAINTAINER Arthur Zalevsky <[email protected]>

# Install ATSAS and its dependencies
COPY ATSAS-3.0.5-2.el7.x86_64.rpm /
RUN yum -y localinstall /ATSAS-3.0.5-2.el7.x86_64.rpm && yum -y install libgfortran5 git && rm -f /ATSAS*.rpm
ARG ATSAS
ARG TZ=America/Los_Angeles
ENV TZ=${TZ}
ENV DEBIAN_FRONTEND=noninteractive

# Set up basic conda environment using conda-forge packages
RUN curl -L https://github.com/conda-forge/miniforge/releases/download/4.11.0-0/Miniforge3-4.11.0-0-Linux-x86_64.sh -o miniforge.sh && echo "4c24b38969ac413efa3a984290296f72578340d06004f2c7ba5efcbf828ec86b miniforge.sh" sha256sum -c --status && bash ./miniforge.sh -b -p /root/miniforge && rm -f miniforge.sh && /root/miniforge/bin/conda init -q bash
# Install common dependencies
RUN apt-get update -y && apt-get install -y curl git subversion build-essential

# Install Python packages needed by IHMValidation and install extra RPMs
# needed to run firefox
RUN source /root/.bashrc && eval "$(conda shell.bash hook)" && conda install -y pandas flask ihm scikit-learn selenium bokeh requests firefox geckodriver && pip install python-decouple pdfkit && yum -y install gtk3 alsa-lib
# Set up basic conda environment using conda-forge packages
RUN curl -L https://github.com/conda-forge/miniforge/releases/download/23.3.1-1/Mambaforge-23.3.1-1-Linux-x86_64.sh -o miniforge.sh && echo "dbe92c011a1315b9626e2f93a165892f4b89177145bc350b3859a483a3642a24 miniforge.sh" sha256sum -c --status && bash ./miniforge.sh -b -p /opt/conda && rm -f miniforge.sh && /opt/conda/bin/conda init -q bash

# Get wkhtmltopdf directly from web site (there is a conda package, but it
# does not handle https: links)
RUN curl -LO https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm && yum -y localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm && rm -f wkhtmltox-0.12.6-1.centos7.x86_64.rpm
# Ensure that we always use a shell with conda
ENV PATH /opt/conda/bin:${PATH}
RUN echo "conda activate" >> ~/.bashrc
SHELL ["/bin/bash", "--login", "-c"]

# Build molprobity from source code and put the binaries we need in /usr/bin/
RUN source /root/.bashrc && eval "$(conda shell.bash hook)" && yum -y install mesa-libGL-devel subversion ca-certificates git gcc-c++ && mkdir molprobity && cd molprobity && curl -O https://raw.githubusercontent.com/rlabduke/MolProbity/master/install_via_bootstrap.sh && bash install_via_bootstrap.sh 12 && ln -sf /molprobity/build/bin/molprobity.clashscore /usr/bin/ && ln -sf /molprobity/build/bin/molprobity.ramalyze /usr/bin/ && ln -sf /molprobity/build/bin/molprobity.rotalyze /usr/bin/ && ln -sf /molprobity/build/bin/molprobity.molprobity /usr/bin/
ADD "https://api.github.com/repos/rlabduke/MolProbity/commits?per_page=1" latest_commit
RUN mkdir /opt/molprobity && cd /opt/molprobity && curl -O https://raw.githubusercontent.com/rlabduke/MolProbity/master/install_via_bootstrap.sh && bash ./install_via_bootstrap.sh 4
ENV PATH ${PATH}:/opt/molprobity/build/bin

# Install SAS tools: ATSAS and SASCIFTOOLS
COPY ${ATSAS} /.
RUN apt-get update -y && apt-get install -y /${ATSAS} && rm -f /${ATSAS}
RUN pip install git+https://git.embl.de/grp-svergun/sasciftools3.git@master#egg=sasciftools
# Install additional certificate for SASBDB
RUN curl https://cacerts.digicert.com/ThawteEVRSACAG2.crt.pem -o ThawteEVRSACAG2.crt --output-dir /usr/local/share/ca-certificates/ && update-ca-certificates
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

# Install Python packages and other dependencies needed by IHMValidation
RUN apt-get update -y && apt-get install -y xvfb libasound2 libdbus-glib-1-2 libgtk-3-0 && mamba install -y pip requests numpy pandas scikit-learn matplotlib "bokeh<3.0" selenium pyvirtualdisplay firefox geckodriver jinja2 && pip install -U iqplot pdfkit ihm && curl -L -O https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb && apt install -y ./wkhtmltox_0.12.6.1-2.jammy_amd64.deb && rm -rf wkhtmltox_0.12.6.1-2.jammy_amd64.deb
# Hardcode selenium path
ENV SE_MANAGER_PATH=/opt/conda/bin/selenium-manager

# Get IHMValidation
ADD "https://api.github.com/repos/salilab/IHMValidation/commits?per_page=1" latest_commit
RUN git clone --depth 1 https://github.com/salilab/IHMValidation.git /opt/IHMValidation

# Get IHMValidation and configure
RUN git clone https://github.com/salilab/IHMValidation.git && source /root/.bashrc && eval "$(conda shell.bash hook)" && yum -y install which && echo "ATSAS=\"`which datcmp`\"" > IHMValidation/.env && echo "Molprobity_ramalyze=\"`which molprobity.ramalyze`\"" >> IHMValidation/.env && echo "Molprobity_molprobity=\"`which molprobity.molprobity`\"" >> IHMValidation/.env && echo "Molprobity_clashscore=\"`which molprobity.clashscore`\"" >> IHMValidation/.env && echo "Molprobity_rotalyze=\"`which molprobity.rotalyze`\"" >> IHMValidation/.env && echo "wkhtmltopdf=\"`which wkhtmltopdf`\"" >> IHMValidation/.env
# Create input and output dirs
RUN mkdir -p /ihmv/input /ihmv/output /ihmv/cache /ihmv/databases
16 changes: 16 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Building runtime image

We switched from Docket to [Singularity](https://docs.sylabs.io/guides/4.1/user-guide/introduction.html) containers to run the validation pipeline.

To build the image:
1. Navigate to the directory holding `Singularity.def` file:
`cd IHMValidation/docker`
2. Download [ATSAS](https://www.embl-hamburg.de/biosaxs/download.html) `.deb` package for Ubuntu 22.04 and put into the same directory. The current pipeline was tested with `ATSAS-3.2.1` but newer versions should work too.
3. Select an appropriate [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example `America/Los_Angeles`
4. Build the image:
`singularity build --build-arg TZ=America/Los_Angeles --build-arg ATSAS=./ATSAS-3.2.1-1_amd64.deb ihmv_$(date +%Y%m%d).sif Singularity.def`
which will generate a `.sif` image using current date as a nametag (i.e. `ihmv_20240227.sif`)

**NB 1**: It takes about ~25 minutes on a modern workstation to build the image from scratch.

**NB 2**: Due to the [Molprobity](https://github.com/rlabduke/MolProbity)'s rolling release model we can't freeze Molprobity version thus we can't guarantee the `IHMValidation` package will work with a freshly-built image.
Loading

0 comments on commit 2f66611

Please sign in to comment.