From 11d171f75dd9bf7971cfda17812f3cb8620f2f37 Mon Sep 17 00:00:00 2001 From: Dawn Date: Tue, 1 Sep 2026 11:38:03 +0200 Subject: [PATCH] update autoPROC --- autoPROC/README.md | 28 +++++++++++++++++--- autoPROC/build | 5 ++-- autoPROC/files/config.yaml | 12 +++++++-- autoPROC/modulefile | 5 ++-- autoPROC/rebuild.sh | 54 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 94 insertions(+), 10 deletions(-) create mode 100755 autoPROC/rebuild.sh diff --git a/autoPROC/README.md b/autoPROC/README.md index 325a63d..418b8bd 100644 --- a/autoPROC/README.md +++ b/autoPROC/README.md @@ -3,8 +3,16 @@ autoPROC (Global Phasing Ltd.) is an automated pipeline for integrating and scaling macromolecular crystallography diffraction data. It is licence-gated: the PSI licence token is committed as `autoPROC/.licence` and installed into the software tree at build -time. CCP4 8.0 and XDS are hard runtime requirements and are pulled in as module -dependencies. +time. + +Runtime deps follow the GPhL CentOS8/RHEL8 install doc +(https://www.globalphasing.com/autoproc/manual/installation/CentOS8_64bit/index.html): +CCP4 8.0 and XDS are absolute requirements, ImageMagick is "highly +recommended" for full functionality. All three come in as +`runtime_deps` (`xds/20260616`, `ccp4/8.0`, `ImageMagick/7.1.2-30`) — +the module-load equivalent of the doc's `.bashrc` recipe (source +setup.sh + CCP4 setup + XDS on PATH). The doc's `autoPROC_latest` +symlink trick is not needed: Pmodules versioning covers it. ## Build on Ra @@ -59,5 +67,17 @@ process -h - If loading the module fails with `... : unbound variable` (setup.sh under `set -u`), add `puts stdout "set +x nounset"` before the `source` line in `modulefile` (same fix used for phenix). -- There is no `ccp4` module in this repo; `runtime_deps` references a site CCP4 module. - Set the exact name/version from `module avail ccp4`. +- `runtime_deps` must reference module versions that exist on Ra: check with + `module avail xds ccp4 ImageMagick` after an XDS/CCP4 update and adjust. +- ImageMagick/7.1.2-30 is still `unstable`; promote it to stable before promoting + autoPROC (a stable module may only depend on stable modules). + +## Updating runtime_deps without a rebuild + +`runtime_deps` land in the generated modulefile, so after editing +`files/config.yaml`: + +``` +modbuild build --update-modulefiles 20240710 +module use MX unstable && module load autoPROC/20240710 # should auto-load xds, ccp4, ImageMagick +``` diff --git a/autoPROC/build b/autoPROC/build index 566bdfc..c68b274 100755 --- a/autoPROC/build +++ b/autoPROC/build @@ -10,10 +10,11 @@ pbuild::compile() { :; } pbuild::install() { # autoPROC is licence-gated: the Global Phasing snapshot cannot be wget'd # (download needs credentials), so stage it in this module dir first as - # autoPROC_snapshot_.tar.gz, then unpack into $PREFIX. Not committed to git. + # autoPROC_snapshot_.tar.gz, then unpack into $PREFIX. Not committed. + # V_PKG (not V) so rebuilds as -2, -3 reuse the same staged tarball. mkdir -p "${PREFIX}" cd "${PREFIX}" - tar -xf "${BUILDBLOCK_DIR}/autoPROC_snapshot_${V}.tar.gz" --strip-components=1 + tar -xf "${BUILDBLOCK_DIR}/autoPROC_snapshot_${V_PKG}.tar.gz" --strip-components=1 # Install the PSI licence token at the software home so autoPROC is activated. cp "${BUILDBLOCK_DIR}/.licence" "${PREFIX}/.licence" diff --git a/autoPROC/files/config.yaml b/autoPROC/files/config.yaml index 8d8995a..3ac3466 100644 --- a/autoPROC/files/config.yaml +++ b/autoPROC/files/config.yaml @@ -9,5 +9,13 @@ autoPROC: 20240710: config: relstage: unstable - # XDS = in-repo module; CCP4 = site module, confirm name with `module avail ccp4`. - runtime_deps: [xds/20251103, ccp4/8.0] + # Per GPhL CentOS8 install doc: CCP4 8.0 + XDS are absolute requirements, + # ImageMagick "highly recommended" for full functionality. ImageMagick is + # still unstable - promote it before promoting autoPROC to stable. + runtime_deps: [xds/20260616, ccp4/8.0, ImageMagick/7.1.2-30] + # same snapshot rebuilt fresh (updated deps); -2 is the module release, + # V_PKG stays 20240710 so the build finds the same staged tarball + 20240710-2: + config: + relstage: unstable + runtime_deps: [xds/20260616, ccp4/8.0, ImageMagick/7.1.2-30] diff --git a/autoPROC/modulefile b/autoPROC/modulefile index 6499a5c..1ea4a27 100644 --- a/autoPROC/modulefile +++ b/autoPROC/modulefile @@ -8,8 +8,9 @@ module-maintainer "MX Data " module-help " autoPROC (Global Phasing Ltd.) is an automated pipeline for integrating and scaling macromolecular crystallography diffraction data. It wraps XDS, CCP4 and other tools and -requires a valid Global Phasing licence plus CCP4 8.0 and XDS at runtime (both pulled in -as module dependencies). +requires a valid Global Phasing licence plus CCP4 8.0 and XDS at runtime; ImageMagick +is recommended by GPhL for full functionality. All three are pulled in as module +dependencies. " # autoPROC is activated by sourcing its setup script (sets autoPROC_home, PATH, etc.). diff --git a/autoPROC/rebuild.sh b/autoPROC/rebuild.sh new file mode 100755 index 0000000..6d9ef1d --- /dev/null +++ b/autoPROC/rebuild.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# Build autoPROC fresh under a NEW version name on a Ra login node - the +# existing install is left untouched. Version convention: - +# (e.g. 20240710-2); the - release suffix is stripped to find the staged +# snapshot tarball. Verifies the module loads and the licence is seen. +# Usage: ./rebuild.sh [version] (default 20240710-2; run from the autoPROC module dir) +set -euo pipefail + +V="${1:-20240710-2}" +V_PKG="${V%%-*}" # snapshot date without the - release suffix +CACHE=/das/work/p21/p21515/.cache/Pmodules + +cd "$(dirname "$0")" + +grep -q "^ ${V}:" files/config.yaml || { + echo "ERROR: version ${V} not in files/config.yaml - add it under versions: first" >&2 + exit 1 +} +[[ -r "autoPROC_snapshot_${V_PKG}.tar.gz" ]] || { + echo "ERROR: stage the GPhL snapshot here first as autoPROC_snapshot_${V_PKG}.tar.gz" >&2 + echo " (download needs GPhL credentials, see README)" >&2 + exit 1 +} +[[ -r .licence ]] || { echo "ERROR: .licence token missing from module dir" >&2; exit 1; } + +# `module` is a shell function; non-login shells may lack it +if ! type module >/dev/null 2>&1; then + for f in /etc/profile.d/pmodules.sh /opt/psi/config/profile.bash; do + [[ -r "$f" ]] && source "$f" && break + done +fi +type module >/dev/null 2>&1 || { + echo "ERROR: module command not found - run from a login shell" >&2; exit 1 +} + +# leaked env vars from previously loaded modules cause odd build failures +module purge +module use unstable +module load modbuild/2.1.3 + +# no --clean-install/-f: this is a fresh version, existing installs stay as-is +modbuild build \ + --tmpdir="$CACHE" --distdir="$CACHE" \ + "$V" + +# verify: module loads, runtime deps come in, licence is active +module use MX unstable +module load "autoPROC/${V}" +out=/tmp/autoPROC_rebuild_check.$$ +process -h > "$out" 2>&1 || true +head -20 "$out" +rm -f "$out" +echo "OK: autoPROC/${V} rebuilt; loaded modules:" +module list 2>&1 | grep -Ei 'autoPROC|xds|ccp4|ImageMagick'